ScaleValue Class Reference

#include <control.h>

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

Constructor & Destructor Documentation

ScaleValue ( )
inline
Remarks
Constructor. s and q have their own initializers.
79 { }
ScaleValue ( const Point3 as)
inline
Remarks
Constructor. The scale data member is initialized to as. The quaternion data member is set to the identity.
82 { s = as; q = IdentQuat(); }
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77
Quat IdentQuat()
Definition: quat.h:374
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:
87 {s = as; q = aq; }
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77

Member Function Documentation

ScaleValue& operator+= ( const ScaleValue value)
inline
Remarks
Adds a ScaleValue to this ScaleValue.
90  { (*this)=(*this)+value; return (*this);}
ScaleValue& operator*= ( const float  value)
inline
Remarks
Multiplies this ScaleValue by a float. This updates the scale components.
94  { (*this)=(*this)*value; return (*this);}
ScaleValue& operator= ( const ScaleValue v)
inline
95 {s=v.s;q=v.q; return (*this);}
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77
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.

102 {return s[el];}
Point3 s
Definition: control.h:76
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.
107  {
108  return ((sv.s == s) && (sv.q == q));
109  }
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77
int operator!= ( const ScaleValue sv) const
inline
110  {
111  return ((sv.s != s) || (sv.q != q));
112  }
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77
int Equals ( const ScaleValue sv,
float  epsilon = 1E-6f 
) const
inline
113  {
114  return sv.s.Equals(s, epsilon) && sv.q.Equals(q, epsilon);
115  }
int Equals(const Point3 &p, float epsilon=1E-6f) const
int Equals(const Quat &a, float epsilon=1E-6f) const
Point3 s
Definition: control.h:76
Quat q
Definition: control.h:77

Member Data Documentation

Point3 s
Quat q