#include <GA_AIFMath.h>

Public Member Functions | |
| GA_AIFMath () | |
| virtual | ~GA_AIFMath () |
Static Public Member Functions | |
| static const GA_AIFMath * | getNoMath () |
This class provides the interface to perform numerical operations on attribute data. Each attribute type may provide this interface if it makes sense.
Basic mathematicl operations.
d = d + a*b
d = d*s + o
d = a + b
d = a * b
d = a - b
d = a / b
Common mathematical operations
d = normalize(a)
Matrix Operations
Signatures
When performing operations on attributes, there are different variable types.
Many operations may also be performed on one or more components of the tuple of values. The methods which take a component parameter will use the component to work only on a single component of the tuple. If the component parameter is less than zero, the operation will be applied to all components.
For example, the add() operation has the following signatures
add(GA_Attribute &d, GA_Offset di, const GA_Attribute &a, GA_Offset ai, fpreal b, int component); add(GA_Attribute &d, GA_Offset di, const GA_Attribute &a, GA_Offset ai, const fpreal32 *b, int tuple_size, int component); add(GA_Attribute &d, GA_Offset di, const GA_Attribute &a, GA_Offset ai, const fpreal64 *b, int tuple_size, int component); add(GA_Attribute &d, GA_Offset di, const GA_Attribute &a, GA_Offset ai, const GA_Attribute &b, GA_Offset bi, int component); add(GA_Attribute &d, const GA_Range &di, const GA_Attribute &a, const GA_Range &ai, fpreal b, int component); add(GA_Attribute &d, const GA_Range &di, const GA_Attribute &a, const GA_Range &ai, const fpreal32 *b, int tuple_size, int component); add(GA_Attribute &d, const GA_Range &di, const GA_Attribute &a, const GA_Range &ai, const fpreal64 *b, int tuple_size, int component); add(GA_Attribute &d, const GA_Range &di, const GA_Attribute &a, const GA_Range &ai, const GA_Attribute &b, GA_Offset bi, int component); add(GA_Attribute &d, const GA_Range &di, const GA_Attribute &a, const GA_Range &ai, const GA_Attribute &b, const GA_Range &bi, int component);
To assist with being able to implement all these operations with minimal effort, please see the GA_AttributeOperand class. All of the specialized methods will simply call into the method which handles the operand. If you wish to specialize the methods to be more efficient, you can do that by overriding the specific method. In the case of add(), the generic operation is.
add(GA_AttributeOperantd &dest, GA_AttributeOperand &a, GA_AttributeOperand &b);
Definition at line 93 of file GA_AIFMath.h.
| GA_AIFMath::GA_AIFMath | ( | ) | [inline] |
Definition at line 96 of file GA_AIFMath.h.
| virtual GA_AIFMath::~GA_AIFMath | ( | ) | [virtual] |
| static const GA_AIFMath* GA_AIFMath::getNoMath | ( | ) | [static] |
Create an AIFMath which performs no arithmetic on any objects. This is different than not having an AIFMath.
1.5.9