Four x Four (double) Matrix.
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
Slicing is not supported by this object.
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. |
|
FBMatrix () | |
Constructor Initializes matrix to identity.
|
|
FBMatrix (list pValue) | |
Constructor. |
|
FBMatrix (FBMatrix pMatrix) | |
Copy Constructor. |
FBMatrix | ( | ) |
Constructor Initializes matrix to identity.
Identity | ( | ) |
Load identity matrix.
Set | ( | list | pValue | ) |
Set matrix from an array.
pValue | Array to intialize matrix from. |
int __len__ | ( | ) |
Returns the number of elements.
Corresponds to python: len(object)
Returns the ith component Corresponds to python: print matrix[1].
pIndex | Index of the components to get (0 to 15) |
Sets the ith components Corresponds to python: color[1] = 0.5.
pIndex | Index of the components to set (0 to 15) | |
pComponentValue | Value of component to set |