template<class T>
BasicMatrixTransformation3D class
Three-dimensional transformation implemented using matrices.
Uses Math::
Base classes
-
template<class T>class AbstractBasicTranslationRotationScaling3D<T>
- Base transformation for three-dimensional scenes supporting translation, rotation and scaling.
Public types
-
using DataType = Math::
Matrix4<T> - Underlying transformation type.
Public functions
-
auto transformation() const -> Math::
Matrix4<T> - Object transformation.
-
auto setTransformation(const Math::
Matrix4<T>& transformation) -> Object<BasicMatrixTransformation3D<T>>& - Set transformation.
- auto resetTransformation() -> Object<BasicMatrixTransformation3D<T>>&
- Reset object transformation.
-
auto transform(const Math::
Matrix4<T>& transformation) -> Object<BasicMatrixTransformation3D<T>>& - Transform the object.
-
auto transformLocal(const Math::
Matrix4<T>& transformation) -> Object<BasicMatrixTransformation3D<T>>& - Transform the object as a local transformation.
-
auto translate(const Math::
Vector3<T>& vector) -> Object<BasicMatrixTransformation3D<T>>& - Translate the object.
-
auto translateLocal(const Math::
Vector3<T>& vector) -> Object<BasicMatrixTransformation3D<T>>& - Translate the object as a local transformation.
-
auto rotate(const Math::
Quaternion<T>& quaternion) -> Object<BasicMatrixTransformation3D<T>>& new in 2020.06 - Rotate the object using a quaternion.
-
auto rotateLocal(const Math::
Quaternion<T>& quaternion) -> Object<BasicMatrixTransformation3D<T>>& new in 2020.06 - Rotate the object using a quaternion as a local transformation.
-
auto rotate(Math::
Rad<T> angle, const Math:: Vector3<T>& normalizedAxis) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object.
-
auto rotateLocal(Math::
Rad<T> angle, const Math:: Vector3<T>& normalizedAxis) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object as a local transformation.
-
auto rotateX(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around X axis.
-
auto rotateXLocal(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around X axis as a local transformation.
-
auto rotateY(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around Y axis.
-
auto rotateYLocal(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around Y axis as a local transformation.
-
auto rotateZ(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around Z axis.
-
auto rotateZLocal(Math::
Rad<T> angle) -> Object<BasicMatrixTransformation3D<T>>& - Rotate the object around Z axis as a local transformation.
-
auto scale(const Math::
Vector3<T>& vector) -> Object<BasicMatrixTransformation3D<T>>& - Scale the object.
-
auto scaleLocal(const Math::
Vector3<T>& vector) -> Object<BasicMatrixTransformation3D<T>>& - Scale the object as a local transformation.
-
auto reflect(const Math::
Vector3<T>& normal) -> Object<BasicMatrixTransformation3D<T>>& - Reflect the object.
-
auto reflectLocal(const Math::
Vector3<T>& normal) -> Object<BasicMatrixTransformation3D<T>>& - Reflect the object as a local transformation.
Function documentation
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: setTransformation(const Math:: Matrix4<T>& transformation)
Set transformation.
Returns | Reference to self (for method chaining) |
---|
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: resetTransformation()
Reset object transformation.
Returns | Reference to self (for method chaining) |
---|
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: transform(const Math:: Matrix4<T>& transformation)
Transform the object.
Returns | Reference to self (for method chaining) |
---|
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: transformLocal(const Math:: Matrix4<T>& transformation)
Transform the object as a local transformation.
Similar to the above, except that the transformation is applied before all others.
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: translate(const Math:: Vector3<T>& vector)
Translate the object.
Returns | Reference to self (for method chaining) |
---|
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: translateLocal(const Math:: Vector3<T>& vector)
Translate the object as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotate(const Math:: Quaternion<T>& quaternion) new in 2020.06
Rotate the object using a quaternion.
Parameters | |
---|---|
quaternion | Normalized quaternion |
Returns | Reference to self (for method chaining) |
Expects that the quaternion is normalized.
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateLocal(const Math:: Quaternion<T>& quaternion) new in 2020.06
Rotate the object using a quaternion as a local transformation.
Similar to the above, except that the transformation is applied before all others.
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotate(Math:: Rad<T> angle,
const Math:: Vector3<T>& normalizedAxis)
Rotate the object.
Parameters | |
---|---|
angle | Angle (counterclockwise) |
normalizedAxis | Normalized rotation axis |
Returns | Reference to self (for method chaining) |
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateLocal(Math:: Rad<T> angle,
const Math:: Vector3<T>& normalizedAxis)
Rotate the object as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateX(Math:: Rad<T> angle)
Rotate the object around X axis.
Parameters | |
---|---|
angle | Angle (counterclockwise) |
Returns | Reference to self (for method chaining) |
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateXLocal(Math:: Rad<T> angle)
Rotate the object around X axis as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateY(Math:: Rad<T> angle)
Rotate the object around Y axis.
Parameters | |
---|---|
angle | Angle (counterclockwise) |
Returns | Reference to self (for method chaining) |
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateYLocal(Math:: Rad<T> angle)
Rotate the object around Y axis as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateZ(Math:: Rad<T> angle)
Rotate the object around Z axis.
Parameters | |
---|---|
angle | Angle (counterclockwise) |
Returns | Reference to self (for method chaining) |
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: rotateZLocal(Math:: Rad<T> angle)
Rotate the object around Z axis as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: scale(const Math:: Vector3<T>& vector)
Scale the object.
Returns | Reference to self (for method chaining) |
---|
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: scaleLocal(const Math:: Vector3<T>& vector)
Scale the object as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: reflect(const Math:: Vector3<T>& normal)
Reflect the object.
Parameters | |
---|---|
normal | Normal of the plane through which to reflect (normalized) |
Returns | Reference to self (for method chaining) |
Same as calling transform() with Math::
template<class T>
Object<BasicMatrixTransformation3D<T>>& Magnum:: SceneGraph:: BasicMatrixTransformation3D<T>:: reflectLocal(const Math:: Vector3<T>& normal)
Reflect the object as a local transformation.
Similar to the above, except that the transformation is applied before all others. Same as calling transformLocal() with Math::