Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions
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:
NurbsCurve

List of all members.

Public Member Functions

int append_cv (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
int append_cv (const LVecBase3 &v)
int append_cv (const LVecBase4 &v)
virtual LVecBase4 get_cv (int n) const =0
LVecBase3 get_cv_point (int n) const
 Returns the position of the indicated CV.
PN_stdfloat get_cv_weight (int n) const
 Returns the weight of the indicated CV.
virtual PN_stdfloat get_knot (int n) const =0
virtual int get_num_cvs () const =0
virtual int get_num_knots () const =0
virtual int get_order () const =0
virtual bool insert_cv (PN_stdfloat t)=0
virtual void remove_all_cvs ()=0
virtual bool remove_cv (int n)=0
virtual bool set_cv (int n, const LVecBase4 &v)=0
bool set_cv_point (int n, PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
 Repositions the indicated CV.
bool set_cv_point (int n, const LVecBase3 &v)
 Repositions the indicated CV.
bool set_cv_weight (int n, PN_stdfloat w)
 Sets the weight of the indicated CV without affecting its position in 3-d space.
virtual bool set_knot (int n, PN_stdfloat t)=0
virtual void set_order (int order)=0
void write_cv (ostream &out, int n) const

Static Public Member Functions

static TypeHandle get_class_type ()
static void init_type ()

Protected Member Functions

virtual int append_cv_impl (const LVecBase4 &v)=0
bool convert_to_nurbs (ParametricCurve *nc) const
 Stores in the indicated NurbsCurve a NURBS representation of an equivalent curve.
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.
void write (ostream &out, int indent_level) const

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 34 of file nurbsCurveInterface.h.


Member Function Documentation

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 NurbsCurve.

Definition at line 171 of file nurbsCurveInterface.cxx.

References ParametricCurve::get_nurbs_interface(), and ParametricCurve::recompute().

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 NurbsCurve.

Definition at line 107 of file nurbsCurveInterface.cxx.

LVecBase3 NurbsCurveInterface::get_cv_point ( int  n) const [inline]

Returns the position of the indicated CV.

Definition at line 75 of file nurbsCurveInterface.I.

References LVecBase3f::zero().

PN_stdfloat NurbsCurveInterface::get_cv_weight ( int  n) const [inline]

Returns the weight of the indicated CV.

Definition at line 88 of file nurbsCurveInterface.I.

Referenced by set_cv_point().

bool NurbsCurveInterface::set_cv_point ( int  n,
PN_stdfloat  x,
PN_stdfloat  y,
PN_stdfloat  z 
) [inline]

Repositions the indicated CV.

Returns true if successful, false otherwise.

Definition at line 53 of file nurbsCurveInterface.I.

bool NurbsCurveInterface::set_cv_point ( int  n,
const LVecBase3 v 
) [inline]

Repositions the indicated CV.

Returns true if successful, false otherwise.

Definition at line 64 of file nurbsCurveInterface.I.

References get_cv_weight().

bool NurbsCurveInterface::set_cv_weight ( int  n,
PN_stdfloat  w 
)

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

Definition at line 37 of file nurbsCurveInterface.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations