Skip to main content

Vec2Component Class Template

Generic 2D value component. More...

Declaration​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args> class helios::engine::core::components::Vec2Component<TDomainTag, TNumericType, THandle, Args> { ... }

Public Member Typedefs Index​

template < ... >
usingValue_type = helios::math::vec2< TNumericType >
template < ... >
usingHandle_type = THandle

Public Constructors Index​

template < ... >
Vec2Component ()=default
template < ... >
Vec2Component (const Value_type value)

Constructs the component with an initial value. More...

template < ... >
Vec2Component (const Vec2Component &other)

Copy constructor. More...

template < ... >
Vec2Component (Vec2Component &&) noexcept=default

Default move constructor. More...

Public Operators Index​

template < ... >
Vec2Component &operator= (const Vec2Component &)=default

Default copy assignment. More...

template < ... >
Vec2Component &operator= (Vec2Component &&) noexcept=default

Default move assignment. More...

Public Member Functions Index​

template < ... >
Value_typevalue () noexcept

Returns the current value. More...

template < ... >
Value_typevalue () const noexcept
template < ... >
voidsetValue (const Value_type value) noexcept

Updates the value. More...

Private Member Attributes Index​

template < ... >
helios::math::vec2< TNumericType >value_ {}

Description​

Generic 2D value component.

Template Parameters
TDomainTag

Semantic domain tag.

THandle

Owning entity handle type.

TNumericType

Scalar type for vector values.

Definition at line 24 of file Vec2Component.ixx.

Public Member Typedefs​

Handle_type​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
using helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Handle_type = THandle

Definition at line 31 of file Vec2Component.ixx.

31 using Handle_type = THandle;

Value_type​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
using helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Value_type = helios::math::vec2<TNumericType>

Definition at line 30 of file Vec2Component.ixx.

30 using Value_type = helios::math::vec2<TNumericType>;

Public Constructors​

Vec2Component()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Vec2Component ()
default

Definition at line 33 of file Vec2Component.ixx.

Vec2Component()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Vec2Component (const Value_type value)
inline explicit

Constructs the component with an initial value.

Parameters
value

Initial value vector.

Definition at line 40 of file Vec2Component.ixx.

40 explicit Vec2Component(const Value_type value) : value_(value){}

Vec2Component()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Vec2Component (const Vec2Component & other)
inline

Copy constructor.

Parameters
other

The component to copy from.

Definition at line 47 of file Vec2Component.ixx.

48 value_(other.value_) {}

Vec2Component()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::Vec2Component (Vec2Component &&)
noexcept default

Default move constructor.

Definition at line 53 of file Vec2Component.ixx.

Public Operators​

operator=()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
Vec2Component & helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::operator= (const Vec2Component &)
default

Default copy assignment.

Definition at line 51 of file Vec2Component.ixx.

operator=()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
Vec2Component & helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::operator= (Vec2Component &&)
noexcept default

Default move assignment.

Definition at line 55 of file Vec2Component.ixx.

Public Member Functions​

setValue()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
void helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::setValue (const Value_type value)
inline noexcept

Updates the value.

Parameters
value

New value vector.

Definition at line 75 of file Vec2Component.ixx.

75 void setValue(const Value_type value) noexcept {
76 value_ = value;
77 };

Reference helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::value.

value()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
Value_type helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::value ()
inline noexcept

Returns the current value.

Returns

Current 2D vector value.

Definition at line 62 of file Vec2Component.ixx.

63 return value_;
64 }

Referenced by helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::setValue.

value()​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
Value_type helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::value ()
inline noexcept

Definition at line 66 of file Vec2Component.ixx.

67 return value_;
68 }

Private Member Attributes​

value_​

template <typename TDomainTag, typename TNumericType, typename THandle, typename ... Args>
helios::math::vec2<TNumericType> helios::engine::core::components::Vec2Component< TDomainTag, TNumericType, THandle, Args >::value_ {}

Definition at line 26 of file Vec2Component.ixx.

26 helios::math::vec2<TNumericType> value_{};

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.