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

ClassicNurbsCurve Class Reference

#include <classicNurbsCurve.h>

Inheritance diagram for ClassicNurbsCurve:

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

Public Member Functions

 ClassicNurbsCurve (int order, int num_cvs, const float knots[], const LVecBase4f cvs[])
virtual void set_order (int order)
virtual int get_order () const
virtual int get_num_cvs () const
virtual int get_num_knots () const
virtual bool insert_cv (float t)
virtual bool remove_cv (int n)
virtual void remove_all_cvs ()
virtual bool set_cv (int n, const LVecBase4f &v)
virtual LVecBase4f get_cv (int n) const
virtual bool set_knot (int n, float t)
virtual float get_knot (int n) const
virtual bool recompute ()
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 bool stitch (const ParametricCurve *a, const ParametricCurve *b)
INLINE CubicCurvesegget_curveseg (int ti)
virtual NurbsCurveInterfaceget_nurbs_interface ()
virtual bool convert_to_nurbs (ParametricCurve *nc) const
virtual void write (ostream &out, int indent_level=0) const
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 ()

Public Attributes

PUBLISHED __pad1__: virtual ~ClassicNurbsCurve()

Protected Member Functions

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

Static Protected Member Functions

TypedWritablemake_ClassicNurbsCurve (const FactoryParams &params)

Protected Attributes

int _order
pvector< CV_cvs

Private Member Functions

 ClassicNurbsCurve (const ParametricCurve &pc)

Private Attributes

PUBLISHED __pad0__: ClassicNurbsCurve()

Static Private Attributes

TypeHandle _type_handle
TypeHandle _orig_type_handle

Constructor & Destructor Documentation

ClassicNurbsCurve::ClassicNurbsCurve const ParametricCurve pc  )  [private]
 

Definition at line 57 of file classicNurbsCurve.cxx.

References _order, and ParametricCurve::convert_to_nurbs().

Referenced by stitch().

ClassicNurbsCurve::ClassicNurbsCurve int  order,
int  num_cvs,
const float  knots[],
const LVecBase4f  cvs[]
 

Definition at line 73 of file classicNurbsCurve.cxx.

References _cvs, _order, NurbsCurveInterface::append_cv(), recompute(), and set_knot().


Member Function Documentation

int ClassicNurbsCurve::append_cv_impl const LVecBase4f &  v  )  [protected, virtual]
 

Implements NurbsCurveInterface.

Definition at line 516 of file classicNurbsCurve.cxx.

References _cvs, get_knot(), and v.

bool ClassicNurbsCurve::convert_to_nurbs ParametricCurve nc  )  const [virtual]
 

Reimplemented from NurbsCurveInterface.

Definition at line 493 of file classicNurbsCurve.cxx.

References ParametricCurve::_curve_type, NurbsCurveInterface::convert_to_nurbs(), and ParametricCurve::set_curve_type().

void ClassicNurbsCurve::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from PiecewiseCurve.

Definition at line 610 of file classicNurbsCurve.cxx.

References _cvs, _order, ClassicNurbsCurve::CV::_p, ClassicNurbsCurve::CV::_t, PiecewiseCurve::fillin(), DatagramIterator::get_float64(), DatagramIterator::get_int8(), and DatagramIterator::get_uint32().

Referenced by make_ClassicNurbsCurve().

int ClassicNurbsCurve::find_cv float  t  )  [protected]
 

Definition at line 541 of file classicNurbsCurve.cxx.

References _cvs, _order, and t.

Referenced by insert_cv().

virtual TypeHandle ClassicNurbsCurve::force_init_type void   )  [inline, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 144 of file classicNurbsCurve.h.

References NurbsCurveInterface::get_class_type(), and NurbsCurveInterface::init_type().

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

Reimplemented from NurbsCurveInterface.

Definition at line 529 of file classicNurbsCurve.cxx.

References NurbsCurveInterface::format_egg().

TypeHandle ClassicNurbsCurve::get_class_type void   )  [inline, static]
 

Reimplemented from NurbsCurveInterface.

Definition at line 128 of file classicNurbsCurve.h.

Referenced by register_with_read_factory().

INLINE CubicCurveseg* ClassicNurbsCurve::get_curveseg int  ti  ) 
 

Reimplemented from PiecewiseCurve.

LVecBase4f ClassicNurbsCurve::get_cv int  n  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 257 of file classicNurbsCurve.cxx.

References _cvs, get_num_cvs(), and n.

float ClassicNurbsCurve::get_knot int  n  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 290 of file classicNurbsCurve.cxx.

References _cvs, _order, and n.

Referenced by append_cv_impl(), insert_cv(), rebuild_curveseg(), and recompute().

int ClassicNurbsCurve::get_num_cvs  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 131 of file classicNurbsCurve.cxx.

References _cvs.

Referenced by get_cv(), and set_cv().

int ClassicNurbsCurve::get_num_knots  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 141 of file classicNurbsCurve.cxx.

References _cvs, and _order.

Referenced by set_knot().

NurbsCurveInterface * ClassicNurbsCurve::get_nurbs_interface  )  [virtual]
 

Reimplemented from ParametricCurve.

Definition at line 481 of file classicNurbsCurve.cxx.

int ClassicNurbsCurve::get_order  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 121 of file classicNurbsCurve.cxx.

References _order.

