DirectionComponent.ixx File
Component for storing a normalized direction vector. More...
Included Headers
#include <cassert>
#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 | physics |
|
Physics simulation and collision detection subsystem for the game engine. More... | |
| namespace | motion |
|
Motion physics components and systems. More... | |
| namespace | components |
|
Physics and movement components for game entities. More... | |
Classes Index
| class | DirectionComponent |
|
Component that holds a normalized direction vector. More... | |
Description
Component for storing a normalized direction vector.
File Listing
The file content with the documentation metadata removed is:
16export namespace helios::engine::modules::physics::motion::components {
26 class DirectionComponent {
31 helios::math::vec3f direction_{};
66 DirectionComponent() = default;
73 DirectionComponent(const DirectionComponent& other) : direction_(other.direction()) {}
75 DirectionComponent& operator=(const DirectionComponent&) = default;
76 DirectionComponent(DirectionComponent&&) noexcept = default;
77 DirectionComponent& operator=(DirectionComponent&&) noexcept = default;
87 void setDirection(const helios::math::vec3f direction) noexcept {
88 assert(direction.length() - 1.0f <= helios::math::EPSILON_LENGTH
90 direction_ = direction;
98 [[nodiscard]] helios::math::vec3f direction() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.