Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

HermiteCurve Class Reference

#include <hermiteCurve.h>

Inheritance diagram for HermiteCurve:

PiecewiseCurve ParametricCurve PandaNode TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

Public Member Functions

CubicCurveseg * get_curveseg (int ti)
virtual bool rebuild_curveseg (int rtype0, float t0, const LVecBase4f &v0, int rtype1, float t1, const LVecBase4f &v1, int rtype2, float t2, const LVecBase4f &v2, int rtype3, float t3, const LVecBase4f &v3)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

void register_with_read_factory ()
TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual bool format_egg (ostream &out, const string &name, const string &curve_type, int indent_level) const
void invalidate_cv (int n, bool redo_all)
int find_cv (float t)
void recompute_basis ()
virtual void write_datagram (BamWriter *manager, Datagram &me)
void fillin (DatagramIterator &scan, BamReader *manager)

Static Protected Member Functions

TypedWritable * make_HermiteCurve (const FactoryParams &params)

Protected Attributes

pvector< HermiteCurveCV > _points

Private Member Functions

 HermiteCurve (const ParametricCurve &pc)
virtual ~HermiteCurve ()
int get_num_cvs () const
int insert_cv (float t)
int append_cv (int type, float x, float y, float z)
int append_cv (int type, const LVecBase3f &v)
bool remove_cv (int n)
void remove_all_cvs ()
bool set_cv_type (int n, int type)
bool set_cv_point (int n, float x, float y, float z)
bool set_cv_point (int n, const LVecBase3f &v)
bool set_cv_in (int n, float x, float y, float z)
bool set_cv_in (int n, const LVecBase3f &v)
bool set_cv_out (int n, float x, float y, float z)
bool set_cv_out (int n, const LVecBase3f &v)
bool set_cv_tstart (int n, float tstart)
bool set_cv_name (int n, const char *name)
int get_cv_type (int n) const
const LVecBase3f & get_cv_point (int n) const
void get_cv_point (int n, LVecBase3f &v) const
const LVecBase3f & get_cv_in (int n) const
void get_cv_in (int n, LVecBase3f &v) const
const LVecBase3f & get_cv_out (int n) const
void get_cv_out (int n, LVecBase3f &v) const
float get_cv_tstart (int n) const
string get_cv_name (int n) const
virtual void output (ostream &out) const
void write_cv (ostream &out, int n) const

Private Attributes

PUBLISHED __pad0__: HermiteCurve()

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

HermiteCurve::HermiteCurve (  const ParametricCurve &  pc  )  [private]
 

Definition at line 279 of file hermiteCurve.cxx.

References ParametricCurve::convert_to_hermite().

HermiteCurve::~HermiteCurve (   )  [private, virtual]
 

Definition at line 294 of file hermiteCurve.cxx.


Member Function Documentation

int HermiteCurve::append_cv (  int  type,
const LVecBase3f &  v
)  [inline, private]
 

Definition at line 102 of file hermiteCurve.h.

References append_cv(), type, and v.

int HermiteCurve::append_cv (  int  type,
float  x,
float  y,
float  z
)  [private]
 

Definition at line 368 of file hermiteCurve.cxx.

References _points, PiecewiseCurve::_segs, PiecewiseCurve::insert_curveseg(), ParametricCurve::invalidate_all(), recompute_basis(), HermiteCurveCV::set_in(), HermiteCurveCV::set_out(), HermiteCurveCV::set_point(), HermiteCurveCV::set_type(), type, x, y, z, and zerovec_3f.

Referenced by append_cv(), ParametricCurve::convert_to_hermite(), and insert_cv().

void HermiteCurve::fillin (  DatagramIterator &  scan,
BamReader *  manager
)  [protected]
 

Reimplemented from PiecewiseCurve.

Definition at line 964 of file hermiteCurve.cxx.

References _points, HermiteCurveCV::fillin(), PiecewiseCurve::fillin(), and DatagramIterator::get_uint32().

Referenced by make_HermiteCurve().

