pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
Model::ConstBodyProxy Class Reference

A const proxy object that provides a read-only AoS-like interface to a body stored in the Bodies SoA container. More...

#include <body.hpp>

Inheritance diagram for Model::ConstBodyProxy:
Inheritance graph
Collaboration diagram for Model::ConstBodyProxy:
Collaboration graph

Public Member Functions

 ConstBodyProxy (const Bodies &in_bodies, std::size_t in_index)
 Construct a new Const Body Proxy object. More...
 
- Public Member Functions inherited from Model::BodyProxyBase< const Bodies >
 BodyProxyBase (const Bodies &in_bodies, std::size_t in_index)
 Construct a new Body Proxy Base object. More...
 
double m () const noexcept
 Access to body masses. More...
 
double getInverseMass () const
 Access to the inverse of the body masses. More...
 
double r () const noexcept
 Access to body radii. More...
 
double getInverseInertia () const
 Access to the inverse of the body's moment of inertia. More...
 
const Vector3d & x () const noexcept
 Access to body positions. More...
 
const Vector3d & v () const noexcept
 Access to body velocities. More...
 
const Quaterniond & q () const noexcept
 Access to body orientation. More...
 
const Vector3d & omega () const noexcept
 Access to body angular velocities. More...
 

Additional Inherited Members

- Protected Attributes inherited from Model::BodyProxyBase< const Bodies >
const Bodiesbodies_
 Reference to the main SoA container. More...
 
std::size_t index_
 The index of the body this proxy refers to. More...
 

Detailed Description

A const proxy object that provides a read-only AoS-like interface to a body stored in the Bodies SoA container.

Definition at line 252 of file body.hpp.

Constructor & Destructor Documentation

◆ ConstBodyProxy()

Model::ConstBodyProxy::ConstBodyProxy ( const Bodies in_bodies,
std::size_t  in_index 
)
inline

Construct a new Const Body Proxy object.

Parameters
in_bodiesThe Bodies container to be accessed.
in_indexThe index of the body this proxy will access.

Definition at line 560 of file body.hpp.


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