Transform.ixx File
Represents a 3D transformation consisting of translation, rotation and scale. More...
Included Headers
#include <helios.math.transform>
#include <helios.math.types>
Namespaces Index
| namespace | helios |
| namespace | core |
|
Core utilities shared across the helios engine. More... | |
| namespace | spatial |
|
Spatial transformation utilities. More... | |
Classes Index
| class | Transform |
|
Represents a 3D transformation consisting of translation, rotation and scale. More... | |
Description
Represents a 3D transformation consisting of translation, rotation and scale.
File Listing
The file content with the documentation metadata removed is:
15export namespace helios::core::spatial {
41 helios::math::mat4f rotation_ = helios::math::mat4f::identity();
46 helios::math::vec3f scale_ = helios::math::vec3f(1);
51 helios::math::vec3f translation_ = helios::math::vec3f(0);
57 mutable helios::math::mat4f cached_ = helios::math::mat4f::identity();
65 helios::math::mat4f updateCache() const {
67 return math::translate(
70 (rotation_ * helios::math::mat4f(scale_)
75 ~Transform() = default;
84 * @brief Constructs a new Transformation matrix from the specified rotation, scale and translation.
90 Transform(const helios::math::mat4f& rotation,
91 helios::math::vec3f scale,
94 rotation_(rotation),
96 translation_(translation),
106 void setRotation(const math::mat4f& rotation) noexcept {
107 rotation_ = rotation;
117 void setTranslation(const math::vec3f& translation) noexcept {
118 translation_ = translation;
128 void setScale(const math::vec3f& scale) noexcept {
138 [[nodiscard]] helios::math::mat4f rotation() const noexcept {
147 [[nodiscard]] helios::math::vec3f translation() const noexcept {
156 [[nodiscard]] helios::math::vec3f scaling() const noexcept {
165 [[nodiscard]] helios::math::mat4f transform() const noexcept {
179 [[nodiscard]] bool needsUpdate() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.