3ds Max C++ API Reference
|
#include <MaxOpenVDBInterface.h>
Public Types | |
enum | FilterType { kFilterTypeGaussian = 0 , kFilterTypeMedian , kFilterTypeMean , kTotalFilterTypes } |
enum | BooleanOperationType { kBooleanTypeUnion = 0 , kBooleanTypeAMinusB , kBooleanTypeIntersection , kTotalBooleanOperationTypes } |
enum | VDBGridType { kGridTypeUnknown = 0 , kGridTypeLevelSet = 1 , kGridTypeFogVolume = 2 , kGridTypeStaggered = 3 , kTotalVDBGridTypes } |
![]() | |
enum | LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled } |
Public Member Functions | |
MaxOpenVDBInterface () | |
virtual | ~MaxOpenVDBInterface () |
virtual bool | PrepareVolume (VDBHandle &handle, float voxelSize=1.0f, float halfWidth=DEFAULT_VDB_HALFWIDTH)=0 |
Prepare an OpenVDB volume and return a handle to it. | |
virtual bool | CloneVolume (VDBHandle fromHandle, VDBHandle &cloneHandle)=0 |
Copy one OpenVDB volume to another. | |
virtual bool | VolumeFileInfo (const TSTR &filename, int &numberOfGrids, IntTab &gridTypes)=0 |
Retrieve information from an OpenVDB .vdb file. | |
virtual bool | LoadVolume (VDBHandle handle, const TSTR &filename, int index=0)=0 |
Loads a volume grid from a .vdb file. | |
virtual bool | SaveVolume (VDBHandle handle, const TSTR &filename, const TSTR &gridName)=0 |
Save an OpenVDB volume to a .vdb file. | |
virtual bool | DisposeVolume (VDBHandle handle)=0 |
Delete an OpenVDB volume from memory. | |
virtual bool | VolumeBoolean (VDBHandle handleA, VDBHandle handleB, BooleanOperationType operation)=0 |
Perform a Boolean operation on OpenVDB volumes. | |
virtual bool | DilateVolume (VDBHandle gridHandle, float amount, VDBHandle maskHandle=-1)=0 |
Dilate a volume by a given amount, with optional masking. | |
virtual bool | ErodeVolume (VDBHandle gridHandle, float amount, VDBHandle maskHandle=-1)=0 |
Erode a volume by a given amount, with optional masking. | |
virtual bool | FilterVolume (VDBHandle gridHandle, FilterType type, int width, VDBHandle maskHandle=-1)=0 |
Perform filtering (smoothing) on a volume. | |
virtual bool | ClearVolume (VDBHandle handle)=0 |
Clears a volume to empty. | |
virtual bool | VolumeToMesh (VDBHandle handle, ::Mesh &meshOut, const Matrix3 &tm=Matrix3(), float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Convert a volume to a mesh. | |
virtual bool | CreateMask (VDBHandle gridHandle, float voxelSize, const Matrix3 &tm, float threshold, Texmap *map, TimeValue t, VDBHandle maskHandle)=0 |
Create a mask volume to match a given volume. | |
virtual bool | PointsSRToVolume (const Tab< Point3 * > &points, float radius, float voxelSize, VDBHandle handle)=0 |
Creates an SDF volume containing points of a fixed size. | |
virtual bool | PointsSRToVolume (const Tab< Point3 > &points, float radius, float voxelSize, VDBHandle handle)=0 |
Creates an SDF volume containing points of a fixed size. | |
virtual bool | PointsMRToVolume (const Tab< Point3 * > &points, const Tab< float > &radii, float voxelSize, VDBHandle handle)=0 |
Creates an SDF volume containing points of varying sizes. | |
virtual bool | PointsMRToVolume (const Tab< Point3 > &points, const Tab< float > &radii, float voxelSize, VDBHandle handle)=0 |
Creates an SDF volume containing points of varying sizes. | |
virtual bool | MeshToVolume (const ::Mesh &meshIn, float voxelSize, int handle, const Matrix3 &tm=Matrix3())=0 |
Converts a mesh to a volume. | |
virtual bool | PointsSRToMesh (const Tab< Point3 * > &points, float radius, float voxelSize, ::Mesh &meshOut, float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Creates an SDF volume containing points of a fixed size and outputs the result to a mesh. | |
virtual bool | PointsSRToMesh (const Tab< Point3 > &points, float radius, float voxelSize, ::Mesh &meshOut, float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Creates an SDF volume containing points of a fixed size and outputs the result to a mesh. | |
virtual bool | PointsMRToMesh (const Tab< Point3 * > &points, const Tab< float > &radii, float voxelSize, ::Mesh &meshOut, float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Creates an SDF volume containing points of varying sizes and outputs the result to a mesh. | |
virtual bool | PointsMRToMesh (const Tab< Point3 > &points, const Tab< float > &radii, float voxelSize, ::Mesh &meshOut, float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Creates an SDF volume containing points of varying sizes and outputs the result to a mesh. | |
virtual bool | MeshToVolumeToMesh (const ::Mesh &meshIn, float voxelSize, ::Mesh &meshOut, float adaptivity=0.0f, bool relaxDisoriented=false)=0 |
Converts a mesh to a volume then back to a mesh (round trip) | |
virtual bool | TestPointInsideLevelSet (VDBHandle gridHandle, const Point3 &point, bool &insideVolumeOut)=0 |
Test whether a given point in space is inside a level set. | |
virtual bool | TestPointsInsideLevelSet (VDBHandle gridHandle, const Tab< Point3 > &points, BitArray &insideVolumeOut)=0 |
Test a set of points in space to see which are inside a level set. | |
virtual bool | TestPointsInsideLevelSet (VDBHandle gridHandle, const Tab< Point3 * > &points, BitArray &insideVolumeOut)=0 |
Test a set of points in space to see which are inside a level set. | |
![]() | |
CoreExport | FPInterfaceDesc () |
CoreExport | FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...) |
CoreExport | ~FPInterfaceDesc () |
virtual void | Init () |
LifetimeType | LifetimeControl () |
virtual BaseInterface * | GetInterface (Interface_ID id) |
CoreExport void | LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...) |
CoreExport void | AppendFunction (int id,...) |
Add a new function to this interface descriptor. | |
CoreExport void | AppendProperty (int id,...) |
Add a new property to this interface descriptor. | |
CoreExport void | AppendEnum (int id,...) |
Add a new enum to this interface descriptor. | |
CoreExport void | SetClassDesc (ClassDesc *i_cd) |
CoreExport va_list | check_fn (va_list ap, int id) |
CoreExport va_list | scan_fn (va_list ap, int id, int index) |
CoreExport va_list | check_prop (va_list ap, int id) |
CoreExport va_list | scan_prop (va_list ap, int id, int index) |
CoreExport va_list | check_enum (va_list ap, EnumID id) |
CoreExport va_list | scan_enum (va_list ap, EnumID id, int index) |
FPInterfaceDesc * | GetDesc () |
Interface_ID | GetID () |
CoreExport FPFunctionDef * | GetFnDef (FunctionID fid) |
ActionTable * | GetActionTable () |
CoreExport void | EnableActions (BOOL onOff) |
virtual CoreExport HINSTANCE | HInstance () |
virtual CoreExport const MCHAR * | GetRsrcString (StringResID id) |
![]() | |
virtual BaseInterface * | GetInterface (Interface_ID id) |
virtual FPInterfaceDesc * | GetDesc ()=0 |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPParams *params) |
virtual CoreExport FPStatus | Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL) |
virtual FPStatus | Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL) |
virtual CoreExport FunctionID | FindFn (const MCHAR *name) |
virtual CoreExport BOOL | IsEnabled (FunctionID actionID) |
virtual CoreExport BOOL | IsChecked (FunctionID actionID) |
virtual CoreExport BOOL | IsVisible (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsEnabled (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsChecked (FunctionID actionID) |
virtual CoreExport FunctionID | GetIsVisible (FunctionID actionID) |
virtual ActionTable * | GetActionTable () |
virtual void | EnableActions (BOOL onOff) |
![]() | |
virtual UtilExport | ~BaseInterface () |
Destructor. | |
UtilExport BaseInterface * | GetInterface (Interface_ID id) override |
virtual UtilExport Interface_ID | GetID () |
virtual LifetimeType | LifetimeControl () |
virtual bool | RegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual void | UnRegisterNotifyCallback (InterfaceNotifyCallback *incb) |
virtual BaseInterface * | AcquireInterface () |
virtual void | ReleaseInterface () |
virtual void | DeleteInterface () |
virtual BaseInterface * | CloneInterface (void *remapDir=nullptr) |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size) |
New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
static UtilExport void * | operator 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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
static UtilExport void * | operator new (size_t size, void *placement_ptr) |
Placement new operator. | |
static UtilExport void | operator delete (void *ptr, void *placement_ptr) |
Placement delete operator. | |
static UtilExport void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. | |
static UtilExport void * | aligned_realloc (void *ptr, size_t size, size_t alignment) |
Reallocates memory on a specified alignment boundary. | |
static UtilExport void | aligned_free (void *ptr) |
Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. | |
![]() | |
Interface_ID | ID |
MSTR | internal_name |
StringResID | description |
ClassDesc * | cd |
USHORT | flags |
Tab< FPFunctionDef * > | functions |
Tab< FPPropDef * > | props |
Tab< FPEnum * > | enumerations |
MSPluginClass * | pc |
Rollout * | rollout |
ActionTable * | action_table |
![]() | |
static CoreExport FPInterfaceDesc | nullInterface |
![]() | |
CoreExport void | load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap) |
![]() | |
virtual FPStatus | _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p) |
enum FilterType |
Enumerator | |
---|---|
kFilterTypeGaussian | |
kFilterTypeMedian | |
kFilterTypeMean | |
kTotalFilterTypes |
enum BooleanOperationType |
Enumerator | |
---|---|
kBooleanTypeUnion | |
kBooleanTypeAMinusB | |
kBooleanTypeIntersection | |
kTotalBooleanOperationTypes |
enum VDBGridType |
Enumerator | |
---|---|
kGridTypeUnknown | |
kGridTypeLevelSet | |
kGridTypeFogVolume | |
kGridTypeStaggered | |
kTotalVDBGridTypes |
|
inline |
|
inlinevirtual |
|
pure virtual |
Prepare an OpenVDB volume and return a handle to it.
handle | (out) Unique handle that will refer to this volume. Use DisposeVolume to dispose of the volume when you are finished with it. NOTE: All volumes are automatically disposed of on Max reset. |
voxelSize | (in) The voxel size that this volume uses |
halfWidth | (in) The half-width for the level set |
Copy one OpenVDB volume to another.
fromHandle | The handle of the VDB volume to clone |
cloneHandle | (out) Unique handle that will refer to the volume's clone |
|
pure virtual |
Retrieve information from an OpenVDB .vdb file.
filename | (in) The .vdb file name |
numberOfGrids | Returns the number of grids in the .vdb file |
gridTypes | Returns a table with a grid type per grid in the file |
Loads a volume grid from a .vdb file.
handle | (in) Handle of the VDB volume that will receive the loaded grid |
filename | (in) The .vdb file name |
index | (in) The index of the grid to load into the volume |
|
pure virtual |
Save an OpenVDB volume to a .vdb file.
handle | (in) Handle of the VDB volume that contains the grid to save |
filename | (in) The .vdb file name |
gridName | (in) The name to assign the volume grid in the .vdb file |
|
pure virtual |
Delete an OpenVDB volume from memory.
handle | Handle of the VDB volume to delete |
|
pure virtual |
Perform a Boolean operation on OpenVDB volumes.
handleA | Handle of the VDB volume that contains operand A and will receive the result |
handleB | Handle of the VDB volume that contains operand B; empty after the operation. |
operation | The Boolean operation type. |
|
pure virtual |
Dilate a volume by a given amount, with optional masking.
gridHandle | Handle of the VDB volume that will be dilated |
amount | Amount to dilate the volume |
maskHandle | (Optional) Handle to a volume containing masking data (0-1); should match gridHandle volume topology. |
|
pure virtual |
Erode a volume by a given amount, with optional masking.
gridHandle | Handle of the VDB volume that will be eroded |
amount | Amount to erode the volume |
maskHandle | (Optional) Handle to a volume containing masking data (0-1); should match gridHandle volume topology. |
|
pure virtual |
Perform filtering (smoothing) on a volume.
gridHandle | Handle of the VDB volume that will be filtered |
type | The filter type to use. |
width | The width to use in filtering |
maskHandle | (Optional) Handle to a volume containing masking data (0-1); should match gridHandle volume topology. |
|
pure virtual |
Clears a volume to empty.
handle | Handle of the VDB volume that will be cleared |
|
pure virtual |
Convert a volume to a mesh.
handle | Handle of the VDB volume that will be meshed |
meshOut | (out) The Mesh that will receive the meshed result |
tm | (in) The transform of the volume |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Create a mask volume to match a given volume.
gridHandle | Handle of the VDB volume that the mask will be created for |
voxelSize | The voxel size to use in the meshing operation |
tm | (in) The transform of the volume |
threshold | The threshold value for the map |
map | (in) The texmap that will be the source of the mask data |
t | The time to use for the Texmap sampling |
maskHandle | The Mesh that will receive the resulting mask data |
|
pure virtual |
Creates an SDF volume containing points of a fixed size.
points | (in) A table of Point3 pointers, one per point |
radius | The radius to use for all points |
voxelSize | The voxelsize to use for the volume |
handle | The handle of the volume that will receive the resulting data |
|
pure virtual |
Creates an SDF volume containing points of a fixed size.
points | (in) A table of Point3s, one per point |
radius | The radius to use for all points |
voxelSize | The voxelsize to use for the volume |
handle | The handle of the volume that will receive the resulting data |
|
pure virtual |
Creates an SDF volume containing points of varying sizes.
points | (in) A table of Point3 pointers, one per point |
radii | (in) Table of radii, one per point |
voxelSize | The voxelsize to use for the volume |
handle | The handle of the volume that will receive the resulting data |
|
pure virtual |
Creates an SDF volume containing points of varying sizes.
points | (in) A table of Point3s, one per point |
radii | (in) Table of radii, one per point |
voxelSize | The voxelsize to use for the volume |
handle | The handle of the volume that will receive the resulting data |
|
pure virtual |
Converts a mesh to a volume.
meshIn | (in) A mesh to convert to a volume |
voxelSize | The voxelsize to use for the volume |
handle | The handle of the volume that will receive the resulting data |
tm | (in) Transform to apply to the mesh |
|
pure virtual |
Creates an SDF volume containing points of a fixed size and outputs the result to a mesh.
points | (in) A table of Point3 pointers, one per point |
radius | The radius to use for all points |
voxelSize | The voxelsize to use for the volume |
meshOut | (out) The mesh that will receive the resulting data |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Creates an SDF volume containing points of a fixed size and outputs the result to a mesh.
points | (in) A table of Point3s, one per point |
radius | The radius to use for all points |
voxelSize | The voxelsize to use for the volume |
meshOut | (out) The mesh that will receive the resulting data |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Creates an SDF volume containing points of varying sizes and outputs the result to a mesh.
points | (in) A table of Point3 pointers, one per point |
radii | (in) Table of radii, one per point |
voxelSize | The voxelsize to use for the volume |
meshOut | (out) The mesh that will receive the resulting data |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Creates an SDF volume containing points of varying sizes and outputs the result to a mesh.
points | (in) A table of Point3s, one per point |
radii | (in) Table of radii, one per point |
voxelSize | The voxelsize to use for the volume |
meshOut | (out) The mesh that will receive the resulting data |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Converts a mesh to a volume then back to a mesh (round trip)
meshIn | (in) The mesh to convert |
voxelSize | The voxelsize to use for the volume |
meshOut | (out) The mesh that will receive the resulting data (may be the same as the input mesh) |
adaptivity | The amount of adaptivity to apply during meshing (0-1) |
relaxDisoriented | When true, relaxes disoriented triangles during adaptive meshing |
|
pure virtual |
Test whether a given point in space is inside a level set.
gridHandle | Handle of the VDB volume to test |
point | (in) The point to test |
insideVolumeOut | (out) Returns true if the point is inside the level set; false if not |
|
pure virtual |
Test a set of points in space to see which are inside a level set.
gridHandle | Handle of the VDB volume to test |
points | (in) A table of the points to test |
insideVolumeOut | (out) Returns a BitArray where the corresponding bit for each supplied point is TRUE if the point is inside the level set; FALSE if not |
|
pure virtual |
Test a set of points in space to see which are inside a level set.
gridHandle | Handle of the VDB volume to test |
points | (in) A table of pointers to the points to test |
insideVolumeOut | (out) Returns a BitArray where the corresponding bit for each supplied point is TRUE if the point is inside the level set; FALSE if not |