RotationStateComponent.ixx File
Component for managing composite rotation state from heading and spin. More...
Included Headers
#include <cmath>
#include <helios.math>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | modules |
|
Domain-specific components and systems. More... | |
| namespace | spatial |
| namespace | transform |
|
Transform components and systems for spatial state management. More... | |
| namespace | components |
|
Transform state components for spatial management. More... | |
Classes Index
| class | RotationStateComponent |
|
Component that manages composite rotation from heading and spin rotations. More... | |
Description
Component for managing composite rotation state from heading and spin.
File Listing
The file content with the documentation metadata removed is:
18export namespace helios::engine::modules::spatial::transform::components {
31 class RotationStateComponent {
41 helios::math::vec3f headingRotationAxis_{};
51 helios::math::vec3f spinRotationAxis_{};
61 helios::math::mat4f spinRotationMatrix_;
66 helios::math::mat4f headingRotationMatrix_;
71 helios::math::mat4f composedRotationMatrix_;
118 spinRotationMatrix_ = helios::math::rotate(
120 helios::math::radians(spinRotationAngle_),
124 headingRotationMatrix_ = helios::math::rotate(
126 helios::math::radians(headingRotationAngle_),
139 RotationStateComponent() = default;
148 RotationStateComponent(const RotationStateComponent& other) :
153 RotationStateComponent& operator=(const RotationStateComponent&) = default;
154 RotationStateComponent(RotationStateComponent&&) noexcept = default;
155 RotationStateComponent& operator=(RotationStateComponent&&) noexcept = default;
162 void setHeadingRotationAngle(float angle) {
172 [[nodiscard]] float headingRotationAngle() const noexcept {
181 void setHeadingRotationAxis(helios::math::vec3f axis) {
191 [[nodiscard]] helios::math::vec3f headingRotationAxis() const noexcept {
200 void setSpinRotationAngle(float angle) {
210 [[nodiscard]] float spinRotationAngle() const noexcept {
219 void setSpinRotationAxis(helios::math::vec3f axis) {
229 [[nodiscard]] helios::math::vec3f spinRotationAxis() const noexcept {
240 const helios::math::mat4f& spinRotation() noexcept {
252 const helios::math::mat4f& headingRotation() noexcept {
264 const helios::math::mat4f& rotation() noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.