argos::CPointMass3DEngine Class Reference

#include <pointmass3d_engine.h>

Inheritance diagram for argos::CPointMass3DEngine:
Collaboration diagram for argos::CPointMass3DEngine:

Public Member Functions

 CPointMass3DEngine ()
 
virtual ~CPointMass3DEngine ()
 
virtual void Init (TConfigurationNode &t_tree)
 Initializes the resource. More...
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
virtual void Update ()
 
virtual size_t GetNumPhysicsModels ()
 
virtual bool AddEntity (CEntity &c_entity)
 Adds an entity to the physics engine. More...
 
virtual bool RemoveEntity (CEntity &c_entity)
 Removes an entity from the physics engine. More...
 
virtual bool IsPointContained (const CVector3 &c_point)
 Returns true if the given point is contained in this physics engine. More...
 
virtual bool IsEntityTransferNeeded () const
 
virtual void TransferEntities ()
 Executes the transfer of entities to other engines. More...
 
virtual void CheckIntersectionWithRay (TEmbodiedEntityIntersectionData &t_data, const CRay3 &c_ray) const
 Check which objects in this engine intersect the given ray. More...
 
void AddPhysicsModel (const std::string &str_id, CPointMass3DModel &c_model)
 
void RemovePhysicsModel (const std::string &str_id)
 
std::map< std::string, CPointMass3DModel * > & GetPhysicsModels ()
 
const std::map< std::string, CPointMass3DModel * > & GetPhysicsModels () const
 
Real GetGravity () const
 
- Public Member Functions inherited from argos::CPhysicsEngine
 CPhysicsEngine ()
 
virtual ~CPhysicsEngine ()
 
virtual void PostSpaceInit ()
 Executes extra initialization activities after the space has been initialized. More...
 
bool IsEntityTransferNeeded () const
 Returns true if this engine has entities that must be transferred to another engine. More...
 
bool IsEntityTransferActive () const
 Returns true if entity transfer is active for this engine. More...
 
virtual void ScheduleEntityForTransfer (CEmbodiedEntity &c_entity)
 Schedules an entity of transfer. More...
 
SVolumeGetVolume ()
 Returns the boundary faces for the volume associated to this engine. More...
 
const SVolumeGetVolume () const
 Returns the boundary faces for the volume associated to this engine. More...
 
UInt32 GetIterations () const
 Returns the number of iterations per simulation clock tick. More...
 
Real GetPhysicsClockTick () const
 Returns the length of the physics engine tick. More...
 
const std::string & GetId () const
 Returns the id of this physics engine. More...
 
void SetId (const std::string &str_id)
 Sets the id of this physics engine. More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Additional Inherited Members

- Public Types inherited from argos::CPhysicsEngine
typedef std::vector< CPhysicsEngine * > TVector
 
typedef std::map< std::string, CPhysicsEngine *, std::less< std::string > > TMap
 
- Static Public Member Functions inherited from argos::CPhysicsEngine
static Real GetSimulationClockTick ()
 Returns the simulation clock tick. More...
 
static Real GetInverseSimulationClockTick ()
 Returns the inverse of GetSimulationClockTick(). More...
 
static void SetSimulationClockTick (Real f_simulation_clock_tick)
 Sets the simulation clock tick. More...
 

Detailed Description

Definition at line 22 of file pointmass3d_engine.h.

Constructor & Destructor Documentation

◆ CPointMass3DEngine()

argos::CPointMass3DEngine::CPointMass3DEngine ( )

Definition at line 17 of file pointmass3d_engine.cpp.

◆ ~CPointMass3DEngine()

argos::CPointMass3DEngine::~CPointMass3DEngine ( )
virtual

Definition at line 24 of file pointmass3d_engine.cpp.

Member Function Documentation

◆ AddEntity()

bool argos::CPointMass3DEngine::AddEntity ( CEntity c_entity)
virtual

Adds an entity to the physics engine.

Important: when you implement this function, you must also take care of adding the physics model to the associated embodied entity.

Returns
true if the entity was added, false otherwise.

