3ds Max C++ API Reference
Loading...
Searching...
No Matches
MaxVolumeInterfaceObject Class Referenceabstract

Generic interface class used to access Max volumes for rendering, etc. More...

#include <MaxVolumeInterface.h>

+ Inheritance diagram for MaxVolumeInterfaceObject:

Public Member Functions

 MaxVolumeInterfaceObject ()=default
 
virtual ~MaxVolumeInterfaceObject ()=default
 
virtual bool IsPrimaryGridFogVolume ()=0
 Query for primary volume type.
 
virtual void GetFogVolumeGridNames (MaxSDK::Array< MSTR > &fogVolumeGridNames)=0
 Fills in the array with the names of the fog volume grids (if any).
 
virtual void GetLevelSetGridNames (MaxSDK::Array< MSTR > &levelSetGridNames)=0
 Fills in the array with the names of the level set grids (if any).
 
virtual void GetVelocityGridNames (MaxSDK::Array< MSTR > &velocityGridNames)=0
 Fills in the array with the names of the velocity grids (if any).
 
virtual bool CanStreamCache () const
 Query the object to see if it has an in-memory OpenVDB grid cache that is capable of streaming.
 
virtual bool StreamGrids (std::ostringstream &streamOut, TimeValue t, Interval &valid)
 Ask the volume object to stream all of its grids to a cache.
 
virtual bool StreamGrids (const MaxSDK::Array< MSTR > &channelNames, std::ostringstream &streamOut, TimeValue t, Interval &valid)
 Ask the volume object to stream a specific set of its grids to a cache.
 
virtual bool HasDiskCache () const
 Query the object to see if it has its own cache file.
 
virtual MSTR GetDiskCache (TimeValue t, Interval &valid)
 If the object has its own cache file, this retrieves its name for a given time along with validity.
 
virtual bool BuildDiskCache (const MSTR &filename, TimeValue t, Interval &valid)
 If the object doesn't have its own cache file, this will build one with all grids for us, placing it in the specified filename.
 
virtual bool BuildDiskCache (const MaxSDK::Array< MSTR > &channelNames, const MSTR &filename, TimeValue t, Interval &valid)
 If the object doesn't have its own cache file, this will build one with all specified grids for us, placing it in the specified filename.
 
virtual MtlGetVolumeShader (TimeValue t)
 Get the shader assigned to this volume (if any).
 
virtual Box3 GetVolumeBBox (TimeValue t)=0
 Get the bounding box for the volume at the specified time.
 
virtual Interval VolumeObjectValidity (TimeValue t)
 Get the validity interval for the volume at the specified time.
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor.
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
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=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- 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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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 voidoperator 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 voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_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.
 

Detailed Description

Generic interface class used to access Max volumes for rendering, etc.

Constructor & Destructor Documentation

◆ MaxVolumeInterfaceObject()

◆ ~MaxVolumeInterfaceObject()

virtual ~MaxVolumeInterfaceObject ( )
virtualdefault

Member Function Documentation

◆ IsPrimaryGridFogVolume()

virtual bool IsPrimaryGridFogVolume ( )
pure virtual

Query for primary volume type.

Some volumes may be primarily level sets; others may be primarily fog volumes. This method lets the consumer query for this and, for example, only work with objects which are fog volumes.

Returns
true if the primary grid type is a fog volume.

◆ GetFogVolumeGridNames()

virtual void GetFogVolumeGridNames ( MaxSDK::Array< MSTR > &  fogVolumeGridNames)
pure virtual

Fills in the array with the names of the fog volume grids (if any).

Parameters:
MaxSDK::Array<MSTR>& fogVolumeGridNames (out) - Array is filled in with the names of all fog volume grids

◆ GetLevelSetGridNames()

virtual void GetLevelSetGridNames ( MaxSDK::Array< MSTR > &  levelSetGridNames)
pure virtual

Fills in the array with the names of the level set grids (if any).

Parameters:
MaxSDK::Array<MSTR>& levelSetGridNames (out) - Array is filled in with the names of all level set grids

◆ GetVelocityGridNames()

virtual void GetVelocityGridNames ( MaxSDK::Array< MSTR > &  velocityGridNames)
pure virtual

Fills in the array with the names of the velocity grids (if any).

Parameters:
MaxSDK::Array<MSTR>& velocityGridNames (out) - Array is filled in with the names of all grids that represent velocity

◆ CanStreamCache()

virtual bool CanStreamCache ( ) const
inlinevirtual

Query the object to see if it has an in-memory OpenVDB grid cache that is capable of streaming.

Returns
true if the object has in-memory grids it can stream.
64{ return false; }

◆ StreamGrids() [1/2]

virtual bool StreamGrids ( std::ostringstream &  streamOut,
TimeValue  t,
Interval valid 
)
inlinevirtual

Ask the volume object to stream all of its grids to a cache.

Parameters:
std::ostringstream& streamOut (out) - std::stream that will receive the grid data TimeValue t - The time to use for the data Interval& valid (in/out) - The validity interval of the data (updated for the current time)
Returns
true if the object successfully streamed all grids.
72{ UNUSED_PARAM(streamOut); UNUSED_PARAM(t); UNUSED_PARAM(valid); return false; }
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18

◆ StreamGrids() [2/2]

virtual bool StreamGrids ( const MaxSDK::Array< MSTR > &  channelNames,
std::ostringstream &  streamOut,
TimeValue  t,
Interval valid 
)
inlinevirtual

Ask the volume object to stream a specific set of its grids to a cache.

Parameters :
MaxSDK::Array<MSTR>& channelNames (in) - The names of the grids to stream std::ostringstream& streamOut(out) - std::stream that will receive the grid data TimeValue t - The time to use for the data Interval& valid(in/out) - The validity interval of the data (updated for the current time)
Returns
true if the object successfully streamed all grids.
82 {
83 UNUSED_PARAM(channelNames); UNUSED_PARAM(streamOut); UNUSED_PARAM(t); UNUSED_PARAM(valid);
84 return false;
85 }

◆ HasDiskCache()

virtual bool HasDiskCache ( ) const
inlinevirtual

Query the object to see if it has its own cache file.

Returns
true if the object has OpenVDB grids on disk in .vdb files.
89{ return false; }

◆ GetDiskCache()

virtual MSTR GetDiskCache ( TimeValue  t,
Interval valid 
)
inlinevirtual

If the object has its own cache file, this retrieves its name for a given time along with validity.

Parameters :
TimeValue t - The time to use for the data Interval& valid(in/out) - The validity interval of the data (updated for the current time)
Returns
the name of the OpenVDB .vdb cache file.
96{ UNUSED_PARAM(t); UNUSED_PARAM(valid); return _T(""); }

◆ BuildDiskCache() [1/2]

virtual bool BuildDiskCache ( const MSTR filename,
TimeValue  t,
Interval valid 
)
inlinevirtual

If the object doesn't have its own cache file, this will build one with all grids for us, placing it in the specified filename.

Parameters :
MSTR& filename (in) - The name of the file that should receive the OpenVDB grid data TimeValue t - The time to use for the data Interval& valid(in/out) - The validity interval of the data (updated for the current time)
Returns
true if the file was saved, false otherwise.
105 {
106 UNUSED_PARAM(filename); UNUSED_PARAM(t); UNUSED_PARAM(valid);
107 return false;
108 }

◆ BuildDiskCache() [2/2]

virtual bool BuildDiskCache ( const MaxSDK::Array< MSTR > &  channelNames,
const MSTR filename,
TimeValue  t,
Interval valid 
)
inlinevirtual

If the object doesn't have its own cache file, this will build one with all specified grids for us, placing it in the specified filename.

Parameters :
MaxSDK::Array<MSTR>& channelNames (in) - The names of the grids to save MSTR& filename (in) - The name of the file that should receive the OpenVDB grid data TimeValue t - The time to use for the data Interval& valid(in/out) - The validity interval of the data (updated for the current time)
Returns
true if the file was saved, false otherwise.
118 {
119 UNUSED_PARAM(channelNames); UNUSED_PARAM(filename); UNUSED_PARAM(t); UNUSED_PARAM(valid);
120 return false;
121 }

◆ GetVolumeShader()

virtual Mtl * GetVolumeShader ( TimeValue  t)
inlinevirtual

Get the shader assigned to this volume (if any).

Parameters :
TimeValue t - The time to use for the shader
Returns
The material pointer to the shader if the object has one; nullptr otherwise.
127{ UNUSED_PARAM(t); return nullptr; }

◆ GetVolumeBBox()

virtual Box3 GetVolumeBBox ( TimeValue  t)
pure virtual

Get the bounding box for the volume at the specified time.

Parameters :
TimeValue t - The time to use
Returns
The bounding box of the object.

◆ VolumeObjectValidity()

virtual Interval VolumeObjectValidity ( TimeValue  t)
inlinevirtual

Get the validity interval for the volume at the specified time.

Parameters :
TimeValue t - The time to use
Returns
The validity interval for the object.
139{ UNUSED_PARAM(t); return FOREVER; }
#define FOREVER
Definition: interval.h:168