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

#include <ParamDimension.h>

+ Inheritance diagram for ParamDimensionBase:

Public Member Functions

virtual ~ParamDimensionBase ()
 
virtual DimType DimensionType ()=0
 
virtual float Convert (float value)=0
 
virtual float UnConvert (float value)=0
 
CoreExport int Convert (int value)
 Converts integer values based on the parameter dimensions.
 
CoreExport int UnConvert (int value)
 Unconverts integer values based on the parameter dimensions.
 

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.
 
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

See also
Class ParamDimension.
Description:
This class (along with ParamDimension) describes the dimension of a parameter. This dimension can be considered a unit of measure. It describes the parameter's type and order of magnitude.

The dimension type and possibly the dimension scale (if the type is custom) are used to determine a scale factor for the parameter. When a controller is drawing a function curve, it only needs to use the Convert() function - the scale factor is rolled into the single 'vzoom' parameter passed to Animatable::PaintFCurves(). So, for a controller to plot a value 'val' at time t it would do the following:

int x = TimeToScreen(t,tzoom,tscroll);

int y = ValueToScreen(dim->Convert(val),rect.h()-1,vzoom,vscroll);

Constructor & Destructor Documentation

◆ ~ParamDimensionBase()

virtual ~ParamDimensionBase ( )
inlinevirtual
Remarks
Destructor.
61{}

Member Function Documentation

◆ DimensionType()

virtual DimType DimensionType ( )
pure virtual
Remarks
Returns the dimension type of the parameter. See Dimension Types

◆ Convert() [1/2]

virtual float Convert ( float  value)
pure virtual
Remarks
When a controller needs to display the parameter values (for example in the function curve editor) it converts the value using this method.
Parameters
valueThe value to convert.
Returns
The converted value.

◆ UnConvert() [1/2]

virtual float UnConvert ( float  value)
pure virtual
Remarks
This method is used to un-convert from a displayed value to the actual value
Parameters
valueThe value to un-convert.
Returns
The un-converted value.

◆ Convert() [2/2]

CoreExport int Convert ( int  value)

Converts integer values based on the parameter dimensions.

In order to ensure that integers larger than 2 ^ 24 - 1 are converted properly, use this method instead of ParamDimensionBase::Convert(float value)

Remarks
This method converts the integer parameter value to a float value and calls Convert on that float value. If the return value from that call is unchanged, the original integer value is returned, otherwise the returned float value cast to an integer is returned. This is to handle the case where a large integer value (>2^24 - 1) that cannot be represented as a float value is passed. This would result in a value change even though the Convert implementation itself did not change the value.
Parameters
valueThe value to convert.
Returns
The converted value.

◆ UnConvert() [2/2]

CoreExport int UnConvert ( int  value)

Unconverts integer values based on the parameter dimensions.

In order to ensure that integers larger than 2 ^ 24 - 1 are converted properly, use this method instead of ParamDimensionBase::UnConvert(float value)

Remarks
This method converts the integer parameter value to a float value and calls UnConvert on that float value. If the return value from that call is unchanged, the original integer value is returned, otherwise the returned float value cast to an integer is returned. This is to handle the case where a large integer value (>2^24 - 1) that cannot be represented as a float value is passed. This would result in a value change even though the UnConvert implementation itself did not change the value.
Parameters
valueThe value to convert.
Returns
The converted value.