Loading...
Searching...
No Matches
HdBasisCurvesTopology Class Reference

Topology data for basisCurves. More...

#include <basisCurvesTopology.h>

Inherits HdTopology.

Public Member Functions

HD_API HdBasisCurvesTopology (const HdBasisCurvesTopology &src)
 
HD_API HdBasisCurvesTopology (const TfToken &curveType, const TfToken &curveBasis, const TfToken &curveWrap, const VtIntArray &curveVertexCounts, const VtIntArray &curveIndices)
 
VtIntArray const & GetCurveVertexCounts () const
 Returns segment vertex counts.
 
VtIntArray const & GetCurveIndices () const
 Returns indices.
 
size_t GetNumCurves () const
 Returns the number of curves.
 
HD_API size_t GetNumPoints () const
 Returns the number of points implied by vertex counts and indices.
 
TfToken GetCurveType () const
 See class documentation for valid combination of values.
 
TfToken GetCurveBasis () const
 
TfToken GetCurveWrap () const
 
bool HasIndices () const
 Does the topology use an index buffer.
 
virtual HD_API ID ComputeHash () const
 Returns the hash value of this topology to be used for instancing.
 
HD_API bool operator== (HdBasisCurvesTopology const &other) const
 Equality check between two basisCurves topologies.
 
HD_API bool operator!= (HdBasisCurvesTopology const &other) const
 
HD_API size_t CalculateNeededNumberOfControlPoints () const
 Figure out how many vertices / control points this topology references.
 
HD_API size_t CalculateNeededNumberOfVaryingControlPoints () const
 Figure out how many control points with varying data this topology needs.
 
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
 

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.

Member Function Documentation

◆ CalculateNeededNumberOfControlPoints()

HD_API size_t CalculateNeededNumberOfControlPoints ( ) const

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

◆ CalculateNeededNumberOfVaryingControlPoints()

HD_API size_t CalculateNeededNumberOfVaryingControlPoints ( ) const

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

◆ ComputeHash()

virtual HD_API ID ComputeHash ( ) const
virtual

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

◆ GetCurveBasis()

TfToken GetCurveBasis ( ) const
inline

Definition at line 141 of file basisCurvesTopology.h.

◆ GetCurveIndices()

VtIntArray const & GetCurveIndices ( ) const
inline

Returns indices.

Definition at line 124 of file basisCurvesTopology.h.

◆ GetCurveType()

TfToken GetCurveType ( ) const
inline

See class documentation for valid combination of values.

Definition at line 140 of file basisCurvesTopology.h.

◆ GetCurveVertexCounts()

VtIntArray const & GetCurveVertexCounts ( ) const
inline

Returns segment vertex counts.

Definition at line 119 of file basisCurvesTopology.h.

◆ GetCurveWrap()

TfToken GetCurveWrap ( ) const
inline

Definition at line 142 of file basisCurvesTopology.h.

◆ GetInvisibleCurves()

HD_API VtIntArray const & GetInvisibleCurves ( ) const
inline

Definition at line 113 of file basisCurvesTopology.h.

◆ GetInvisiblePoints()

HD_API VtIntArray const & GetInvisiblePoints ( ) const
inline

Definition at line 103 of file basisCurvesTopology.h.

◆ GetNumCurves()

size_t GetNumCurves ( ) const
inline

Returns the number of curves.

Definition at line 129 of file basisCurvesTopology.h.

◆ GetNumPoints()

HD_API size_t GetNumPoints ( ) const
inline

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

Definition at line 135 of file basisCurvesTopology.h.

◆ HasIndices()

bool HasIndices ( ) const
inline

Does the topology use an index buffer.

Definition at line 145 of file basisCurvesTopology.h.

◆ operator==()

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

Equality check between two basisCurves topologies.

◆ SetInvisibleCurves()

HD_API void SetInvisibleCurves ( VtIntArray const &  invisibleCurves)
inline

Definition at line 108 of file basisCurvesTopology.h.

◆ SetInvisiblePoints()

HD_API void SetInvisiblePoints ( VtIntArray const &  invisiblePoints)
inline

Definition at line 98 of file basisCurvesTopology.h.


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