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.

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 43 of file nurbsVertex.cxx.

◆ 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 33 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 70 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 79 of file nurbsVertex.I.


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