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 LVecBase4get_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 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 36 of file nurbsVertex.h.

Member Function Documentation

◆ get_extended_vertex()

PN_stdfloat NurbsVertex::get_extended_vertex ( int  d) const

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

References get_extended_vertex().

Referenced by NurbsSurfaceEvaluator::set_extended_vertex(), and NurbsSurfaceEvaluator::set_extended_vertices().

◆ 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 86 of file nurbsVertex.I.

Referenced by NurbsSurfaceEvaluator::set_vertex_space().

◆ set_space() [2/2]

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

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

Definition at line 98 of file nurbsVertex.I.

References NodePath::find().


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