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

NurbsPPCurve Class Reference

#include <nurbsPPCurve.h>

Inheritance diagram for NurbsPPCurve:

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

Public Member Functions

 NurbsPPCurve (int order, int num_cvs, const float knots[], const LVecBase4f cvs[])
virtual float get_max_t () const
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 get_point (float t, LVecBase3f &point) const
virtual bool get_tangent (float t, LVecBase3f &tangent) const
virtual bool get_pt (float t, LVecBase3f &point, LVecBase3f &tangent) const
virtual bool get_2ndtangent (float t, LVecBase3f &tangent2) const
virtual bool stitch (const ParametricCurve *a, const ParametricCurve *b)
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

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad1__: virtual ~NurbsPPCurve()

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

Private Types

typedef pvector< LVecBase4f > Points
typedef pvector< float > Knots

Private Member Functions

 NurbsPPCurve (const ParametricCurve &pc)
bool make_nurbs_valid ()
void make_arrays_valid ()
bool copy_nurbs (PLib::NurbsCurvef &nurbs) const
void copy_arrays (Points &points, Knots &knots, int &order) const

Static Private Member Functions

bool make_nurbs_from (PLib::NurbsCurvef &nurbs, const Points &points, const Knots &knots, int order)
void make_arrays_from (const PLib::NurbsCurvef &nurbs, Points &points, Knots &knots, int &order)

Private Attributes

PUBLISHED __pad0__: NurbsPPCurve()
PLib::NurbsCurvef _nurbs
int _order
Points _points
Knots _knots
bool _nurbs_valid

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef pvector<float> NurbsPPCurve::Knots [private]
 

Definition at line 94 of file nurbsPPCurve.h.

Referenced by NurbsPPCurve(), and stitch().

typedef pvector<LVecBase4f> NurbsPPCurve::Points [private]
 

Definition at line 93 of file nurbsPPCurve.h.

Referenced by NurbsPPCurve(), and stitch().


Constructor & Destructor Documentation

NurbsPPCurve::NurbsPPCurve const ParametricCurve pc  )  [private]
 

Definition at line 46 of file nurbsPPCurve.cxx.

References _nurbs_valid, _order, and ParametricCurve::convert_to_nurbs().

Referenced by stitch().

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

Definition at line 63 of file nurbsPPCurve.cxx.

References _knots, _nurbs_valid, _order, _points, Knots, and Points.


Member Function Documentation

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

Implements NurbsCurveInterface.

Definition at line 535 of file nurbsPPCurve.cxx.

References _knots, _order, _points, and make_arrays_valid().

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

Reimplemented from NurbsCurveInterface.

Definition at line 512 of file nurbsPPCurve.cxx.

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

void NurbsPPCurve::copy_arrays Points points,
Knots knots,
int &  order
const [private]
 

Definition at line 628 of file nurbsPPCurve.cxx.

References _knots, _nurbs, _order, _points, make_arrays_from(), and points.

bool NurbsPPCurve::copy_nurbs PLib::NurbsCurvef &  nurbs  )  const [private]
 

Definition at line 613 of file nurbsPPCurve.cxx.

References _knots, _nurbs, _order, _points, and make_nurbs_from().

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

Reimplemented from ParametricCurve.

Definition at line 128 of file nurbsPPCurve.h.

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

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

Reimplemented from NurbsCurveInterface.

Definition at line 560 of file nurbsPPCurve.cxx.

References NurbsCurveInterface::format_egg().

bool NurbsPPCurve::get_2ndtangent float  t,
LVecBase3f &  tangent2
const [virtual]
 

Implements ParametricCurve.

Definition at line 407 of file nurbsPPCurve.cxx.

References _nurbs, _nurbs_valid, get_max_t(), p, and t.

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

Reimplemented from NurbsCurveInterface.

Definition at line 115 of file nurbsPPCurve.h.

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

Implements NurbsCurveInterface.

