Transformation results for all parts in the geometry. More...
Public Member Functions | |
DataResultTransformation () | |
Constructs an empty transformation object. More... | |
size_t | partCount () const |
Returns number of part matrices in this transformation result. More... | |
Mat4d | part (size_t partIndex) const |
Returns the part matrix at the given index. More... | |
void | addPart (const Mat4d &part) |
Adds a transformation matrix part to the transformation result. More... | |
void | removeAllParts () |
Removes all transformation part matrices. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Transformation results for all parts in the geometry.
The DataResultTransformation holds a collection of matrices, each setting the transformation for the belonging part.
The number of parts in the transformation result and in the geometry must be the same.
Transformation matrices can be added using addPart(). Get the number of part matrices in the transformation result with partCount() and accessed individual part matrices by calling part() with the requested index. All part matrices can be removed using removeAllParts().
Transformation result visualization can be toggled on or off in the model specification (UnstructGridModel::modelSpec()).
Example of how to add a node based scalar result to a geometry consisting of only one triangle.
Create the DataResultScalar object with a unique id and node based result mapping.
Create the transformation matrix.
Add the transformation part to the result. The result must contain the same number of parts as the corresponding geometry.
For each geometry there is a result group binding the geometry and results. Add the transformation scalar to the state (DataState) for the corresponding geometry (DataGeometry) geo
The result is now created and added to the model. To tell the model to use this result, you must toggle transformation usage in the model's model specification.
See the complete source code at: UnstructGrid: A simple model with results
cee::ug::DataResultTransformation::DataResultTransformation | ( | ) |
Constructs an empty transformation object.
Sets a unique result id.
void cee::ug::DataResultTransformation::addPart | ( | const Mat4d & | part | ) |
Adds a transformation matrix part to the transformation result.
Number of parts must match the number of parts in the corresponding geometry.
Mat4d cee::ug::DataResultTransformation::part | ( | size_t | partIndex | ) | const |
Returns the part matrix at the given index.
size_t cee::ug::DataResultTransformation::partCount | ( | ) | const |
Returns number of part matrices in this transformation result.
void cee::ug::DataResultTransformation::removeAllParts | ( | ) |
Removes all transformation part matrices.