AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
agxSDK::SimulationObject Class Reference

Deprecated, used only for internal examples*. More...

#include <SimulationObject.h>

Public Member Functions

 SimulationObject ()
 Constructor for a SimulationObject that will store a reference to a Geometry and a RigidBody.
 
 SimulationObject (agxCollide::Geometry *geom, agx::RigidBody *body)
 Constructor for a SimulationObject that will store a reference to a Geometry and a RigidBody.
 
 SimulationObject (const SimulationObject &copy)
 Copy constructor.
 
 ~SimulationObject ()
 
agxCollide::GeometrygetGeometry ()
 
agx::RigidBodygetRigidBody ()
 
 operator agx::RigidBody * ()
 Cast operator.
 
 operator agxCollide::Geometry * ()
 Cast operator.
 
 operator const agx::RigidBody * () const
 Cast operator.
 
 operator const agxCollide::Geometry * () const
 Cast operator.
 
SimulationObjectoperator= (const SimulationObject &copy)
 
void setGeometry (agxCollide::Geometry *geom)
 
void setRigidBody (agx::RigidBody *body)
 

Static Public Member Functions

static SimulationObject createBox (const agx::String &name, const agx::AffineMatrix4x4 &transform, const agx::Vec3 &halfExtent, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createCapsule (const agx::String &name, const agx::AffineMatrix4x4 &transform, agx::Real radius, agx::Real height, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createCylinder (const agx::String &name, const agx::AffineMatrix4x4 &transform, agx::Real radius, agx::Real height, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createHeightField (const agx::String &name, const agx::AffineMatrix4x4 &transform, const agx::RealVector &heights, size_t resolutionX, size_t resolutionY, agx::Real sizeX, agx::Real sizeY, agx::Real bottomMargin, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::STATIC, bool createGeometry=true, bool createBody=false)
 Deprecated, used only for internal examples*.
 
static SimulationObject createHeightField (const agx::String &name, const agx::AffineMatrix4x4 &transform, const agx::String &filename, const agx::Real &sizeX, const agx::Real &sizeY, const agx::Real &low, const agx::Real &high, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::STATIC, bool createGeometry=true, bool createBody=false)
 Deprecated, used only for internal examples*.
 
static SimulationObject createPlane (const agx::String &name, const agx::AffineMatrix4x4 &transform, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::STATIC, bool createGeometry=true, bool createBody=false)
 Deprecated, used only for internal examples*.
 
static SimulationObject createSphere (const agx::String &name, const agx::AffineMatrix4x4 &transform, agx::Real radius, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createTrimesh (const agx::String &name, const agx::AffineMatrix4x4 &transform, agxCollide::Shape *cloneTrimesh, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createTrimesh (const agx::String &name, const agx::AffineMatrix4x4 &transform, const agx::String &filename, agx::Real bottomMargin, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 
static SimulationObject createTrimesh (const agx::String &name, const agx::AffineMatrix4x4 &transform, const agx::String &filename, agxSDK::Simulation *simulation, agx::RigidBody::MotionControl motionControl=agx::RigidBody::DYNAMICS, bool createGeometry=true, bool createBody=true)
 Deprecated, used only for internal examples*.
 

Protected Attributes

agx::RigidBodyRef m_body
 
agxCollide::GeometryRef m_geometry
 

Detailed Description

Deprecated, used only for internal examples*.

Utility class for storing a body and a geometry

Definition at line 39 of file agxSDK/SimulationObject.h.

Constructor & Destructor Documentation

◆ SimulationObject() [1/3]

agxSDK::SimulationObject::SimulationObject ( agxCollide::Geometry geom,
agx::RigidBody body 
)
inline

Constructor for a SimulationObject that will store a reference to a Geometry and a RigidBody.

Definition at line 44 of file agxSDK/SimulationObject.h.

◆ SimulationObject() [2/3]

agxSDK::SimulationObject::SimulationObject ( )
inlineexplicit

Constructor for a SimulationObject that will store a reference to a Geometry and a RigidBody.

Definition at line 49 of file agxSDK/SimulationObject.h.

◆ SimulationObject() [3/3]

agxSDK::SimulationObject::SimulationObject ( const SimulationObject copy)
inline

Copy constructor.

Definition at line 52 of file agxSDK/SimulationObject.h.

References m_body, and m_geometry.

◆ ~SimulationObject()

agxSDK::SimulationObject::~SimulationObject ( )
inline

Definition at line 68 of file agxSDK/SimulationObject.h.

Member Function Documentation

◆ createBox()

static SimulationObject agxSDK::SimulationObject::createBox ( const agx::String name,
const agx::AffineMatrix4x4 transform,
const agx::Vec3 halfExtent,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a box including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
halfExtent- Half extents of the Box.
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a cylinder shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createCapsule()

static SimulationObject agxSDK::SimulationObject::createCapsule ( const agx::String name,
const agx::AffineMatrix4x4 transform,
agx::Real  radius,
agx::Real  height,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a capsule including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
radius- Radius of the capsule
height- height of the capsule
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a capsule shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createCylinder()

static SimulationObject agxSDK::SimulationObject::createCylinder ( const agx::String name,
const agx::AffineMatrix4x4 transform,
agx::Real  radius,
agx::Real  height,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a cylinder including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
radius- Radius of the cylinder
height- Height of the cylinder
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a cylinder shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createHeightField() [1/2]

static SimulationObject agxSDK::SimulationObject::createHeightField ( const agx::String name,
const agx::AffineMatrix4x4 transform,
const agx::RealVector heights,
size_t  resolutionX,
size_t  resolutionY,
agx::Real  sizeX,
agx::Real  sizeY,
agx::Real  bottomMargin,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::STATIC,
bool  createGeometry = true,
bool  createBody = false 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a HeightField including:

The HeightField will point upwards in z direction in its local coordinate system.

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the Geometry
heights- The heights values in
resolutionXThe number of sample points in dimension x. resolutionX * resolutionY should be heights.size()
resolutionYThe number of sample points in dimension y. resolutionX * resolutionY should be heights.size()
sizeXThe physical size in dimension x.
sizeYThe physical size in dimension y.
bottomMarginHow deep is the HeightField under its lowest point?
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a sphere shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createHeightField() [2/2]

static SimulationObject agxSDK::SimulationObject::createHeightField ( const agx::String name,
const agx::AffineMatrix4x4 transform,
const agx::String filename,
const agx::Real sizeX,
const agx::Real sizeY,
const agx::Real low,
const agx::Real high,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::STATIC,
bool  createGeometry = true,
bool  createBody = false 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a HeightField including:

The HeightField will point upwards in z direction in its local coordinate system.

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
filename- The path to an image file (PNG format).
sizeX,sizeY- The size in world coordinates that the image file/heightfield will be mapped to.
low,high- The range of heights which the data in the image file will be mapped to.
transform- The transformation that will be applied to the RigidBody and the Geometry
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a sphere shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createPlane()

static SimulationObject agxSDK::SimulationObject::createPlane ( const agx::String name,
const agx::AffineMatrix4x4 transform,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::STATIC,
bool  createGeometry = true,
bool  createBody = false 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a plane including:

The plane will point upwards in z direction in its local coordinate system.

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a sphere shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createSphere()

static SimulationObject agxSDK::SimulationObject::createSphere ( const agx::String name,
const agx::AffineMatrix4x4 transform,
agx::Real  radius,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a sphere including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
radius- Radius of the sphere
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a sphere shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createTrimesh() [1/3]

static SimulationObject agxSDK::SimulationObject::createTrimesh ( const agx::String name,
const agx::AffineMatrix4x4 transform,
agxCollide::Shape cloneTrimesh,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a trimesh including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
cloneTrimesh- A pointer to a agxCollide::Trimesh that the Geometry data should be reused from. The cloneTrimesh has to be finalized, if not =nullptr.
simulation- A pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a capsule shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createTrimesh() [2/3]

static SimulationObject agxSDK::SimulationObject::createTrimesh ( const agx::String name,
const agx::AffineMatrix4x4 transform,
const agx::String filename,
agx::Real  bottomMargin,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a trimesh including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
filename- The name of the file containing the mesh data. Currently, .obj files are supported.
bottomMarginA safety threshold for catching collisions below the terrain surface.
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a capsule shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ createTrimesh() [3/3]

static SimulationObject agxSDK::SimulationObject::createTrimesh ( const agx::String name,
const agx::AffineMatrix4x4 transform,
const agx::String filename,
agxSDK::Simulation simulation,
agx::RigidBody::MotionControl  motionControl = agx::RigidBody::DYNAMICS,
bool  createGeometry = true,
bool  createBody = true 
)
static

Deprecated, used only for internal examples*.

Utility function for creating a trimesh including:

The Geometry will be placed at the center of mass of the RigidBody. If you want to move the Geometry, relative to the RigidBody COM, just use the Geometry::getFrame::setLocalTranslate

Parameters
name- The name that the RigidBody and the Geometry will get.
transform- The transformation that will be applied to the RigidBody and the Geometry
filename- The name of the file containing the mesh data. Currently, .obj files are supported.
simulation- a pointer to a agxSDK::Simulation, where the RigidBody and the Geometry will be added, if simulation != nullptr
motionControl- Determines whether the RigidBody should be STATIC, DYNAMICS or KINEMATICS
createGeometry- If true a Geometry including a capsule shape will be created.
createBody- If true, a RigidBody will be created.
Returns
a SimulationObject with the created Geometry and RigidBody.

◆ getGeometry()

agxCollide::Geometry * agxSDK::SimulationObject::getGeometry ( )
inline
Returns
the geometry

Definition at line 71 of file agxSDK/SimulationObject.h.

◆ getRigidBody()

agx::RigidBody * agxSDK::SimulationObject::getRigidBody ( )
inline
Returns
the rigidbody

Definition at line 75 of file agxSDK/SimulationObject.h.

◆ operator agx::RigidBody *()

agxSDK::SimulationObject::operator agx::RigidBody * ( )
inline

Cast operator.

Returns
The contained Rigidbody

Definition at line 79 of file agxSDK/SimulationObject.h.

◆ operator agxCollide::Geometry *()

agxSDK::SimulationObject::operator agxCollide::Geometry * ( )
inline

Cast operator.

Returns
The contained Geometry

Definition at line 81 of file agxSDK/SimulationObject.h.

◆ operator const agx::RigidBody *()

agxSDK::SimulationObject::operator const agx::RigidBody * ( ) const
inline

Cast operator.

Returns
The contained Rigidbody

Definition at line 83 of file agxSDK/SimulationObject.h.

◆ operator const agxCollide::Geometry *()

agxSDK::SimulationObject::operator const agxCollide::Geometry * ( ) const
inline

Cast operator.

Returns
The contained Geometry

Definition at line 85 of file agxSDK/SimulationObject.h.

◆ operator=()

SimulationObject & agxSDK::SimulationObject::operator= ( const SimulationObject copy)
inline

Definition at line 58 of file agxSDK/SimulationObject.h.

References m_body, and m_geometry.

◆ setGeometry()

void agxSDK::SimulationObject::setGeometry ( agxCollide::Geometry geom)
inline

Definition at line 72 of file agxSDK/SimulationObject.h.

◆ setRigidBody()

void agxSDK::SimulationObject::setRigidBody ( agx::RigidBody body)
inline

Definition at line 76 of file agxSDK/SimulationObject.h.

Member Data Documentation

◆ m_body

agx::RigidBodyRef agxSDK::SimulationObject::m_body
protected

Definition at line 412 of file agxSDK/SimulationObject.h.

Referenced by SimulationObject(), and operator=().

◆ m_geometry

agxCollide::GeometryRef agxSDK::SimulationObject::m_geometry
protected

Definition at line 411 of file agxSDK/SimulationObject.h.

Referenced by SimulationObject(), and operator=().


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