virtual TypeHandle ClassicNurbsCurve::get_type void   )  const [inline, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 141 of file classicNurbsCurve.h.

References NurbsCurveInterface::get_class_type().

void ClassicNurbsCurve::init_type void   )  [inline, static]
 

Reimplemented from NurbsCurveInterface.

Definition at line 131 of file classicNurbsCurve.h.

References NurbsCurveInterface::get_class_type(), PiecewiseCurve::get_class_type(), NurbsCurveInterface::init_type(), PiecewiseCurve::init_type(), and register_type().

Referenced by ConfigureFn().

bool ClassicNurbsCurve::insert_cv float  t  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 158 of file classicNurbsCurve.cxx.

References _cvs, _order, a, NurbsCurveInterface::append_cv(), find_cv(), get_knot(), and t.

TypedWritable * ClassicNurbsCurve::make_ClassicNurbsCurve const FactoryParams params  )  [static, protected]
 

Definition at line 570 of file classicNurbsCurve.cxx.

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

Referenced by register_with_read_factory().

bool ClassicNurbsCurve::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 351 of file classicNurbsCurve.cxx.

References _cvs, PiecewiseCurve::_last_ti, _order, c, compute_nurbs_basis(), CubicCurveseg::compute_seg(), get_knot(), invert, RT_KEEP_ORIG, and s.

bool ClassicNurbsCurve::recompute  )  [virtual]
 

Reimplemented from ParametricCurve.

Definition at line 312 of file classicNurbsCurve.cxx.

References _cvs, _order, PiecewiseCurve::_segs, c, get_knot(), and PiecewiseCurve::insert_curveseg().

Referenced by ClassicNurbsCurve(), and stitch().

void ClassicNurbsCurve::register_with_read_factory  )  [static]
 

Reimplemented from PandaNode.

Definition at line 559 of file classicNurbsCurve.cxx.

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

Referenced by ConfigureFn().

void ClassicNurbsCurve::remove_all_cvs  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 231 of file classicNurbsCurve.cxx.

References _cvs.

bool ClassicNurbsCurve::remove_cv int  n  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 216 of file classicNurbsCurve.cxx.

References _cvs, and n.

bool ClassicNurbsCurve::set_cv int  n,
const LVecBase4f &  v
[virtual]
 

Implements NurbsCurveInterface.

Definition at line 243 of file classicNurbsCurve.cxx.

References _cvs, get_num_cvs(), n, and v.

bool ClassicNurbsCurve::set_knot int  n,
float  t
[virtual]
 

Implements NurbsCurveInterface.

Definition at line 274 of file classicNurbsCurve.cxx.

References _cvs, _order, get_num_knots(), n, and t.

Referenced by ClassicNurbsCurve().

void ClassicNurbsCurve::set_order int  order  )  [virtual]
 

Definition at line 108 of file classicNurbsCurve.cxx.

References _cvs, and _order.

bool ClassicNurbsCurve::stitch const ParametricCurve a,
const ParametricCurve b
[virtual]
 

Reimplemented from ParametricCurve.

Definition at line 426 of file classicNurbsCurve.cxx.

References _cvs, ClassicNurbsCurve::CV::_t, a, b, ClassicNurbsCurve(), PandaNode::PT(), recompute(), and t.

void ClassicNurbsCurve::write ostream &  out,
int  indent_level = 0
const [virtual]
 

Reimplemented from NurbsCurveInterface.

Definition at line 504 of file classicNurbsCurve.cxx.

References NurbsCurveInterface::write().

void ClassicNurbsCurve::write_datagram BamWriter manager,
Datagram me
[protected, virtual]
 

Reimplemented from PiecewiseCurve.

Definition at line 587 of file classicNurbsCurve.cxx.

References _cvs, _order, ClassicNurbsCurve::CV::_p, ClassicNurbsCurve::CV::_t, Datagram::add_float64(), Datagram::add_int8(), Datagram::add_uint32(), and PiecewiseCurve::write_datagram().


Member Data Documentation

PUBLISHED ClassicNurbsCurve::__pad0__ [private]
 

Reimplemented from NurbsCurveInterface.

Definition at line 53 of file classicNurbsCurve.h.

PUBLISHED ClassicNurbsCurve::__pad1__
 

Reimplemented from ParametricCurve.

Definition at line 59 of file classicNurbsCurve.h.

pvector<CV> ClassicNurbsCurve::_cvs [protected]
 

Definition at line 115 of file classicNurbsCurve.h.

Referenced by append_cv_impl(), ClassicNurbsCurve(), fillin(), find_cv(), get_cv(), get_knot(), get_num_cvs(), get_num_knots(), insert_cv(), rebuild_curveseg(), recompute(), remove_all_cvs(), remove_cv(), set_cv(), set_knot(), set_order(), stitch(), and write_datagram().

int ClassicNurbsCurve::_order [protected]
 

Definition at line 105 of file classicNurbsCurve.h.

Referenced by ClassicNurbsCurve(), fillin(), find_cv(), get_knot(), get_num_knots(), get_order(), insert_cv(), rebuild_curveseg(), recompute(), set_knot(), set_order(), and write_datagram().

TypeHandle ClassicNurbsCurve::_orig_type_handle [static, private]
 

Definition at line 33 of file classicNurbsCurve.cxx.

Referenced by register_with_read_factory().

TypeHandle ClassicNurbsCurve::_type_handle [static, private]
 

Reimplemented from NurbsCurveInterface.

Definition at line 32 of file classicNurbsCurve.cxx.


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