Definition at line 248 of file nurbsPPCurve.cxx.

References _nurbs, _points, get_num_cvs(), n, and p.

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

Implements NurbsCurveInterface.

Definition at line 281 of file nurbsPPCurve.cxx.

References _knots, _nurbs, get_num_knots(), and n.

float NurbsPPCurve::get_max_t  )  const [virtual]
 

Reimplemented from ParametricCurve.

Definition at line 89 of file nurbsPPCurve.cxx.

References _knots, and _nurbs.

Referenced by get_2ndtangent(), get_point(), get_pt(), and get_tangent().

int NurbsPPCurve::get_num_cvs  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 138 of file nurbsPPCurve.cxx.

References _nurbs, and _points.

Referenced by get_cv(), and set_cv().

int NurbsPPCurve::get_num_knots  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 152 of file nurbsPPCurve.cxx.

References _knots, and _nurbs.

Referenced by get_knot(), and set_knot().

NurbsCurveInterface * NurbsPPCurve::get_nurbs_interface  )  [virtual]
 

Reimplemented from ParametricCurve.

Definition at line 500 of file nurbsPPCurve.cxx.

int NurbsPPCurve::get_order  )  const [virtual]
 

Implements NurbsCurveInterface.

Definition at line 123 of file nurbsPPCurve.cxx.

References _nurbs, and _order.

bool NurbsPPCurve::get_point float  t,
LVecBase3f &  point
const [virtual]
 

Implements ParametricCurve.

Definition at line 317 of file nurbsPPCurve.cxx.

References _nurbs, _nurbs_valid, get_max_t(), p, and t.

bool NurbsPPCurve::get_pt float  t,
LVecBase3f &  point,
LVecBase3f &  tangent
const [virtual]
 

Implements ParametricCurve.

Definition at line 374 of file nurbsPPCurve.cxx.

References _nurbs, _nurbs_valid, get_max_t(), p, and t.

bool NurbsPPCurve::get_tangent float  t,
LVecBase3f &  tangent
const [virtual]
 

Implements ParametricCurve.

Definition at line 347 of file nurbsPPCurve.cxx.

References _nurbs, _nurbs_valid, get_max_t(), p, and t.

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

Reimplemented from ParametricCurve.

Definition at line 125 of file nurbsPPCurve.h.

References NurbsCurveInterface::get_class_type().

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

Reimplemented from NurbsCurveInterface.

Definition at line 118 of file nurbsPPCurve.h.

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

Referenced by ConfigureFn().

bool NurbsPPCurve::insert_cv float  t  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 172 of file nurbsPPCurve.cxx.

References _nurbs, make_nurbs_valid(), and t.

void NurbsPPCurve::make_arrays_from const PLib::NurbsCurvef &  nurbs,
Points points,
Knots knots,
int &  order
[static, private]
 

Definition at line 681 of file nurbsPPCurve.cxx.

References p, and points.

Referenced by copy_arrays(), and make_arrays_valid().

void NurbsPPCurve::make_arrays_valid  )  [private]
 

Definition at line 595 of file nurbsPPCurve.cxx.

References _knots, _nurbs, _nurbs_valid, _order, _points, and make_arrays_from().

Referenced by append_cv_impl(), and set_knot().

bool NurbsPPCurve::make_nurbs_from PLib::NurbsCurvef &  nurbs,
const Points points,
const Knots knots,
int  order
[static, private]
 

Definition at line 646 of file nurbsPPCurve.cxx.

References p, and points.

Referenced by copy_nurbs(), make_nurbs_valid(), and stitch().

bool NurbsPPCurve::make_nurbs_valid  )  [private]
 

Definition at line 573 of file nurbsPPCurve.cxx.

References _knots, _nurbs, _nurbs_valid, _order, _points, and make_nurbs_from().

Referenced by insert_cv(), and recompute().

bool NurbsPPCurve::recompute  )  [virtual]
 

Reimplemented from ParametricCurve.

Definition at line 303 of file nurbsPPCurve.cxx.

References make_nurbs_valid().

void NurbsPPCurve::remove_all_cvs  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 216 of file nurbsPPCurve.cxx.

References _knots, _nurbs_valid, and _points.

bool NurbsPPCurve::remove_cv int  n  )  [virtual]
 

Implements NurbsCurveInterface.

Definition at line 191 of file nurbsPPCurve.cxx.

References _knots, _nurbs, _order, _points, and n.

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

Implements NurbsCurveInterface.

Definition at line 230 of file nurbsPPCurve.cxx.

References _nurbs, _points, get_num_cvs(), n, and v.

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

Implements NurbsCurveInterface.

Definition at line 265 of file nurbsPPCurve.cxx.

References _knots, get_num_knots(), make_arrays_valid(), n, and t.

void NurbsPPCurve::set_order int  order  )  [virtual]
 

Definition at line 109 of file nurbsPPCurve.cxx.

References _nurbs_valid, _order, and _points.

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

Reimplemented from ParametricCurve.

Definition at line 438 of file nurbsPPCurve.cxx.

References _nurbs, _nurbs_valid, a, b, Knots, make_nurbs_from(), NurbsPPCurve(), Points, and PandaNode::PT().

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

Reimplemented from NurbsCurveInterface.

Definition at line 523 of file nurbsPPCurve.cxx.

References NurbsCurveInterface::write().


Member Data Documentation

PUBLISHED NurbsPPCurve::__pad0__ [private]
 

Reimplemented from NurbsCurveInterface.

Definition at line 43 of file nurbsPPCurve.h.

PUBLISHED NurbsPPCurve::__pad1__
 

Reimplemented from ParametricCurve.

Definition at line 49 of file nurbsPPCurve.h.

Knots NurbsPPCurve::_knots [private]
 

Definition at line 111 of file nurbsPPCurve.h.

Referenced by append_cv_impl(), copy_arrays(), copy_nurbs(), get_knot(), get_max_t(), get_num_knots(), make_arrays_valid(), make_nurbs_valid(), NurbsPPCurve(), remove_all_cvs(), remove_cv(), and set_knot().

PLib::NurbsCurvef NurbsPPCurve::_nurbs [private]
 

Definition at line 107 of file nurbsPPCurve.h.

Referenced by copy_arrays(), copy_nurbs(), get_2ndtangent(), get_cv(), get_knot(), get_max_t(), get_num_cvs(), get_num_knots(), get_order(), get_point(), get_pt(), get_tangent(), insert_cv(), make_arrays_valid(), make_nurbs_valid(), remove_cv(), set_cv(), and stitch().

bool NurbsPPCurve::_nurbs_valid [private]
 

Definition at line 112 of file nurbsPPCurve.h.

Referenced by get_2ndtangent(), get_point(), get_pt(), get_tangent(), make_arrays_valid(), make_nurbs_valid(), NurbsPPCurve(), remove_all_cvs(), set_order(), and stitch().

int NurbsPPCurve::_order [private]
 

Definition at line 109 of file nurbsPPCurve.h.

Referenced by append_cv_impl(), copy_arrays(), copy_nurbs(), get_order(), make_arrays_valid(), make_nurbs_valid(), NurbsPPCurve(), remove_cv(), and set_order().

Points NurbsPPCurve::_points [private]
 

Definition at line 110 of file nurbsPPCurve.h.

Referenced by append_cv_impl(), copy_arrays(), copy_nurbs(), get_cv(), get_num_cvs(), make_arrays_valid(), make_nurbs_valid(), NurbsPPCurve(), remove_all_cvs(), remove_cv(), set_cv(), and set_order().

TypeHandle NurbsPPCurve::_type_handle [static, private]
 

Reimplemented from NurbsCurveInterface.

Definition at line 25 of file nurbsPPCurve.cxx.


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