HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simd::matrix44 Class Reference

#include <simd.h>

Public Types

enum  { rows = 4, cols = 4 }
 
typedef float value_t
 Underlying equivalent scalar value type. More...
 

Public Member Functions

OIIO_FORCEINLINE matrix44 ()
 
OIIO_FORCEINLINE matrix44 (const matrix44 &M)
 Copy constructor. More...
 
OIIO_FORCEINLINE matrix44 (const float *f)
 Construct from a float array. More...
 
OIIO_FORCEINLINE matrix44 (M44fParam M)
 Construct from an OIIO::M44fParam (including an Imath::M44f) More...
 
OIIO_FORCEINLINE matrix44 (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c, const vfloat4 &d)
 Construct from 4 vfloat4 rows. More...
 
OIIO_FORCEINLINE matrix44 (const float *a, const float *b, const float *c, const float *d)
 Construct from 4 float[4] rows. More...
 
OIIO_FORCEINLINE matrix44 (float f00, float f01, float f02, float f03, float f10, float f11, float f12, float f13, float f20, float f21, float f22, float f23, float f30, float f31, float f32, float f33)
 Construct from 16 floats. More...
 
const vfloat4operator[] (int i) const
 Return one row. More...
 
const matrix44operator= (const matrix44 &m)
 Assignment. More...
 
matrix44 transposed () const
 Return the transposed matrix. More...
 
vfloat3 transformp (const vfloat3 &V) const
 Transform 3-point V by 4x4 matrix M. More...
 
vfloat3 transformv (const vfloat3 &V) const
 Transform 3-vector V by 4x4 matrix M. More...
 
vfloat3 transformvT (const vfloat3 &V) const
 Transform 3-vector V by the transpose of 4x4 matrix M. More...
 
bool operator== (const matrix44 &m) const
 
bool operator!= (const matrix44 &m) const
 
bool operator== (M44fParam m) const
 
bool operator!= (M44fParam m) const
 
matrix44 inverse () const
 Return the inverse of the matrix. More...
 
const floatdata () const
 

Static Public Member Functions

static const char * type_name ()
 

Static Public Attributes

static constexpr int elements = 16
 

Friends

vfloat4 operator* (const vfloat4 &V, const matrix44 &M)
 
vfloat4 operator* (const matrix44 &M, const vfloat4 &V)
 
bool operator== (M44fParam a, const matrix44 &b)
 
bool operator!= (M44fParam a, const matrix44 &b)
 
std::ostream & operator<< (std::ostream &cout, const matrix44 &M)
 Stream output. More...
 

Detailed Description

SIMD-based 4x4 matrix. This is guaranteed to have memory layout (when not in registers) isomorphic to Imath::M44f.

Definition at line 2418 of file simd.h.

Member Typedef Documentation

Underlying equivalent scalar value type.

Definition at line 2421 of file simd.h.

Member Enumeration Documentation

anonymous enum
Enumerator
rows 
cols 

Definition at line 2422 of file simd.h.

Constructor & Destructor Documentation

OIIO_FORCEINLINE simd::matrix44::matrix44 ( )
inline

Definition at line 2426 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( const matrix44 M)
inline

Copy constructor.

Definition at line 2429 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( const float f)
inlineexplicit

Construct from a float array.

Definition at line 2437 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( M44fParam  M)
inline

Construct from an OIIO::M44fParam (including an Imath::M44f)

Definition at line 2445 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( const vfloat4 a,
const vfloat4 b,
const vfloat4 c,
const vfloat4 d 
)
inlineexplicit

Construct from 4 vfloat4 rows.

Definition at line 2448 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( const float a,
const float b,
const float c,
const float d 
)
inlineexplicit

Construct from 4 float[4] rows.

Definition at line 2456 of file simd.h.

OIIO_FORCEINLINE simd::matrix44::matrix44 ( float  f00,
float  f01,
float  f02,
float  f03,
float  f10,
float  f11,
float  f12,
float  f13,
float  f20,
float  f21,
float  f22,
float  f23,
float  f30,
float  f31,
float  f32,
float  f33 
)
inline

Construct from 16 floats.

Definition at line 2465 of file simd.h.

Member Function Documentation

const float* simd::matrix44::data ( ) const
inline

Definition at line 2517 of file simd.h.

matrix44 simd::matrix44::inverse ( ) const
inline

Return the inverse of the matrix.

Definition at line 8503 of file simd.h.

Definition at line 8472 of file simd.h.

Definition at line 8493 of file simd.h.

OIIO_FORCEINLINE const matrix44 & simd::matrix44::operator= ( const matrix44 m)

Assignment.

Definition at line 8353 of file simd.h.

OIIO_FORCEINLINE bool simd::matrix44::operator== ( const matrix44 m) const

Definition at line 8460 of file simd.h.

OIIO_FORCEINLINE bool simd::matrix44::operator== ( M44fParam  m) const

Definition at line 8485 of file simd.h.

OIIO_FORCEINLINE const vfloat4 & simd::matrix44::operator[] ( int  i) const

Return one row.

Definition at line 8348 of file simd.h.

OIIO_FORCEINLINE vfloat3 simd::matrix44::transformp ( const vfloat3 V) const

Transform 3-point V by 4x4 matrix M.

Definition at line 8377 of file simd.h.

OIIO_FORCEINLINE vfloat3 simd::matrix44::transformv ( const vfloat3 V) const

Transform 3-vector V by 4x4 matrix M.

Definition at line 8393 of file simd.h.

OIIO_FORCEINLINE vfloat3 simd::matrix44::transformvT ( const vfloat3 V) const

Transform 3-vector V by the transpose of 4x4 matrix M.

Definition at line 8407 of file simd.h.

OIIO_FORCEINLINE matrix44 simd::matrix44::transposed ( ) const

Return the transposed matrix.

Definition at line 8363 of file simd.h.

static const char* simd::matrix44::type_name ( )
inlinestatic

Definition at line 2420 of file simd.h.

Friends And Related Function Documentation

bool operator!= ( M44fParam  a,
const matrix44 b 
)
friend

Definition at line 8497 of file simd.h.

vfloat4 operator* ( const vfloat4 V,
const matrix44 M 
)
friend

Definition at line 8422 of file simd.h.

vfloat4 operator* ( const matrix44 M,
const vfloat4 V 
)
friend

Definition at line 8437 of file simd.h.

std::ostream& operator<< ( std::ostream &  cout,
const matrix44 M 
)
friend

Stream output.

Definition at line 8599 of file simd.h.

bool operator== ( M44fParam  a,
const matrix44 b 
)
friend

Definition at line 8489 of file simd.h.

Member Data Documentation

constexpr int simd::matrix44::elements = 16
static

Definition at line 2423 of file simd.h.

vfloat4 simd::matrix44::m_row[rows]

Definition at line 2521 of file simd.h.

value_t simd::matrix44::m_vals[rows][cols]

Definition at line 2522 of file simd.h.


The documentation for this class was generated from the following file: