RenderMan API  23.0
RixSGCurves Class Referenceabstract

#include <RixSceneGraph.h>

Inheritance diagram for RixSGCurves:
RixSGGeometry RixSGGroup

Public Member Functions

virtual RixSGError Define (RtUString type, RtUString wrap, RtUString basis, int32_t ncurves, int32_t npoints)=0
 
- Public Member Functions inherited from RixSGGeometry
virtual RtUString Geometry () const =0
 Return geometry type. More...
 
virtual RixSGError SetGeometry (RtUString type)=0
 
virtual RtParamList const & GetPrimVars () const =0
 
virtual RixSGError SetPrimVars (RtParamList const &primvars)=0
 
- Public Member Functions inherited from RixSGGroup
virtual RixSGDagType GetDagType () const =0
 
virtual RtUString GetIdentifier () const =0
 
virtual RixSGError SetIdentifier (RtUString identifier)=0
 
virtual RixSGError SetTransform (unsigned numsamples, RtMatrix4x4 const *xforms, float const *times)=0
 
virtual RixSGError SetTransformNumSamples (unsigned numsamples)=0
 
virtual RixSGError SetTransformSample (unsigned sample, RtMatrix4x4 const &xform, float time)=0
 
RixSGError SetTransform (RtMatrix4x4 const &xform)
 
RixSGError SetIdentity ()
 
virtual RixSGError SetHidden (int state)=0
 
virtual int GetHidden () const =0
 
virtual RixSGError AddCoordinateSystem (RixSGGroup *coordsys)=0
 
virtual RixSGError RemoveCoordinateSystem (RixSGGroup *coordsys)=0
 
virtual unsigned GetNumCoordinateSystems () const =0
 
virtual RixSGGroupGetCoordinateSystem (unsigned idx) const =0
 
virtual RixSGError AddChild (RixSGGroup *child)=0
 
virtual RixSGError RemoveChild (RixSGGroup *child)=0
 
virtual unsigned GetNumChildren () const =0
 
virtual RixSGGroupGetChild (unsigned idx) const =0
 
virtual unsigned GetNumParents () const =0
 
virtual RixSGGroupGetParent (unsigned idx) const =0
 
virtual RixSGGroupFindDagNode (char const *path) const =0
 
virtual RixSGMaterialGetMaterial () const =0
 
virtual RixSGError SetMaterial (RixSGMaterial *material)=0
 
virtual RixSGError OverrideMaterial (RixSGMaterial *material, unsigned depth, RixSGGroup **path)=0
 
virtual RtParamList const & GetAttributes () const =0
 
virtual RixSGError SetAttributes (RtParamList const &attributes)=0
 
virtual RixSGError SetNested (bool state)=0
 
virtual bool GetNested () const =0
 
virtual RixSGError SetInheritTransform (bool value)=0
 
 RixSGGroup ()=default
 
virtual ~RixSGGroup ()=default
 

Protected Member Functions

 RixSGCurves ()=default
 
virtual ~RixSGCurves ()=default
 
- Protected Member Functions inherited from RixSGGeometry
 RixSGGeometry ()=default
 
virtual ~RixSGGeometry ()=default
 

Detailed Description

Curves

Definition at line 1015 of file RixSceneGraph.h.

Constructor & Destructor Documentation

◆ RixSGCurves()

RixSGCurves::RixSGCurves ( )
inlineprotecteddefault

◆ ~RixSGCurves()

virtual RixSGCurves::~RixSGCurves ( )
protectedvirtualdefault

Member Function Documentation

◆ Define()

virtual RixSGError RixSGCurves::Define ( RtUString  type,
RtUString  wrap,
RtUString  basis,
int32_t  ncurves,
int32_t  npoints 
)
pure virtual

Define curves geometry

Define ncurves number of tube or ribbon-like curves. Multiple disconnected individual curves may be specified with by one curves object. The parameter ncurves is the number of individual curves specified and npoints is the total number of curve control points. The interpolation method given by type can be either "linear" or "cubic". Cubic curves interpolate using the v basis matrix and step size defined by basis. Supported basis values are "bezier", "b-spline", "catmull-rom", "hermite", or "power". Curves may wrap in v direction, depending on whether wrap is "periodic" or "nonperiodic". Curves that wrap close upon themselves at the ends and the first control points will be automatically repeated. As many as three control points may be repeated, depending on the basis matrix of the curve.

Detail type Size
constant 1
uniform ncurves
vertex npoints
varying, nonperiodic Σ(nsegsi + 1)
varying, periodic Σnsegsi
facevarying, nonperiodic Σ(nsegsi + 1)
facevarying, periodic Σnsegsi

Where nsegsi is the number of segments of the ith curve defined as:

Curve type and wrap nsegsi
linear, nonperiodic nverticesi - 1
linear, periodic nverticesi
cubic, nonperiodic (nverticesi - 4) / vstep + 1
cubic, periodic nverticesi / vstep

Expanding the above for the supported basis give the following varying/facevarying sizes:

Curve basis Nonperiodic size Periodic size
linear npoints npoints
bezier (npoints - 4 * ncurves) / 3 + 2 * ncurves npoints / 3
b-spline npoints - 2 * ncurves npoints
catmull-rom npoints - 2 * ncurves npoints
hermite (npoints - 4 * ncurves) / 2 + 2 * ncurves npoints / 2
power (npoints - 4 * ncurves) / 4 + 2 * ncurves npoints / 4
Parameters
[in]typeCurve type: "linear" or "cubic"
[in]wrapWrap mode: "periodic" or "nonperiodic"
[in]basisSupported basis are: "bezier", "b-spline", "catmull-rom", "hermite", and "power"
[in]ncurvesThe number of curves
[in]npointsThe total number of vertices
Returns
Error code

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