Skip to main content

TransformConfig Class

Fluent configuration for spatial transform setup. More...

Declaration

class helios::engine::builder::gameObject::builders::configs::TransformConfig { ... }

Public Constructors Index

TransformConfig (helios::engine::ecs::GameObject gameObject)

Constructs a TransformConfig and adds ComposeTransformComponent. More...

Public Member Functions Index

TransformConfig &scale (const helios::math::vec3f scale, const helios::core::units::Unit unit=helios::core::units::Unit::Meter)

Sets the scale of the entity. More...

TransformConfig &translate (const helios::math::vec3f translation)

Sets the translation (position) of the entity. More...

TransformConfig &rotate (const float degrees, const helios::math::vec3f axis)

Sets the initial heading rotation of the entity. More...

Private Member Attributes Index

helios::engine::ecs::GameObjectgameObject_

Non-owning pointer to the target GameObject. More...

Description

Fluent configuration for spatial transform setup.

Automatically adds ComposeTransformComponent and provides methods for setting scale and translation.

Definition at line 24 of file TransformConfig.ixx.

Public Constructors

TransformConfig()

helios::engine::builder::gameObject::builders::configs::TransformConfig::TransformConfig (helios::engine::ecs::GameObject gameObject)
inline explicit

Constructs a TransformConfig and adds ComposeTransformComponent.

Parameters
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a>

Target GameObject to configure.

Definition at line 38 of file TransformConfig.ixx.

Referenced by rotate, scale and translate.

Public Member Functions

rotate()

TransformConfig & helios::engine::builder::gameObject::builders::configs::TransformConfig::rotate (const float degrees, const helios::math::vec3f axis)
inline

Sets the initial heading rotation of the entity.

Parameters
degrees

Rotation angle in degrees.

axis

Rotation axis.

Returns

Reference to this config for chaining.

Definition at line 80 of file TransformConfig.ixx.

80 TransformConfig& rotate(const float degrees, const helios::math::vec3f axis) {
82
83 rsc.setHeadingRotationAngle(degrees);
84 rsc.setHeadingRotationAxis(axis);
85
86 return *this;
87 }

References helios::engine::modules::spatial::transform::components::RotationStateComponent::setHeadingRotationAngle and TransformConfig.

scale()

TransformConfig & helios::engine::builder::gameObject::builders::configs::TransformConfig::scale (const helios::math::vec3f scale, const helios::core::units::Unit unit=helios::core::units::Unit::Meter)
inline

Sets the scale of the entity.

Parameters
scale

Scale factors for x, y, z axes.

unit

The unit of measurement (default: Meter).

Returns

Reference to this config for chaining.

Definition at line 51 of file TransformConfig.ixx.

References helios::core::units::Meter, scale and TransformConfig.

Referenced by scale.

translate()

TransformConfig & helios::engine::builder::gameObject::builders::configs::TransformConfig::translate (const helios::math::vec3f translation)
inline

Sets the translation (position) of the entity.

Parameters
translation

Position in world space.

Returns

Reference to this config for chaining.

Definition at line 66 of file TransformConfig.ixx.

68 .setTranslation(translation);
69 return *this;
70 }

Reference TransformConfig.

Private Member Attributes

gameObject_

helios::engine::ecs::GameObject helios::engine::builder::gameObject::builders::configs::TransformConfig::gameObject_

Non-owning pointer to the target GameObject.

Definition at line 29 of file TransformConfig.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.