Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvmath::Matnnf< n > Class Template Reference

Template for nxn-matrices. More...

#include <Matnnf.h>

Inheritance diagram for nvmath::Matnnf< n >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Matnnf (void)
 Default constructor.
Vecnf< n > & operator[] (size_t i)
 Non-constant subscript operator.
const Vecnf< n > & operator[] (size_t i) const
 Constant subscript operator.
Matnnf< n > operator~ (void) const
 Transpose operator.
Matnnf< n > operator- (void) const
 Negation operator.
Matnnf< n > operator * (float f) const
 Matrix multiplication with a scalar operator.
Vecnf< n > operator * (const Vecnf< n > &v) const
 Matrix multiplication with a vector operator.
Matnnf< n > operator/ (float f) const
 Matrix division by a scalar operator.
Matnnf< n > operator+ (const Matnnf< n > &v) const
 Matrix addition operator.
Matnnf< n > operator- (const Matnnf< n > &v) const
 Matrix subtraction operator.
bool operator== (const Matnnf< n > &m) const
 Equality operator.
bool operator!= (const Matnnf< n > &m) const
 Inequality operator.
Matnnf< n > & operator= (const Matnnf< n > &m)
 Assignment operator.
Matnnf< n > & operator *= (float f)
 Matrix multiplication with a scalar and assignment operator.
Matnnf< n > & operator *= (const Matnnf< n > &m)
 Matrix multiplication with a matrix (i.e. concatenation) and assignment operator.
Matnnf< n > & operator/= (float f)
 Matrix division by a scalar and assignment operator.
Matnnf< n > & operator+= (const Matnnf< n > &m)
 Matrix addition and assignment operator.
Matnnf< n > & operator-= (const Matnnf< n > &m)
 Matrix subtraction and assignment operator.
const float * getPtr (void) const
 Get a constant pointer to the nxn floats of the matrix.

Related Functions

(Note that these are not member functions.)

bool isIdentity (const Matnnf< n > &m)
bool isNormalized (const Matnnf< n > &mat)
bool isOrthogonal (const Matnnf< n > &mat)
Matnnf< n > operator * (const Matnnf< n > &m0, const Matnnf< n > &m1)

Detailed Description

template<unsigned char n>
class nvmath::Matnnf< n >

Template for nxn-matrices.


Constructor & Destructor Documentation

template<unsigned char n>
nvmath::Matnnf< n >::Matnnf void   ) 
 

Default constructor.

For performance reasons no initialization is performed.


Member Function Documentation

template<unsigned char n>
Vecnf< n > & nvmath::Matnnf< n >::operator[] size_t  i  ) 
 

Non-constant subscript operator.

Returns:
reference to i th row of the matrix
Parameters:
i  index to row to use (i=0,..,n-1)

template<unsigned char n>
const Vecnf< n > & nvmath::Matnnf< n >::operator[] size_t  i  )  const
 

Constant subscript operator.

Returns:
constant reference to i th row of the matrix
Parameters:
i  index to row to use (i=0,..,n-1)

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator~ void   )  const
 

Transpose operator.

returns transposed matrix

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator- void   )  const
 

Negation operator.

Returns:
negated matrix

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator * float  f  )  const
 

Matrix multiplication with a scalar operator.

Returns:
multiplied matrix
Parameters:
f  scalar to multiply with

template<unsigned char n>
Vecnf< n > nvmath::Matnnf< n >::operator * const Vecnf< n > &  v  )  const
 

Matrix multiplication with a vector operator.

Returns:
matrix time v
Parameters:
v  vector to multiply with

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator/ float  f  )  const
 

Matrix division by a scalar operator.

Returns:
divided matrix
Parameters:
f  scalar to divide through

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator+ const Matnnf< n > &  v  )  const
 

Matrix addition operator.

Returns:
sum of the two matrices
Parameters:
m  matrix to add

template<unsigned char n>
Matnnf< n > nvmath::Matnnf< n >::operator- const Matnnf< n > &  v  )  const
 

Matrix subtraction operator.

Returns:
difference of the two matrices
Parameters:
m  matrix to add

template<unsigned char n>
bool nvmath::Matnnf< n >::operator== const Matnnf< n > &  m  )  const
 

Equality operator.

Returns:
true if the matrix is equal to m, otherwise false
Parameters:
m  matrix to compare with

template<unsigned char n>
bool nvmath::Matnnf< n >::operator!= const Matnnf< n > &  m  )  const
 

Inequality operator.

Returns:
true if the matrix is not equal to m, otherwise false
Parameters:
m  matrix to compare with

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator= const Matnnf< n > &  m  ) 
 

Assignment operator.

Returns:
reference to the assigned matrix
Parameters:
m  matrix to copy

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator *= float  f  ) 
 

Matrix multiplication with a scalar and assignment operator.

Returns:
reference to the assigned matrix after multiplication
Parameters:
f  scalar to multiply with

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator *= const Matnnf< n > &  m  ) 
 

Matrix multiplication with a matrix (i.e. concatenation) and assignment operator.

Returns:
reference to the assigned matrix after multiplication (concatenation)
Parameters:
m  matrix to multiply

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator/= float  f  ) 
 

Matrix division by a scalar and assignment operator.

Returns:
reference to the assigned matrix after division
Parameters:
f  scalar to divide through

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator+= const Matnnf< n > &  m  ) 
 

Matrix addition and assignment operator.

Returns:
reference to the assigned matrix after addition
Parameters:
m  matrix to add

template<unsigned char n>
Matnnf< n > & nvmath::Matnnf< n >::operator-= const Matnnf< n > &  m  ) 
 

Matrix subtraction and assignment operator.

Returns:
reference to the assigned matrix after addition
Parameters:
m  matrix to subtract

template<unsigned char n>
const float * nvmath::Matnnf< n >::getPtr void   )  const
 

Get a constant pointer to the nxn floats of the matrix.

Returns:
constant pointer to matrix elements


Friends And Related Function Documentation

template<unsigned char n>
bool isIdentity const Matnnf< n > &  m  )  [related]
 

Test if a matrix is the identity

Returns:
true if the matrix is the identity, otherwise false
Parameters:
m  matrix to test

template<unsigned char n>
bool isNormalized const Matnnf< n > &  mat  )  [related]
 

Test if a matrix is normalized. A matrix is normalized when both all rows and all columns are normalized.

Returns:
true if the matrix is normalized, otherwise false
Parameters:
mat  matrix to test

template<unsigned char n>
bool isOrthogonal const Matnnf< n > &  mat  )  [related]
 

Test if a matrix is orthogonal. A matrix is orthogonal when every row is orthogonal to each other row and every column is orthogonal to each other column.

Returns:
true if the matrix is orthogonal, otherwise false
Parameters:
mat  matrix to test

template<unsigned char n>
Matnnf< n > operator * const Matnnf< n > &  m0,
const Matnnf< n > &  m1
[related]
 

Matrix multiplication with a matrix (i.e. concatenation) operator.

Returns:
multiplied (concatenated) matrix


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:39 2005 for NVSGSDK by NVIDIA