Panda3D
Public Member Functions | List of all members
NurbsVertex Class Reference

This represents a single control vertex in a NurbsEvaluator. More...

#include "nurbsVertex.h"

Public Member Functions

 NurbsVertex (const NurbsVertex &copy)
 
PN_stdfloat get_extended_vertex (int d) const
 Returns an n-dimensional vertex value. More...
 
NodePath get_space (const NodePath &rel_to) const
 
const LVecBase4 & get_vertex () const
 
void operator= (const NurbsVertex &copy)
 
void set_extended_vertex (int d, PN_stdfloat value)
 Sets an n-dimensional vertex value. More...
 
void set_space (const NodePath &space)
 Sets the space of this vertex as a fixed NodePath. More...
 
void set_space (const std::string &space)
 Sets the space of this vertex as a relative path from the rel_to node. More...
 
void set_vertex (const LVecBase4 &vertex)
 

Detailed Description

This represents a single control vertex in a NurbsEvaluator.

It may be relative to a particular coordinate space; or its coordinate space may be unspecified.

This is not related to NurbsCurve, CubicCurveseg or any of the ParametricCurve-derived objects in this module. It is a completely parallel implementation of NURBS curves, and will probably eventually replace the whole ParametricCurve class hierarchy.

Definition at line 32 of file nurbsVertex.h.

Constructor & Destructor Documentation

◆ NurbsVertex() [1/2]

NurbsVertex::NurbsVertex ( )
inline

Definition at line 17 of file nurbsVertex.I.

◆ NurbsVertex() [2/2]

NurbsVertex::NurbsVertex ( const NurbsVertex copy)
inline

Definition at line 25 of file nurbsVertex.I.

◆ ~NurbsVertex()

NurbsVertex::~NurbsVertex ( )
inline

Definition at line 46 of file nurbsVertex.I.

Member Function Documentation

◆ get_extended_vertex()

PN_stdfloat NurbsVertex::get_extended_vertex ( int  d) const

Returns an n-dimensional vertex value.

See set_extended_vertex(). This returns the value set for the indicated dimension, or 0.0 if nothing has been set.

Definition at line 42 of file nurbsVertex.cxx.

◆ get_space()

NodePath NurbsVertex::get_space ( const NodePath rel_to) const
inline

Definition at line 87 of file nurbsVertex.I.

◆ get_vertex()

const LVecBase4 & NurbsVertex::get_vertex ( ) const
inline

Definition at line 61 of file nurbsVertex.I.

◆ operator=()

void NurbsVertex::operator= ( const NurbsVertex copy)
inline

Definition at line 36 of file nurbsVertex.I.

◆ set_extended_vertex()

void NurbsVertex::set_extended_vertex ( int  d,
PN_stdfloat  value 
)

Sets an n-dimensional vertex value.

This allows definition of a NURBS surface or curve in a sparse n-dimensional space, typically used for associating additional properties (like color or joint membership) with each vertex of a surface.

The value d is an arbitrary integer value and specifies the dimension of question for this particular vertex. Any number of dimensions may be specified, and they need not be consecutive. If a value for a given dimension is not specified, is it implicitly 0.0.

The value is implicitly scaled by the homogenous weight value–that is, the fourth component of the value passed to set_vertex(). This means the ordinary vertex must be set first, before the extended vertices can be set.

Definition at line 32 of file nurbsVertex.cxx.

◆ set_space() [1/2]

void NurbsVertex::set_space ( const NodePath space)
inline

Sets the space of this vertex as a fixed NodePath.

Definition at line 69 of file nurbsVertex.I.

◆ set_space() [2/2]

void NurbsVertex::set_space ( const std::string &  space)
inline

Sets the space of this vertex as a relative path from the rel_to node.

Definition at line 78 of file nurbsVertex.I.

◆ set_vertex()

void NurbsVertex::set_vertex ( const LVecBase4 &  vertex)
inline

Definition at line 53 of file nurbsVertex.I.


The documentation for this class was generated from the following files: