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

NurbsCurveInterface Class Reference

This abstract class defines the interface only for a Nurbs-style curve, with knots and coordinates in homogeneous space. More...

#include <nurbsCurveInterface.h>

Inheritance diagram for NurbsCurveInterface:

ClassicNurbsCurve NurbsPPCurve List of all members.

Public Member Functions

virtual void set_order (int order)=0
virtual int get_order () const=0
virtual int get_num_cvs () const=0
virtual int get_num_knots () const=0
virtual bool insert_cv (float t)=0
int append_cv (float x, float y, float z)
int append_cv (const LVecBase3f &v)
int append_cv (const LVecBase4f &v)
virtual bool remove_cv (int n)=0
virtual void remove_all_cvs ()=0
bool set_cv_point (int n, float x, float y, float z)
 Repositions the indicated CV.

bool set_cv_point (int n, const LVecBase3f &v)
 Repositions the indicated CV.

LVecBase3f get_cv_point (int n) const
 Returns the position of the indicated CV.

bool set_cv_weight (int n, float w)
 Sets the weight of the indicated CV without affecting its position in 3-d space.

float get_cv_weight (int n) const
 Returns the weight of the indicated CV.

virtual bool set_cv (int n, const LVecBase4f &v)=0
virtual LVecBase4f get_cv (int n) const=0
virtual bool set_knot (int n, float t)=0
virtual float get_knot (int n) const=0
void write_cv (ostream &out, int n) const

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual int append_cv_impl (const LVecBase4f &v)=0
void write (ostream &out, int indent_level) const
bool format_egg (ostream &out, const string &name, const string &curve_type, int indent_level) const
 Formats the Nurbs curve for output to an Egg file.

bool convert_to_nurbs (ParametricCurve *nc) const
 Stores in the indicated NurbsCurve a NURBS representation of an equivalent curve.


Static Private Attributes

TypeHandle _type_handle

Detailed Description

This abstract class defines the interface only for a Nurbs-style curve, with knots and coordinates in homogeneous space.

The NurbsCurve class inherits both from this and from ParametricCurve.

Definition at line 49 of file nurbsCurveInterface.h.


Member Function Documentation

int NurbsCurveInterface::append_cv const LVecBase4f &  v  )  [inline]
 

Definition at line 55 of file nurbsCurveInterface.I.

References INLINE, set_cv_point(), x, and y.

int NurbsCurveInterface::append_cv const LVecBase3f &  v  )  [inline]
 

Definition at line 43 of file nurbsCurveInterface.I.

References append_cv_impl(), and INLINE.

int NurbsCurveInterface::append_cv float  x,
float  y,
float  z
[inline]
 

Definition at line 31 of file nurbsCurveInterface.I.

References INLINE.

Referenced by ClassicNurbsCurve::ClassicNurbsCurve(), ParametricCurve::get_bezier_segs(), ClassicNurbsCurve::get_num_cvs(), and ClassicNurbsCurve::get_num_knots().

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

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

Referenced by append_cv().

bool NurbsCurveInterface::convert_to_nurbs ParametricCurve nc  )  const [protected]
 

Stores in the indicated NurbsCurve a NURBS representation of an equivalent curve.

Returns true if successful, false otherwise.

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 185 of file nurbsCurveInterface.cxx.

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

Formats the Nurbs curve for output to an Egg file.

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 116 of file nurbsCurveInterface.cxx.

References indent().

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

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 92 of file nurbsCurveInterface.h.

virtual LVecBase4f NurbsCurveInterface::get_cv int  n  )  const [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

Referenced by set_cv_point().

LVecBase3f NurbsCurveInterface::get_cv_point int  n  )  const [inline]
 

Returns the position of the indicated CV.

Definition at line 99 of file nurbsCurveInterface.I.

float NurbsCurveInterface::get_cv_weight int  n  )  const [inline]
 

Returns the weight of the indicated CV.

Definition at line 115 of file nurbsCurveInterface.I.

virtual float NurbsCurveInterface::get_knot int  n  )  const [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

Referenced by write_cv().

virtual int NurbsCurveInterface::get_num_cvs  )  const [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

virtual int NurbsCurveInterface::get_num_knots  )  const [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

Referenced by write_cv().

virtual int NurbsCurveInterface::get_order  )  const [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

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

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 95 of file nurbsCurveInterface.h.

virtual bool NurbsCurveInterface::insert_cv float  t  )  [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

virtual void NurbsCurveInterface::remove_all_cvs  )  [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

virtual bool NurbsCurveInterface::remove_cv int  n  )  [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

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

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

bool NurbsCurveInterface::set_cv_point int  n,
const LVecBase3f &  v
[inline]
 

Repositions the indicated CV.

Returns true if successful, false otherwise.

Definition at line 85 of file nurbsCurveInterface.I.

References get_cv(), and INLINE.

bool NurbsCurveInterface::set_cv_point int  n,
float  x,
float  y,
float  z
[inline]
 

Repositions the indicated CV.

Returns true if successful, false otherwise.

Definition at line 70 of file nurbsCurveInterface.I.

Referenced by append_cv().

bool NurbsCurveInterface::set_cv_weight int  n,
float  w
 

Sets the weight of the indicated CV without affecting its position in 3-d space.

Definition at line 39 of file nurbsCurveInterface.cxx.

virtual bool NurbsCurveInterface::set_knot int  n,
float  t
[pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

Referenced by ParametricCurve::get_bezier_seg().

virtual void NurbsCurveInterface::set_order int  order  )  [pure virtual]
 

Implemented in ClassicNurbsCurve, and NurbsPPCurve.

void NurbsCurveInterface::write ostream &  out,
int  indent_level
const [protected]
 

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 73 of file nurbsCurveInterface.cxx.

void NurbsCurveInterface::write_cv ostream &  out,
int  n
const
 

Definition at line 58 of file nurbsCurveInterface.cxx.

References get_knot(), get_num_knots(), and indent().


Member Data Documentation

TypeHandle NurbsCurveInterface::_type_handle [static, private]
 

Reimplemented in ClassicNurbsCurve, and NurbsPPCurve.

Definition at line 26 of file nurbsCurveInterface.cxx.


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:52:45 2003 for Panda by doxygen1.3