CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RigidBodyComponent::Accessor Struct Reference

#include <CeresEngine/Physics/Body.hpp>

Inheritance diagram for CeresEngine::RigidBodyComponent::Accessor:
CeresEngine::Component< T >::Accessor

Public Member Functions

double getMass () const noexcept
 The rigid body mass.
 
void setMass (double mass) noexcept
 The rigid body mass.
 
Vector3 getLocalInertia () const
 The rigid body local inertia.
 
void setLocalInertia (Vector3 localInertia)
 The rigid body local inertia.
 
double getLinearDamping () const
 The body's linear damping factor.
 
void setLinearDamping (double linearDamping)
 The body's linear damping factor.
 
double getAngularDamping () const
 The body's angular damping factor.
 
void setAngularDamping (double angularDamping)
 The body's angular damping factor.
 
double getFriction () const
 The body's friction factor.
 
void setFriction (double friction)
 The body's friction factor.
 
double getRollingFriction () const
 The body's rolling friction factor.
 
void setRollingFriction (double rollingFriction)
 The body's rolling friction factor.
 
double getSpinningFriction () const
 The body's spinning friction factor.
 
void setSpinningFriction (double spinningFriction)
 The body's spinning friction factor.
 
double getRestitution () const
 The body's restitution factor.
 
void setRestitution (double restitution)
 The body's restitution factor.
 
bool isFixed () const
 If set to true, if the body is non-movable and the engine might use this to optimize calculations.
 
void setFixed (bool fixed)
 If set to true, if the body is non-movable and the engine might use this to optimize calculations.
 
const HMeshgetMesh () const
 
void setMesh (HMesh mesh)
 
void applyForce (Vector3 force, Vector3 relativePosition=Vector3(0.0)) const
 Applies a force in a body.
 
- Public Member Functions inherited from CeresEngine::Component< T >::Accessor
 Accessor (const Entity &entity)
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::Component< T >::Accessor
const Entityentity
 
- Protected Types inherited from CeresEngine::Component< T >::Accessor
using C = TC
 
- Protected Member Functions inherited from CeresEngine::Component< T >::Accessor
template<typename T >
auto mutate (T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename MutatorFunc , typename T >
requires (CInvocable<MutatorFunc, T&>)
decltype(automutate (MutatorFunc &&func, T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > mutate (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs)
 TODO Write docs.
 
template<typename MutatorFunc , typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > mutate (MutatorFunc &&func, T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptr)
 
template<typename T >
auto get (T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > get (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs)
 Accesses an element from an existing Component.
 
template<typename T >
const Tread (const T C::*ptr) const
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< const T1 &, const T2 &, const Ts &... > read (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const
 TODO Write docs.
 
template<typename T >
const Tget (const T C::*ptr) const
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< const T1 &, const T2 &, const Ts &... > get (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const
 Accesses an element from an existing Component.
 

Member Function Documentation

◆ applyForce()

void CeresEngine::RigidBodyComponent::Accessor::applyForce ( Vector3  force,
Vector3  relativePosition = Vector3(0.0) 
) const

Applies a force in a body.

Parameters
forceThe force, in Newtons, to be applied
relativePositionThe relative position to apply the force

◆ getAngularDamping()

double CeresEngine::RigidBodyComponent::Accessor::getAngularDamping ( ) const

The body's angular damping factor.

◆ getFriction()

double CeresEngine::RigidBodyComponent::Accessor::getFriction ( ) const

The body's friction factor.

◆ getLinearDamping()

double CeresEngine::RigidBodyComponent::Accessor::getLinearDamping ( ) const

The body's linear damping factor.

◆ getLocalInertia()

Vector3 CeresEngine::RigidBodyComponent::Accessor::getLocalInertia ( ) const

The rigid body local inertia.

◆ getMass()

double CeresEngine::RigidBodyComponent::Accessor::getMass ( ) const
noexcept

The rigid body mass.

◆ getMesh()

const HMesh & CeresEngine::RigidBodyComponent::Accessor::getMesh ( ) const

◆ getRestitution()

double CeresEngine::RigidBodyComponent::Accessor::getRestitution ( ) const

The body's restitution factor.

◆ getRollingFriction()

double CeresEngine::RigidBodyComponent::Accessor::getRollingFriction ( ) const

The body's rolling friction factor.

◆ getSpinningFriction()

double CeresEngine::RigidBodyComponent::Accessor::getSpinningFriction ( ) const

The body's spinning friction factor.

◆ isFixed()

bool CeresEngine::RigidBodyComponent::Accessor::isFixed ( ) const

If set to true, if the body is non-movable and the engine might use this to optimize calculations.

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::RigidBodyComponent::Accessor::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

◆ setAngularDamping()

void CeresEngine::RigidBodyComponent::Accessor::setAngularDamping ( double  angularDamping)

The body's angular damping factor.

◆ setFixed()

void CeresEngine::RigidBodyComponent::Accessor::setFixed ( bool  fixed)

If set to true, if the body is non-movable and the engine might use this to optimize calculations.

◆ setFriction()

void CeresEngine::RigidBodyComponent::Accessor::setFriction ( double  friction)

The body's friction factor.

◆ setLinearDamping()

void CeresEngine::RigidBodyComponent::Accessor::setLinearDamping ( double  linearDamping)

The body's linear damping factor.

◆ setLocalInertia()

void CeresEngine::RigidBodyComponent::Accessor::setLocalInertia ( Vector3  localInertia)

The rigid body local inertia.

◆ setMass()

void CeresEngine::RigidBodyComponent::Accessor::setMass ( double  mass)
noexcept

The rigid body mass.

◆ setMesh()

void CeresEngine::RigidBodyComponent::Accessor::setMesh ( HMesh  mesh)

◆ setRestitution()

void CeresEngine::RigidBodyComponent::Accessor::setRestitution ( double  restitution)

The body's restitution factor.

◆ setRollingFriction()

void CeresEngine::RigidBodyComponent::Accessor::setRollingFriction ( double  rollingFriction)

The body's rolling friction factor.

◆ setSpinningFriction()

void CeresEngine::RigidBodyComponent::Accessor::setSpinningFriction ( double  spinningFriction)

The body's spinning friction factor.


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