FBMatrix Class Reference


Detailed Description

FBMatrix class.

This class creates a list like object, which can be modified using the list protocol method. But unlike lists, its length is fixed: it always contain 16 floating point values. Thus it does not support the any list methods that would affect its length. The values within can be changed, usually via the bracket operator.

    # Supported list protocol methods:
    mat = FBMatrix()
    len(mat)
    print mat[13]
    mat[12] = 1.0
Warning:
The implementation of this 4x4 matrix uses a simple list of 16 elements, not a list of 4 vectors of 4 elements.*
Slicing is not supported by this object.

List of all members.

Public Member Functions

  FBMatrix (list pValue)
  Constructor.
  FBMatrix (FBMatrix pMatrix)
  Copy Constructor.
  Identity ()
  Load identity matrix.
  Set (list pValue)
  Set matrix from an array.
int  __len__ ()
  Returns the number of elements.
float  __getitem__ (int pIndex)
  Returns the ith component Corresponds to python: print matrix[1].
  __setitem__ (int pIndex, float pComponentValue)
  Sets the ith components Corresponds to python: color[1] = 0.5.

Constructor & Destructor Documentation

FBMatrix ( list  pValue )

Constructor.

Parameters:
pValue Array to intialize matrix from.
FBMatrix ( FBMatrix  pMatrix )

Copy Constructor.

Parameters:
pMatrix Matrix to copy.

Member Function Documentation

Identity ( )

Load identity matrix.

Set ( list  pValue )

Set matrix from an array.

Parameters:
pValue Array to intialize matrix from.
int __len__ ( )

Returns the number of elements.

Corresponds to python: len(object)

float __getitem__ ( int  pIndex )

Returns the ith component Corresponds to python: print matrix[1].

Parameters:
pIndex Index of the components to get (0 to 15)
Returns:
Matrix element value
__setitem__ ( int  pIndex,
float  pComponentValue 
)

Sets the ith components Corresponds to python: color[1] = 0.5.

Parameters:
pIndex Index of the components to set (0 to 15)
pComponentValue Value of component to set

FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix
FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix FBMatrix