This class implements utility functions for the math library.
More...
|
template<typename TTransformation , typename TObject > |
static void | transform (const TTransformation &transformation, const std::vector< TObject > &objects, std::vector< TObject > &results, Worker *worker=nullptr, const unsigned int minimalObjectsPerThread=1000u) |
| Transforms several objects (e.g., 3D vector or 4D vectors) by a transformation object (e.g., a 3x3 matrix or 4x4 matrix) using the multiplication operator. More...
|
|
static void | encodeFloatToUint8 (const float value, uint8_t *decomposedValues) |
| Encodes a float value to four uint8 values. More...
|
|
static float | decodeFloatFromUint8 (const uint8_t *decomposedValues) |
| Decodes four uint8 values into a float value. More...
|
|
|
template<typename TTransformation , typename TObject > |
static void | transformSubset (const TTransformation *transformation, const TObject *objects, TObject *results, const unsigned int firstObject, const unsigned int numberObjects) |
| Transforms a subset of several objects (e.g., 3D vector or 4D vectors) by a transformation object (e.g., a 3x3 matrix or 4x4 matrix) using the multiplication operator. More...
|
|
template<> |
void | transformSubset (const SquareMatrixF3 *transformation, const VectorF3 *objects, VectorF3 *results, const unsigned int firstObject, const unsigned int numberObjects) |
|
template<> |
void | transformSubset (const SquareMatrixD4 *transformation, const VectorD4 *objects, VectorD4 *results, const unsigned int firstObject, const unsigned int numberObjects) |
|
template<> |
void | transformSubset (const SquareMatrixF4 *transformation, const VectorF4 *objects, VectorF4 *results, const unsigned int firstObject, const unsigned int numberObjects) |
|
This class implements utility functions for the math library.
◆ decodeFloatFromUint8()
float Ocean::MathUtilities::decodeFloatFromUint8 |
( |
const uint8_t * |
decomposedValues | ) |
|
|
inlinestatic |
Decodes four uint8 values into a float value.
- Parameters
-
decomposedValues | The four uint8 values to decompose, must be valid |
- Returns
- The resulting decomposed float value, with range [0, 1]
◆ encodeFloatToUint8()
void Ocean::MathUtilities::encodeFloatToUint8 |
( |
const float |
value, |
|
|
uint8_t * |
decomposedValues |
|
) |
| |
|
inlinestatic |
Encodes a float value to four uint8 values.
- Parameters
-
value | The float value to decompose, with range [0, 1] |
decomposedValues | The resulting four uint8 values, must be valid |
◆ transform()
template<typename TTransformation , typename TObject >
void Ocean::MathUtilities::transform |
( |
const TTransformation & |
transformation, |
|
|
const std::vector< TObject > & |
objects, |
|
|
std::vector< TObject > & |
results, |
|
|
Worker * |
worker = nullptr , |
|
|
const unsigned int |
minimalObjectsPerThread = 1000u |
|
) |
| |
|
inlinestatic |
Transforms several objects (e.g., 3D vector or 4D vectors) by a transformation object (e.g., a 3x3 matrix or 4x4 matrix) using the multiplication operator.
- Parameters
-
transformation | The transformation to be used (e.g., a matrix) |
objects | The object to be transformed (e.g. vectors) |
results | The resulting transformed objects, the size of the vector will be adjusted to match the size of the provided objects |
worker | Optional worker object to distribute the computation |
minimalObjectsPerThread | Minimal number of objects assigned to one internal thread, with range [1, infinity) |
◆ transformSubset() [1/4]
template<>
void Ocean::MathUtilities::transformSubset |
( |
const SquareMatrixD4 * |
transformation, |
|
|
const VectorD4 * |
objects, |
|
|
VectorD4 * |
results, |
|
|
const unsigned int |
firstObject, |
|
|
const unsigned int |
numberObjects |
|
) |
| |
|
inlinestaticprotected |
◆ transformSubset() [2/4]
template<>
void Ocean::MathUtilities::transformSubset |
( |
const SquareMatrixF3 * |
transformation, |
|
|
const VectorF3 * |
objects, |
|
|
VectorF3 * |
results, |
|
|
const unsigned int |
firstObject, |
|
|
const unsigned int |
numberObjects |
|
) |
| |
|
inlinestaticprotected |
◆ transformSubset() [3/4]
template<>
void Ocean::MathUtilities::transformSubset |
( |
const SquareMatrixF4 * |
transformation, |
|
|
const VectorF4 * |
objects, |
|
|
VectorF4 * |
results, |
|
|
const unsigned int |
firstObject, |
|
|
const unsigned int |
numberObjects |
|
) |
| |
|
inlinestaticprotected |
◆ transformSubset() [4/4]
template<typename TTransformation , typename TObject >
void Ocean::MathUtilities::transformSubset |
( |
const TTransformation * |
transformation, |
|
|
const TObject * |
objects, |
|
|
TObject * |
results, |
|
|
const unsigned int |
firstObject, |
|
|
const unsigned int |
numberObjects |
|
) |
| |
|
inlinestaticprotected |
Transforms a subset of several objects (e.g., 3D vector or 4D vectors) by a transformation object (e.g., a 3x3 matrix or 4x4 matrix) using the multiplication operator.
- Parameters
-
transformation | The transformation to be used (e.g., a matrix) |
objects | The object to be transformed (e.g. vectors) |
results | The resulting transformed objects, the size of the vector will be adjusted to match the size of the provided objects |
firstObject | The first object to be handled |
numberObjects | The number of objects to be handled |
The documentation for this class was generated from the following file: