|
| static glm::mat3 | getMetricTensor (glm::mat3 basis) |
| | Computes the metric tensor g_ij from a set of basis vectors.
|
|
|
SpatialCoordinateTransformer & | operator= (const SpatialCoordinateTransformer &)=delete |
|
SpatialCoordinateTransformer & | operator= (SpatialCoordinateTransformer &&)=delete |
|
| SpatialCoordinateTransformer (const SpatialCoordinateTransformer &)=default |
|
| SpatialCoordinateTransformer (SpatialCoordinateTransformer &&)=delete |
◆ getDataToModelMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getDataToModelMatrix |
( |
| ) |
const |
|
pure virtual |
◆ getDataToWorldMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getDataToWorldMatrix |
( |
| ) |
const |
|
pure virtual |
◆ getInverseMetricTensor()
| glm::mat3 inviwo::SpatialCoordinateTransformer::getInverseMetricTensor |
( |
| ) |
const |
Computes the inverse metric tensor for the dataToWorld basis. This it useful for gradient computation.
The gradient ∇f in world space is then computed based on the partial derivatives in u and v direction ∇f = g_11 ∂f/∂u a_1 + g_12 ∂f/∂u a_2 + g_21 ∂f/∂v a_1 + g_22 ∂f/∂v a_2, where g_ij refers to the inverse metric tensor and a_i to the ith basis vector.
- Returns
- inverse metric tensor
◆ getMatrix()
◆ getMetricTensor()
| glm::mat3 inviwo::SpatialCoordinateTransformer::getMetricTensor |
( |
glm::mat3 | basis | ) |
|
|
static |
Computes the metric tensor g_ij from a set of basis vectors.
The metric tensor is defined as:
g_ij = dot(a_i, a_j)
where a_i are the basis vectors of the coordinate system.
- Parameters
-
| basis | A 3×3 matrix whose columns contain the basis vectors of the coordinate system expressed in Cartesian coordinates. |
- Returns
- A 3×3 symmetric matrix containing the metric tensor g_ij.
◆ getModelToDataMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getModelToDataMatrix |
( |
| ) |
const |
|
pure virtual |
◆ getModelToWorldMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getModelToWorldMatrix |
( |
| ) |
const |
|
pure virtual |
◆ getWorldToDataMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getWorldToDataMatrix |
( |
| ) |
const |
|
pure virtual |
◆ getWorldToModelMatrix()
| virtual glm::mat4 inviwo::SpatialCoordinateTransformer::getWorldToModelMatrix |
( |
| ) |
const |
|
pure virtual |
◆ transformNormal()
Transforms the given normal from from coordinates to to coordinates. Only considers transformations between supported by this SpatialCoordinateTransformer. That is Data to Model, Model to World, Data to World and their inverse, camera or index coordinates are not supported.
◆ transformPosition()
Transforms the given position pos from from coordinates to to coordinates. The resulting position is divided by w.
◆ transformPositionHomogeneous()
| virtual glm::vec4 inviwo::SpatialCoordinateTransformer::transformPositionHomogeneous |
( |
const vec4 & | pos, |
|
|
CoordinateSpace | from, |
|
|
CoordinateSpace | to ) const |
|
virtual |
Transforms the given position pos from from coordinates to to coordinates using homogeneous coordinates
The documentation for this class was generated from the following file:
- include/inviwo/core/datastructures/coordinatetransformer.h