3ds Max C++ API Reference
ScaleValue Class Reference

#include <control.h>

+ Inheritance diagram for ScaleValue:

Public Member Functions

 ScaleValue ()
 
 ScaleValue (const Point3 &as)
 
 ScaleValue (const Point3 &as, const Quat &aq)
 
ScaleValueoperator+= (const ScaleValue &value)
 
ScaleValueoperator*= (const float value)
 
ScaleValueoperator= (const ScaleValue &v)
 
float & operator[] (int el)
 
int operator== (const ScaleValue &sv) const
 
int operator!= (const ScaleValue &sv) const
 
int Equals (const ScaleValue &sv, float epsilon=1E-6f) const
 

Public Attributes

Point3 s
 
Quat q
 

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

Detailed Description

See also
Class Point3, Class Quat.

Description:
A ScaleValue describes an arbitrary non-uniform scaling in an arbitrary axis system. The Point3 s gives the scaling along the x, y, and z axes, and the quaternion q defines the axis system in which scaling is to be applied. All methods are implemented by the system.
Data Members:
Point3 s;

Scale components.

Quat q;

The axis system of application.

Constructor & Destructor Documentation

◆ ScaleValue() [1/3]

ScaleValue ( )
inline
Remarks
Constructor. s and q have their own initializers.
81 { }

◆ ScaleValue() [2/3]

ScaleValue ( const Point3 as)
inline
Remarks
Constructor. The scale data member is initialized to as. The quaternion data member is set to the identity.
84 { s = as; q = IdentQuat(); }
Quat q
Definition: control.h:79
Point3 s
Definition: control.h:78
Quat IdentQuat()
Definition: quat.h:462

◆ ScaleValue() [3/3]

ScaleValue ( const Point3 as,
const Quat aq 
)
inline
Remarks
Constructor. The scale data member is initialized to as. The quaternion data member is set to aq.
Operators:
89 {s = as; q = aq; }

Member Function Documentation

◆ operator+=()

ScaleValue& operator+= ( const ScaleValue value)
inline
Remarks
Adds a ScaleValue to this ScaleValue.
92  { (*this)=(*this)+value; return (*this);}

◆ operator*=()

ScaleValue& operator*= ( const float  value)
inline
Remarks
Multiplies this ScaleValue by a float. This updates the scale components.
96  { (*this)=(*this)*value; return (*this);}

◆ operator=()

ScaleValue& operator= ( const ScaleValue v)
inline
97 {s=v.s;q=v.q; return (*this);}

◆ operator[]()

float& operator[] ( int  el)
inline
Remarks
Array access operator. This allows the scale components to be accessed using the array operator.
Parameters:
int el

Specifies the element to access: 0=x, 1=y, 2=z.

104 {return s[el];}

◆ operator==()

int operator== ( const ScaleValue sv) const
inline
Remarks
Equality operator. Test for equality between two ScaleValue's.
Returns
Nonzero if the ScaleValue's are equal; otherwise 0.
109  {
110  return ((sv.s == s) && (sv.q == q));
111  }

◆ operator!=()

int operator!= ( const ScaleValue sv) const
inline
112  {
113  return ((sv.s != s) || (sv.q != q));
114  }

◆ Equals()

int Equals ( const ScaleValue sv,
float  epsilon = 1E-6f 
) const
inline
115  {
116  return sv.s.Equals(s, epsilon) && sv.q.Equals(q, epsilon);
117  }
bool Equals(const Point3 &p, float epsilon=1E-6f) const
int Equals(const Quat &a, float epsilon=1E-6f) const

Member Data Documentation

◆ s

Point3 s

◆ q

Quat q