HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdBasisCurvesTopology Class Reference

#include <basisCurvesTopology.h>

+ Inheritance diagram for HdBasisCurvesTopology:

Public Member Functions

HD_API HdBasisCurvesTopology ()
 
HD_API HdBasisCurvesTopology (const HdBasisCurvesTopology &src)
 
HD_API HdBasisCurvesTopology (const TfToken &curveType, const TfToken &curveBasis, const TfToken &curveWrap, const VtIntArray &curveVertexCounts, const VtIntArray &curveIndices)
 
virtual HD_API ~HdBasisCurvesTopology ()
 
VtIntArray const & GetCurveVertexCounts () const
 Returns segment vertex counts. More...
 
VtIntArray const & GetCurveIndices () const
 Returns indices. More...
 
size_t GetNumCurves () const
 Returns the number of curves. More...
 
HD_API size_t GetNumPoints () const
 Returns the number of points implied by vertex counts and indices. More...
 
TfToken GetCurveType () const
 See class documentation for valid combination of values. More...
 
TfToken GetCurveBasis () const
 
TfToken GetCurveWrap () const
 
bool HasIndices () const
 Does the topology use an index buffer. More...
 
virtual HD_API ID ComputeHash () const
 Returns the hash value of this topology to be used for instancing. More...
 
HD_API bool operator== (HdBasisCurvesTopology const &other) const
 Equality check between two basisCurves topologies. More...
 
HD_API bool operator!= (HdBasisCurvesTopology const &other) const
 
HD_API size_t CalculateNeededNumberOfControlPoints () const
 Figure out how many vertices / control points this topology references. More...
 
HD_API size_t CalculateNeededNumberOfVaryingControlPoints () const
 Figure out how many control points with varying data this topology needs. More...
 
Topological invisibility
HD_API void SetInvisiblePoints (VtIntArray const &invisiblePoints)
 
HD_API VtIntArray const & GetInvisiblePoints () const
 
HD_API void SetInvisibleCurves (VtIntArray const &invisibleCurves)
 
HD_API VtIntArray const & GetInvisibleCurves () const
 
- Public Member Functions inherited from HdTopology
 HdTopology ()
 
virtual ~HdTopology ()
 

Additional Inherited Members

- Public Types inherited from HdTopology
typedef uint64_t ID
 

Detailed Description

Topology data for basisCurves.

HdBasisCurvesTopology holds the raw input topology data for basisCurves

The Type, Basis and Wrap mode combined describe the curve and it's segments.

If Type == linear, the curve is a bunch of line segments and basis is ignored.

The wrap mode defines how the curve segments are specified:

If Wrap == segmented, this is equivalent to GL_LINES and curve vertex counts is 2 * number of segments (multiple entries in curve vertex array is optional).

If Wrap == nonperiodic, this is equivalent to GL_LINE_STRIP and curve counts is an array where each entry is the number of vertices in that line segment. The first and last vertex in the segment are not joined.

If Wrap == periodic, this is equivalent to GL_LINE_LOOP and curve counts is an array where each entry is the number of vertices in that line segment. An additional line is place between the first and last vertex in each segment.

If Type == cubic, the type of curve is specified by basis: The Basis can be bezier, bspline, catmullRom, or centripetalCatmullRom.

Wrap can be either periodic or nonperiodic (segmented is unsupported).

For each type of line, the generated vertex indices can pass through an optional index buffer to map the generated indices to actual indices in the vertex buffer.

Definition at line 76 of file basisCurvesTopology.h.

Constructor & Destructor Documentation

HD_API HdBasisCurvesTopology::HdBasisCurvesTopology ( )
HD_API HdBasisCurvesTopology::HdBasisCurvesTopology ( const HdBasisCurvesTopology src)
HD_API HdBasisCurvesTopology::HdBasisCurvesTopology ( const TfToken curveType,
const TfToken curveBasis,
const TfToken curveWrap,
const VtIntArray &  curveVertexCounts,
const VtIntArray &  curveIndices 
)
virtual HD_API HdBasisCurvesTopology::~HdBasisCurvesTopology ( )
virtual

Member Function Documentation

HD_API size_t HdBasisCurvesTopology::CalculateNeededNumberOfControlPoints ( ) const

Figure out how many vertices / control points this topology references.

HD_API size_t HdBasisCurvesTopology::CalculateNeededNumberOfVaryingControlPoints ( ) const

Figure out how many control points with varying data this topology needs.

virtual HD_API ID HdBasisCurvesTopology::ComputeHash ( ) const
virtual

Returns the hash value of this topology to be used for instancing.

Implements HdTopology.

TfToken HdBasisCurvesTopology::GetCurveBasis ( ) const
inline

Definition at line 141 of file basisCurvesTopology.h.

VtIntArray const& HdBasisCurvesTopology::GetCurveIndices ( ) const
inline

Returns indices.

Definition at line 124 of file basisCurvesTopology.h.

TfToken HdBasisCurvesTopology::GetCurveType ( ) const
inline

See class documentation for valid combination of values.

Definition at line 140 of file basisCurvesTopology.h.

VtIntArray const& HdBasisCurvesTopology::GetCurveVertexCounts ( ) const
inline

Returns segment vertex counts.

Definition at line 119 of file basisCurvesTopology.h.

TfToken HdBasisCurvesTopology::GetCurveWrap ( ) const
inline

Definition at line 142 of file basisCurvesTopology.h.

HD_API VtIntArray const& HdBasisCurvesTopology::GetInvisibleCurves ( ) const
inline

Definition at line 113 of file basisCurvesTopology.h.

HD_API VtIntArray const& HdBasisCurvesTopology::GetInvisiblePoints ( ) const
inline

Definition at line 103 of file basisCurvesTopology.h.

size_t HdBasisCurvesTopology::GetNumCurves ( ) const
inline

Returns the number of curves.

Definition at line 129 of file basisCurvesTopology.h.

HD_API size_t HdBasisCurvesTopology::GetNumPoints ( ) const
inline

Returns the number of points implied by vertex counts and indices.

Definition at line 135 of file basisCurvesTopology.h.

bool HdBasisCurvesTopology::HasIndices ( ) const
inline

Does the topology use an index buffer.

Definition at line 145 of file basisCurvesTopology.h.

HD_API bool HdBasisCurvesTopology::operator== ( HdBasisCurvesTopology const &  other) const

Equality check between two basisCurves topologies.

HD_API void HdBasisCurvesTopology::SetInvisibleCurves ( VtIntArray const &  invisibleCurves)
inline

Definition at line 108 of file basisCurvesTopology.h.

HD_API void HdBasisCurvesTopology::SetInvisiblePoints ( VtIntArray const &  invisiblePoints)
inline

Definition at line 98 of file basisCurvesTopology.h.


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