Implements argos::CPhysicsEngine.

Definition at line 96 of file pointmass3d_engine.cpp.

◆ AddPhysicsModel()

void argos::CPointMass3DEngine::AddPhysicsModel ( const std::string &  str_id,
CPointMass3DModel c_model 
)

Definition at line 154 of file pointmass3d_engine.cpp.

◆ CheckIntersectionWithRay()

void argos::CPointMass3DEngine::CheckIntersectionWithRay ( TEmbodiedEntityIntersectionData t_data,
const CRay3 c_ray 
) const
virtual

Check which objects in this engine intersect the given ray.

Parameters
t_dataThe list of entities that intersect the ray.
c_rayThe test ray.

Implements argos::CPhysicsEngine.

Definition at line 136 of file pointmass3d_engine.cpp.

◆ Destroy()

void argos::CPointMass3DEngine::Destroy ( )
virtual

Undoes whatever was done by Init().

Reimplemented from argos::CPhysicsEngine.

Definition at line 50 of file pointmass3d_engine.cpp.

◆ GetGravity()

Real argos::CPointMass3DEngine::GetGravity ( ) const
inline

Definition at line 60 of file pointmass3d_engine.h.

◆ GetNumPhysicsModels()

size_t argos::CPointMass3DEngine::GetNumPhysicsModels ( )
virtual

Implements argos::CPhysicsEngine.

Definition at line 89 of file pointmass3d_engine.cpp.

◆ GetPhysicsModels() [1/2]

std::map<std::string, CPointMass3DModel*>& argos::CPointMass3DEngine::GetPhysicsModels ( )
inline

Definition at line 52 of file pointmass3d_engine.h.

◆ GetPhysicsModels() [2/2]

const std::map<std::string, CPointMass3DModel*>& argos::CPointMass3DEngine::GetPhysicsModels ( ) const
inline

Definition at line 56 of file pointmass3d_engine.h.

◆ Init()

void argos::CPointMass3DEngine::Init ( TConfigurationNode t_tree)
virtual

Initializes the resource.

Parameters
t_treethe base of the XML configuration tree to parse
Exceptions
CARGoSExceptionif an error occurs

Reimplemented from argos::CPhysicsEngine.

Definition at line 30 of file pointmass3d_engine.cpp.

◆ IsEntityTransferNeeded()

bool argos::CPointMass3DEngine::IsEntityTransferNeeded ( ) const
virtual

Definition at line 123 of file pointmass3d_engine.cpp.

◆ IsPointContained()

bool argos::CPointMass3DEngine::IsPointContained ( const CVector3 c_point)
virtual

Returns true if the given point is contained in this physics engine.

Reimplemented from argos::CPhysicsEngine.

Definition at line 116 of file pointmass3d_engine.cpp.

◆ RemoveEntity()

bool argos::CPointMass3DEngine::RemoveEntity ( CEntity c_entity)
virtual

Removes an entity from the physics engine.

Important: when you implement this function, you must also take care of removing the physics model to the associated embodied entity.

Returns
true if the entity was added, false otherwise.

Implements argos::CPhysicsEngine.

Definition at line 106 of file pointmass3d_engine.cpp.

◆ RemovePhysicsModel()

void argos::CPointMass3DEngine::RemovePhysicsModel ( const std::string &  str_id)

Definition at line 162 of file pointmass3d_engine.cpp.

◆ Reset()

void argos::CPointMass3DEngine::Reset ( )
virtual

Resets the resource.

Reimplemented from argos::CPhysicsEngine.

Definition at line 40 of file pointmass3d_engine.cpp.

◆ TransferEntities()

void argos::CPointMass3DEngine::TransferEntities ( )
virtual

Executes the transfer of entities to other engines.

Reimplemented from argos::CPhysicsEngine.

Definition at line 130 of file pointmass3d_engine.cpp.

◆ Update()

void argos::CPointMass3DEngine::Update ( )
virtual

Implements argos::CPhysicsEngine.

Definition at line 62 of file pointmass3d_engine.cpp.