OpenSubdivParameters Class Reference

OpenSubdivParameters Class Referenceabstract

#include <OSDParamInterface.h>

Class Description

If a renderer or other plugin wants to determine if an object is using Pixar's OpenSubdiv to perform subdivision, it can use the GetInterface method to query the INode for the OSD_PARAMETER_INTERFACE interface.

If the node contains an object that uses OpenSubdiv, it will return a pointer to this interface class, otherwise it will return NULL.

Once you have a valid pointer, you can use this class to retrieve the parameters for OpenSubdiv's subdivision operations for that node.

+ Inheritance diagram for OpenSubdivParameters:

Public Types

enum  VertexBoundary { VBOUND_INTERP_EDGES =0, VBOUND_INTERP_EDGES_CORNERS }
 These enums describe how the geometery will be subdivided by OpenSubdiv. More...
 
enum  VaryingBoundary { FBOUND_BILINEAR =0, FBOUND_SMOOTH_EDGE, FBOUND_SMOOTH_EDGE_CORNER, FBOUND_SMOOTH_SHARP }
 These enums describe how the varying data ie UV maps etc. More...
 
enum  CreaseMode { CREASE_NORMAL =0, CREASE_CHAIKIN }
 These enums describe how creases are handled by OpenSubdiv. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

 OpenSubdivParameters ()
 
virtual ~OpenSubdivParameters ()
 
virtual unsigned int TessellationLevel (TimeValue t, Interval &valid)=0
 Get the tessellation level of this object. More...
 
virtual OpenSubdivParameters::VertexBoundary InterpolateBoundaryVert ()=0
 Get the OpenSubdiv Vertex Boundary parameter. More...
 
virtual OpenSubdivParameters::VaryingBoundary InterpolateBoundaryFVar ()=0
 Get the OpenSubdiv Varying Boundary parameter. More...
 
virtual OpenSubdivParameters::CreaseMode CreaseMethod ()=0
 Get the OpenSubdiv Crease Mode parameter. More...
 
virtual bool SmoothTriangle ()=0
 Get the OpenSubdiv Smooth Triangle parameter. More...
 
virtual bool PropagateCorners ()=0
 Get the OpenSubdiv Propagate Corners parameter. More...
 
virtual bool Adaptive ()=0
 Get the OpenSubdiv Adaptive parameter. More...
 
virtual unsigned int AdaptiveTessellationLevel (TimeValue t, Interval &valid)=0
 Get the OpenSubdiv Adaptive Tessellation parameter. More...
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual UtilExport Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Member Enumeration Documentation

These enums describe how the geometery will be subdivided by OpenSubdiv.

They match the parameter values OpenSubdiv uses internally.

Enumerator
VBOUND_INTERP_EDGES 
VBOUND_INTERP_EDGES_CORNERS 
38  {
41  };
Definition: OSDParamInterface.h:40
Definition: OSDParamInterface.h:39

These enums describe how the varying data ie UV maps etc.

will be subdivided by OpenSubdiv. They match the parameter values OpenSubdiv uses internally.

Enumerator
FBOUND_BILINEAR 
FBOUND_SMOOTH_EDGE 
FBOUND_SMOOTH_EDGE_CORNER 
FBOUND_SMOOTH_SHARP 
46  {
51  };
Definition: OSDParamInterface.h:49
Definition: OSDParamInterface.h:47
Definition: OSDParamInterface.h:48
Definition: OSDParamInterface.h:50
enum CreaseMode

These enums describe how creases are handled by OpenSubdiv.

They match the parameter values OpenSubdiv uses internally.

Enumerator
CREASE_NORMAL 
CREASE_CHAIKIN 
56  {
57  CREASE_NORMAL=0,
59  };
Definition: OSDParamInterface.h:58
Definition: OSDParamInterface.h:57

Constructor & Destructor Documentation

61 {}
virtual ~OpenSubdivParameters ( )
inlinevirtual
62 {}

Member Function Documentation

virtual unsigned int TessellationLevel ( TimeValue  t,
Interval valid 
)
pure virtual

Get the tessellation level of this object.

Parameters
t- The time at which to sample
valid- The validity interval to update. The intersection of the provided "valid" interval with the interval for the provided TimeValue and returned as the updated interval value.
Returns
For non-adaptive subdivision, this is the number of iterations. For adaptive subdivision, this is the secondary tessellation level.
virtual OpenSubdivParameters::VertexBoundary InterpolateBoundaryVert ( )
pure virtual

Get the OpenSubdiv Vertex Boundary parameter.

Returns
The OpenSubdiv VertexBoundary type to be used; see above enums
virtual OpenSubdivParameters::VaryingBoundary InterpolateBoundaryFVar ( )
pure virtual

Get the OpenSubdiv Varying Boundary parameter.

Returns
The OpenSubdiv VaryingBoundary type to be used; see above enums
virtual OpenSubdivParameters::CreaseMode CreaseMethod ( )
pure virtual

Get the OpenSubdiv Crease Mode parameter.

Returns
The OpenSubdiv CreaseMode type to be used; see above enums
virtual bool SmoothTriangle ( )
pure virtual

Get the OpenSubdiv Smooth Triangle parameter.

Returns
true if OpenSubdiv is to smooth triangles in its processing
virtual bool PropagateCorners ( )
pure virtual

Get the OpenSubdiv Propagate Corners parameter.

Returns
true if OpenSubdiv is to propagate corners in its processing
Adaptive ( )
pure virtual

Get the OpenSubdiv Adaptive parameter.

Returns
true if OpenSubdiv is to use adaptive subdivision in its processing
virtual unsigned int AdaptiveTessellationLevel ( TimeValue  t,
Interval valid 
)
pure virtual

Get the OpenSubdiv Adaptive Tessellation parameter.

Parameters
t- The time at which to sample
valid- The validity interval to update. The intersection of the provided "valid" interval with the interval for the provided TimeValue and returned as the updated interval value.
Returns
The maximum number of iterations for adaptive tessellation