Vector4d class. More...
#include <pyfbsdk.h>
Public Member Functions | |
FBVector4d () | |
Constructor. | |
FBVector4d (FBVector4d pVector4d) | |
Constructor. | |
FBVector4d (float pX, float pY, float pZ, float pA) | |
Constructor. | |
FBVector4d (tuple< float, float, float, float >) | |
Constructor. | |
int | __len__ () |
Returns the number of elements. | |
float | __getitem__ (int pIndex) |
Returns the ith component Corresponds to python: print v[1]. | |
__setitem__ (int pIndex, float pComponentValue) | |
Sets the ith components Corresponds to python: v[1] = 0.5. | |
FBVector4d | operator+ (FBVector4d pVector) |
Add 2 vectors. | |
FBVector4d | operator- (FBVector4d pVector) |
Substract 2 vectors. | |
Vector4d 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 4 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.
FBVector4d | ( | ) |
Constructor.
Default constructor, all 4 values within are set to 0.0.
FBVector4d | ( | FBVector4d | pVector4d | ) |
Constructor.
Copy constructor. Copy values from another instance.
FBVector4d | ( | float | pX, |
float | pY, | ||
float | pZ, | ||
float | pA | ||
) |
Constructor.
Explicitely construct a vector by specifying its values.
Constructor.
A vector can be built from any python object with supports the tuple interface and is of a lenght of 4.
Returns the ith component Corresponds to python: print v[1].
pIndex | Index of the components to get (0 to 3) |
int __len__ | ( | ) |
Returns the number of elements.
Corresponds to python: len(object)
Sets the ith components Corresponds to python: v[1] = 0.5.
pIndex | Index of the components to set (0 to 3) |
pComponentValue | Value of component to set |
FBVector4d operator+ | ( | FBVector4d | pVector | ) |
Add 2 vectors.
pVector | Vector to add to source. |
FBVector4d operator- | ( | FBVector4d | pVector | ) |
Substract 2 vectors.
pVector | Vector to add to source. |