DubiousEngine
0.2.0
Simple Game Engine
|
#include <Physics_object.h>
Public Member Functions | |
Physics_object (const std::shared_ptr< Physics_model > &model, float mass) | |
Constructor. More... | |
Physics_object (const Physics_object &)=delete | |
Physics_object & | operator= (const Physics_object &)=delete |
const Physics_model & | model () const |
Model Accessor. More... | |
Math::Coordinate_space & | coordinate_space () |
Accessor. More... | |
const Math::Coordinate_space & | coordinate_space () const |
float | inverse_mass () const |
const Math::Vector & | velocity () const |
Math::Vector & | velocity () |
const Math::Vector & | force () const |
Math::Vector & | force () |
float | inverse_moment_of_inertia () const |
const Math::Vector & | angular_velocity () const |
Math::Vector & | angular_velocity () |
const Math::Vector & | torque () const |
Math::Vector & | torque () |
Static Public Attributes | |
static const float | STATIONARY = -1 |
A Physics Object.
The actual object that will be used in collision detection/response. This one holds things like forces, velocities, etc. It's the basic representation of something in Physics
Dubious::Physics::Physics_object::Physics_object | ( | const std::shared_ptr< Physics_model > & | model, |
float | mass | ||
) |
Constructor.
|
delete |
|
inline |
|
inline |
|
inline |
Accessor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Model Accessor.
This function is used during broadphase collision detection to get the radius. As such it's called a LOT. In a simple, single threaded test when this returns a std::shared_ptr<Physics_model> the test ran in 2.4 seconds. When changed to a const reference it ran in 0.76 seconds. Do not change this without serious profiling
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |