OSDModifierInterface Class Reference

OSDModifierInterface Class Referenceabstract

#include <OSDModInterface.h>

Class Description

If a feature needs to determine and/or set the OpenSubdiv modifier's parameters, it can use the GetInterface method to query the Modifier for the OSD_MODIFIER_INTERFACE interface.

If the Modifier is an OpenSubdiv modifier, 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 and set the parameters for the OpenSubdiv modifier

+ Inheritance diagram for OSDModifierInterface:

Public Types

enum  OperationMode { OPMODE_CPU =0, OPMODE_GPU }
 These enums tell whether to use CPU or GPU computation for OpenSubdiv. More...
 
- Public Types inherited from OpenSubdivParameters
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

 OSDModifierInterface ()
 
virtual ~OSDModifierInterface ()
 
virtual void SetInterpolateBoundaryVert (OpenSubdivParameters::VertexBoundary type)=0
 Set the OpenSubdiv Vertex Boundary parameter. More...
 
virtual void SetInterpolateBoundaryFVar (OpenSubdivParameters::VaryingBoundary type)=0
 Set the OpenSubdiv Varying Boundary parameter. More...
 
virtual void SetCreaseMethod (OpenSubdivParameters::CreaseMode type)=0
 Set the OpenSubdiv Crease Mode parameter. More...
 
virtual void SetSmoothTriangle (bool sw)=0
 Set the OpenSubdiv Smooth Triangle parameter. More...
 
virtual void SetPropagateCorners (bool sw)=0
 Set the OpenSubdiv Propagate Corners parameter. More...
 
virtual void SetAdaptive (bool sw)=0
 Set the OpenSubdiv Adaptive parameter. More...
 
virtual void SetOperationMode (OSDModifierInterface::OperationMode mode)=0
 Set the operation mode. More...
 
virtual void SetRenderTessellationLevel (TimeValue t, unsigned int level)=0
 Set the uniform tessellation level of this object for the renderer. More...
 
virtual void SetGeneralTessellationLevel (TimeValue t, unsigned int level)=0
 Set the general uniform tessellation level of this object. More...
 
virtual void SetAdaptiveTessellationLevel (TimeValue t, unsigned int level)=0
 Set the OpenSubdiv Adaptive Tessellation level parameter. More...
 
- Public Member Functions inherited from OpenSubdivParameters
 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...
 

Member Enumeration Documentation

These enums tell whether to use CPU or GPU computation for OpenSubdiv.

Enumerator
OPMODE_CPU 
OPMODE_GPU 
36  {
37  OPMODE_CPU=0,
39  };
Definition: OSDModInterface.h:38
Definition: OSDModInterface.h:37

Constructor & Destructor Documentation

41 {}
virtual ~OSDModifierInterface ( )
inlinevirtual
42 {}

Member Function Documentation

virtual void SetInterpolateBoundaryVert ( OpenSubdivParameters::VertexBoundary  type)
pure virtual

Set the OpenSubdiv Vertex Boundary parameter.

Parameters
type- The OpenSubdiv VertexBoundary type to be used; see enums in OSDParamInterface.h
virtual void SetInterpolateBoundaryFVar ( OpenSubdivParameters::VaryingBoundary  type)
pure virtual

Set the OpenSubdiv Varying Boundary parameter.

Parameters
type- The OpenSubdiv VaryingBoundary type to be used; see enums in OSDParamInterface.h
virtual void SetCreaseMethod ( OpenSubdivParameters::CreaseMode  type)
pure virtual

Set the OpenSubdiv Crease Mode parameter.

Parameters
type- The OpenSubdiv CreaseMode type to be used; see enums in OSDParamInterface.h
virtual void SetSmoothTriangle ( bool  sw)
pure virtual

Set the OpenSubdiv Smooth Triangle parameter.

Parameters
sw- true if OpenSubdiv is to smooth triangles in its processing
virtual void SetPropagateCorners ( bool  sw)
pure virtual

Set the OpenSubdiv Propagate Corners parameter.

Parameters
sw- true if OpenSubdiv is to propagate corners in its processing
virtual void SetAdaptive ( bool  sw)
pure virtual

Set the OpenSubdiv Adaptive parameter.

Parameters
sw- true if OpenSubdiv is to use adaptive subdivision in its processing
virtual void SetOperationMode ( OSDModifierInterface::OperationMode  mode)
pure virtual

Set the operation mode.

Parameters
mode- The operation mode (see enums above)
virtual void SetRenderTessellationLevel ( TimeValue  t,
unsigned int  level 
)
pure virtual

Set the uniform tessellation level of this object for the renderer.

Parameters
t- The time at which to set
level- The number of iterations
virtual void SetGeneralTessellationLevel ( TimeValue  t,
unsigned int  level 
)
pure virtual

Set the general uniform tessellation level of this object.

Parameters
t- The time at which to set
level- The number of iterations
virtual void SetAdaptiveTessellationLevel ( TimeValue  t,
unsigned int  level 
)
pure virtual

Set the OpenSubdiv Adaptive Tessellation level parameter.

Parameters
t- The time at which to set
level- The maximum number of iterations for adaptive tessellation