int HermiteCurve::find_cv (  float  t  )  [protected]
 

Definition at line 869 of file hermiteCurve.cxx.

References PiecewiseCurve::_segs, PiecewiseCurve::is_valid(), n, and t.

Referenced by insert_cv().

virtual TypeHandle HermiteCurve::force_init_type (  void   )  [inline, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 180 of file hermiteCurve.h.

References get_class_type(), and init_type().

bool HermiteCurve::format_egg (  ostream &  out,
const string &  name,
const string &  curve_type,
int  indent_level
)  const [protected, virtual]
 

Reimplemented from ParametricCurve.

Definition at line 749 of file hermiteCurve.cxx.

References ParametricCurve::_num_dimensions, _points, PiecewiseCurve::_segs, PiecewiseCurve::get_tlength(), and indent().

TypeHandle HermiteCurve::get_class_type (  void   )  [inline, static]
 

Reimplemented from PiecewiseCurve.

Definition at line 171 of file hermiteCurve.h.

References _type_handle.

Referenced by force_init_type(), get_type(), and register_with_read_factory().

CubicCurveseg* HermiteCurve::get_curveseg (  int  ti  )  [inline]
 

Reimplemented from PiecewiseCurve.

Definition at line 141 of file hermiteCurve.h.

References PiecewiseCurve::get_curveseg().

Referenced by invalidate_cv(), and recompute_basis().

void HermiteCurve::get_cv_in (  int  n,
LVecBase3f &  v
)  const [private]
 

Definition at line 597 of file hermiteCurve.cxx.

References get_cv_in(), n, and v.

const LVecBase3f & HermiteCurve::get_cv_in (  int  n  )  const [private]
 

Definition at line 589 of file hermiteCurve.cxx.

References _points, HC_CUT, n, and zerovec_3f.

Referenced by ParametricCurve::convert_to_hermite(), get_cv_in(), and write_cv().

string HermiteCurve::get_cv_name (  int  n  )  const [private]
 

Definition at line 644 of file hermiteCurve.cxx.

References _points, and n.

Referenced by write_cv().

void HermiteCurve::get_cv_out (  int  n,
LVecBase3f &  v
)  const [private]
 

Definition at line 616 of file hermiteCurve.cxx.

References get_cv_out(), n, and v.

const LVecBase3f & HermiteCurve::get_cv_out (  int  n  )  const [private]
 

Definition at line 608 of file hermiteCurve.cxx.

References _points, HC_CUT, n, and zerovec_3f.

Referenced by ParametricCurve::convert_to_hermite(), get_cv_out(), and write_cv().

void HermiteCurve::get_cv_point (  int  n,
LVecBase3f &  v
)  const [private]
 

Definition at line 578 of file hermiteCurve.cxx.

References get_cv_point(), n, and v.

const LVecBase3f & HermiteCurve::get_cv_point (  int  n  )  const [private]
 

Definition at line 570 of file hermiteCurve.cxx.

References _points, n, and zerovec_3f.

Referenced by get_cv_point(), and write_cv().

float HermiteCurve::get_cv_tstart (  int  n  )  const [private]
 

Definition at line 628 of file hermiteCurve.cxx.

References _points, PiecewiseCurve::get_max_t(), PiecewiseCurve::get_tstart(), and n.

Referenced by insert_cv(), invalidate_cv(), set_cv_tstart(), and write_cv().

int HermiteCurve::get_cv_type (  int  n  )  const [private]
 

Definition at line 555 of file hermiteCurve.cxx.

References _points, and n.

Referenced by ParametricCurve::convert_to_hermite(), and write_cv().

int HermiteCurve::get_num_cvs (   )  const [private]
 

Definition at line 308 of file hermiteCurve.cxx.

References _points.

Referenced by ParametricCurve::convert_to_hermite(), insert_cv(), and output().

virtual TypeHandle HermiteCurve::get_type (  void   )  const [inline, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 177 of file hermiteCurve.h.

References get_class_type().

void HermiteCurve::init_type (  void   )  [inline, static]
 

Reimplemented from PiecewiseCurve.

Definition at line 174 of file hermiteCurve.h.

References _type_handle, and register_type().

Referenced by ConfigureFn(), and force_init_type().

int HermiteCurve::insert_cv (  float  t  )  [private]
 

Definition at line 330 of file hermiteCurve.cxx.

References HermiteCurveCV::_in, HermiteCurveCV::_out, HermiteCurveCV::_p, _points, HermiteCurveCV::_type, append_cv(), find_cv(), get_cv_tstart(), PiecewiseCurve::get_max_t(), get_num_cvs(), PiecewiseCurve::get_pt(), HC_SMOOTH, PiecewiseCurve::insert_curveseg(), ParametricCurve::invalidate_all(), PiecewiseCurve::is_valid(), n, recompute_basis(), set_cv_tstart(), and t.

Referenced by PT().

void HermiteCurve::invalidate_cv (  int  n,
bool  redo_all
)  [protected]
 

Definition at line 823 of file hermiteCurve.cxx.

References ParametricCurve::_curve_type, HermiteCurveCV::_p, _points, CubicCurveseg::bezier_basis(), get_curveseg(), get_cv_tstart(), PiecewiseCurve::get_max_t(), PiecewiseCurve::get_tlength(), HC_CUT, CubicCurveseg::hermite_basis(), ParametricCurve::invalidate(), ParametricCurve::invalidate_all(), PiecewiseCurve::is_valid(), n, PCT_HPR, and wrap_hpr().

Referenced by set_cv_in(), set_cv_out(), set_cv_point(), and set_cv_type().

TypedWritable * HermiteCurve::make_HermiteCurve (  const FactoryParams &  params  )  [static, protected]
 

Definition at line 928 of file hermiteCurve.cxx.

References fillin(), params, and parse_params().

Referenced by register_with_read_factory().

void HermiteCurve::output (  ostream &  out  )  const [private, virtual]
 

Reimplemented from PandaNode.

Definition at line 659 of file hermiteCurve.cxx.

References ParametricCurve::get_curve_type(), get_num_cvs(), PandaNode::output(), PCT_HPR, PCT_T, and PCT_XYZ.

bool HermiteCurve::rebuild_curveseg (  int  rtype0,
float  t0,
const LVecBase4f &  v0,
int  rtype1,
float  t1,
const LVecBase4f &  v1,
int  rtype2,
float  t2,
const LVecBase4f &  v2,
int  rtype3,
float  t3,
const LVecBase4f &  v3
)  [virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 735 of file hermiteCurve.cxx.

void HermiteCurve::recompute_basis (   )  [protected]
 

Definition at line 892 of file hermiteCurve.cxx.

References ParametricCurve::_curve_type, HermiteCurveCV::_p, _points, PiecewiseCurve::_segs, CubicCurveseg::bezier_basis(), get_curveseg(), PiecewiseCurve::get_tlength(), HC_CUT, CubicCurveseg::hermite_basis(), n, PCT_HPR, and wrap_hpr().

Referenced by append_cv(), insert_cv(), remove_cv(), and set_cv_tstart().

void HermiteCurve::register_with_read_factory (   )  [static]
 

Reimplemented from PandaNode.

Definition at line 918 of file hermiteCurve.cxx.

References get_class_type(), BamReader::get_factory(), make_HermiteCurve(), and Factory< TypedWritable >::register_factory().

Referenced by ConfigureFn().

void HermiteCurve::remove_all_cvs (   )  [private]
 

Definition at line 417 of file hermiteCurve.cxx.

References _points, ParametricCurve::invalidate_all(), and PiecewiseCurve::remove_all_curvesegs().

Referenced by ParametricCurve::convert_to_hermite().

bool HermiteCurve::remove_cv (  int  n  )  [private]
 

Definition at line 395 of file hermiteCurve.cxx.

References _points, PiecewiseCurve::_segs, ParametricCurve::invalidate_all(), n, recompute_basis(), and PiecewiseCurve::remove_curveseg().

bool HermiteCurve::set_cv_in (  int  n,
const LVecBase3f &  v
)  [inline, private]
 

Definition at line 115 of file hermiteCurve.h.

References n, set_cv_in(), and v.

bool HermiteCurve::set_cv_in (  int  n,
float  x,
float  y,
float  z
)  [private]
 

Definition at line 485 of file hermiteCurve.cxx.

References _points, invalidate_cv(), n, x, y, and z.

Referenced by ParametricCurve::convert_to_hermite(), PT(), and set_cv_in().

bool HermiteCurve::set_cv_name (  int  n,
const char *  name
)  [private]
 

Definition at line 537 of file hermiteCurve.cxx.

References _points, and n.

bool HermiteCurve::set_cv_out (  int  n,
const LVecBase3f &  v
)  [inline, private]
 

Definition at line 119 of file hermiteCurve.h.

References n, set_cv_out(), and v.

bool HermiteCurve::set_cv_out (  int  n,
float  x,
float  y,
float  z
)  [private]
 

Definition at line 502 of file hermiteCurve.cxx.

References _points, invalidate_cv(), n, x, y, and z.

Referenced by ParametricCurve::convert_to_hermite(), PT(), and set_cv_out().

bool HermiteCurve::set_cv_point (  int  n,
const LVecBase3f &  v
)  [inline, private]
 

Definition at line 111 of file hermiteCurve.h.

References n, set_cv_point(), and v.

bool HermiteCurve::set_cv_point (  int  n,
float  x,
float  y,
float  z
)  [private]
 

Definition at line 468 of file hermiteCurve.cxx.

References _points, invalidate_cv(), n, x, y, and z.

Referenced by PT(), and set_cv_point().

bool HermiteCurve::set_cv_tstart (  int  n,
float  tstart
)  [private]
 

Definition at line 518 of file hermiteCurve.cxx.

References _points, get_cv_tstart(), PiecewiseCurve::get_tstart(), ParametricCurve::invalidate_all(), n, recompute_basis(), and PiecewiseCurve::set_tlength().

Referenced by ParametricCurve::convert_to_hermite(), and insert_cv().

bool HermiteCurve::set_cv_type (  int  n,
int  type
)  [private]
 

Definition at line 445 of file hermiteCurve.cxx.

References _points, HC_CUT, invalidate_cv(), n, and type.

Referenced by ParametricCurve::convert_to_hermite(), and PT().

void HermiteCurve::write_cv (  ostream &  out,
int  n
)  const [private]
 

Definition at line 689 of file hermiteCurve.cxx.

References get_cv_in(), get_cv_name(), get_cv_out(), get_cv_point(), get_cv_tstart(), get_cv_type(), HC_CUT, HC_FREE, HC_G1, HC_SMOOTH, and n.

void HermiteCurve::write_datagram (  BamWriter *  manager,
Datagram &  me
)  [protected, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 945 of file hermiteCurve.cxx.

References _points, Datagram::add_uint32(), and PiecewiseCurve::write_datagram().


Member Data Documentation

PUBLISHED HermiteCurve::__pad0__ [private]
 

Reimplemented from PiecewiseCurve.

Definition at line 94 of file hermiteCurve.h.

pvector<HermiteCurveCV> HermiteCurve::_points [protected]
 

Definition at line 159 of file hermiteCurve.h.

Referenced by append_cv(), fillin(), format_egg(), get_cv_in(), get_cv_name(), get_cv_out(), get_cv_point(), get_cv_tstart(), get_cv_type(), get_num_cvs(), insert_cv(), invalidate_cv(), recompute_basis(), remove_all_cvs(), remove_cv(), set_cv_in(), set_cv_name(), set_cv_out(), set_cv_point(), set_cv_tstart(), set_cv_type(), and write_datagram().

TypeHandle HermiteCurve::_type_handle [static, private]
 

Reimplemented from PiecewiseCurve.

Definition at line 32 of file hermiteCurve.cxx.

Referenced by get_class_type(), and init_type().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:33 2003 for Panda by doxygen1.3