3ds Max C++ API Reference
Matrix44 Class Reference

#include <Matrix44.h>

+ Inheritance diagram for Matrix44:

Public Member Functions

 Matrix44 ()
 
 Matrix44 (const Matrix44 &from)
 
Matrix44operator= (const Matrix44 &from)
 
 ~Matrix44 ()
 
DataBridgeAPI Matrix44MakeTranspose ()
 
DataBridgeAPI Matrix44MakeIdentity ()
 
DataBridgeAPI float MakeInverse ()
 
DataBridgeAPI Matrix44MakeMultiply (const Matrix44 &m2)
 
DataBridgeAPI Matrix44MakeTranslation (float xOffset, float yOffset, float zOffset)
 
DataBridgeAPI Matrix44MakeTranslation (const Point3 &offset)
 
DataBridgeAPI Matrix44MakeScale (float xScale, float yScale, float zScale)
 
DataBridgeAPI Matrix44MakeScale (const Point3 &scale)
 
DataBridgeAPI Matrix44MakeRotation (const Point3 &axis, float rotationRadius)
 
DataBridgeAPI Matrix44MakeLookAt (const Point3 &eyePos, const Point3 &direction, const Point3 &approxUp)
 
DataBridgeAPI Matrix44MakeOrthoProjection (float w, float h, float znear, float zfar, bool lefthand=true)
 
DataBridgeAPI Matrix44MakeOrthoProjectionLH (float w, float h, float znear, float zfar)
 
DataBridgeAPI Matrix44MakeOrthoProjectionRH (float w, float h, float znear, float zfar)
 
DataBridgeAPI Matrix44MakePerspectiveProjection (float fov, float aspectRatio, float znear, float zfar, bool lefthand=true)
 
DataBridgeAPI Matrix44MakePerspectiveProjectionLH (float fov, float aspectRatio, float znear, float zfar)
 
DataBridgeAPI Matrix44MakePerspectiveProjectionRH (float fov, float aspectRatio, float znear, float zfar)
 

Static Public Member Functions

static DataBridgeAPI Matrix44Multiply (Matrix44 &mOut, const Matrix44 &m1, const Matrix44 &m2)
 
- 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...
 

Public Attributes

union {
   struct {
      float   _11
 
      float   _12
 
      float   _13
 
      float   _14
 
      float   _21
 
      float   _22
 
      float   _23
 
      float   _24
 
      float   _31
 
      float   _32
 
      float   _33
 
      float   _34
 
      float   _41
 
      float   _42
 
      float   _43
 
      float   _44
 
   } 
 
   float   m [4][4]
 
}; 
 

Constructor & Destructor Documentation

◆ Matrix44() [1/2]

Matrix44 ( )
inline
111 {
112  // do nothing.
113 }

◆ Matrix44() [2/2]

Matrix44 ( const Matrix44 from)
inline
116 {
117  memcpy_s(m, sizeof(m), from.m, sizeof(m));
118 }
float m[4][4]
Definition: Matrix44.h:105

◆ ~Matrix44()

~Matrix44 ( )
inline
133 {
134  // do nothing.
135 }

Member Function Documentation

◆ operator=()

Matrix44 & operator= ( const Matrix44 from)
inline
121 {
122  if (&from == this)
123  {
124  return *this;
125  }
126 
127  memcpy_s(m, sizeof(m), from.m, sizeof(m));
128 
129  return *this;
130 }

◆ MakeTranspose()

DataBridgeAPI Matrix44& MakeTranspose ( )

◆ MakeIdentity()

DataBridgeAPI Matrix44& MakeIdentity ( )

◆ MakeInverse()

DataBridgeAPI float MakeInverse ( )

◆ MakeMultiply()

DataBridgeAPI Matrix44& MakeMultiply ( const Matrix44 m2)

◆ MakeTranslation() [1/2]

DataBridgeAPI Matrix44& MakeTranslation ( float  xOffset,
float  yOffset,
float  zOffset 
)

◆ MakeTranslation() [2/2]

DataBridgeAPI Matrix44& MakeTranslation ( const Point3 offset)

◆ MakeScale() [1/2]

DataBridgeAPI Matrix44& MakeScale ( float  xScale,
float  yScale,
float  zScale 
)

◆ MakeScale() [2/2]

DataBridgeAPI Matrix44& MakeScale ( const Point3 scale)

◆ MakeRotation()

DataBridgeAPI Matrix44& MakeRotation ( const Point3 axis,
float  rotationRadius 
)

◆ MakeLookAt()

DataBridgeAPI Matrix44& MakeLookAt ( const Point3 eyePos,
const Point3 direction,
const Point3 approxUp 
)

◆ MakeOrthoProjection()

DataBridgeAPI Matrix44& MakeOrthoProjection ( float  w,
float  h,
float  znear,
float  zfar,
bool  lefthand = true 
)

◆ MakeOrthoProjectionLH()

DataBridgeAPI Matrix44& MakeOrthoProjectionLH ( float  w,
float  h,
float  znear,
float  zfar 
)

◆ MakeOrthoProjectionRH()

DataBridgeAPI Matrix44& MakeOrthoProjectionRH ( float  w,
float  h,
float  znear,
float  zfar 
)

◆ MakePerspectiveProjection()

DataBridgeAPI Matrix44& MakePerspectiveProjection ( float  fov,
float  aspectRatio,
float  znear,
float  zfar,
bool  lefthand = true 
)

◆ MakePerspectiveProjectionLH()

DataBridgeAPI Matrix44& MakePerspectiveProjectionLH ( float  fov,
float  aspectRatio,
float  znear,
float  zfar 
)

◆ MakePerspectiveProjectionRH()

DataBridgeAPI Matrix44& MakePerspectiveProjectionRH ( float  fov,
float  aspectRatio,
float  znear,
float  zfar 
)

◆ Multiply()

static DataBridgeAPI Matrix44& Multiply ( Matrix44 mOut,
const Matrix44 m1,
const Matrix44 m2 
)
static

Member Data Documentation

◆ _11

float _11

◆ _12

float _12

◆ _13

float _13

◆ _14

float _14

◆ _21

float _21

◆ _22

float _22

◆ _23

float _23

◆ _24

float _24

◆ _31

float _31

◆ _32

float _32

◆ _33

float _33

◆ _34

float _34

◆ _41

float _41

◆ _42

float _42

◆ _43

float _43

◆ _44

float _44

◆ m

float m[4][4]

◆ 

union { ... }