chrono::irrlicht::ChBodySceneNode Class Reference

Description

Irrlicht scene node for a body.

#include <ChBodySceneNode.h>

Inherits ISceneNode.

Public Member Functions

 ChBodySceneNode (ChSystem *msystem, irr::scene::IAnimatedMesh *mesh, irr::scene::ISceneNode *parent, irr::scene::ISceneManager *mgr, irr::s32 id)
 Build a scene node for the Irrlicht Engine. More...
 
 ChBodySceneNode (ChSystem *msystem, irr::scene::IAnimatedMesh *mesh, irr::scene::ISceneNode *parent, irr::scene::ISceneManager *mgr, irr::s32 id, const ChVector<> &offset)
 Build a scene node for the Irrlicht Engine with a specified offset of the visualization mesh, relative to the body COM. More...
 
 ~ChBodySceneNode ()
 Destructor. More...
 
virtual void OnRegisterSceneNode ()
 
virtual void render ()
 
virtual const irr::core::aabbox3d< irr::f32 > & getBoundingBox () const
 
virtual void setMaterialTexture (irr::s32 textureLayer, irr::video::ITexture *texture)
 
virtual irr::u32 getMaterialCount ()
 
virtual irr::video::SMaterial & getMaterial (irr::u32 i)
 
void OnAnimate (irr::u32 timeMs)
 
virtual irr::scene::IShadowVolumeSceneNode * addShadowVolumeSceneNode (const irr::scene::IMesh *shadowMesh=0, irr::s32 id=-1, bool zfailmethod=true, irr::f32 infinity=10000.0f)
 
std::shared_ptr< ChBody > & GetBody ()
 Returns reference to the shared pointer which references the rigid body wrapped by this scene node.
 
virtual bool IsChronoControlled () const
 Returns true if the node is moved by Chrono simulation system.
 
virtual void SetChronoControlled (const bool &controlled)
 Set true if you want Chrono to include this body in simulation.
 
irr::scene::IAnimatedMeshSceneNode * GetChildMesh ()
 
virtual irr::scene::ESCENE_NODE_TYPE getType () const
 

Constructor & Destructor Documentation

◆ ChBodySceneNode() [1/2]

chrono::irrlicht::ChBodySceneNode::ChBodySceneNode ( ChSystem msystem,
irr::scene::IAnimatedMesh *  mesh,
irr::scene::ISceneNode *  parent,
irr::scene::ISceneManager *  mgr,
irr::s32  id 
)

Build a scene node for the Irrlicht Engine.

This scene node is also a rigid body for the Chrono multibody simulation. As soon as created, the wrapped ChBody is also added to Chrono system. To delete a ChBodyScene node from an Irrlicht scene, use the remove() function only! (it will also be removed from the Chrono system).

Parameters
msystempointer to the Chrono physical simulation system
mesha 3D mesh for representing the shape of the body
parentthe parent node in Irrlicht hierarchy
mgrthe Irrlicht scene manager
idthe Irrlicht identifier

◆ ChBodySceneNode() [2/2]

chrono::irrlicht::ChBodySceneNode::ChBodySceneNode ( ChSystem msystem,
irr::scene::IAnimatedMesh *  mesh,
irr::scene::ISceneNode *  parent,
irr::scene::ISceneManager *  mgr,
irr::s32  id,
const ChVector<> &  offset 
)

Build a scene node for the Irrlicht Engine with a specified offset of the visualization mesh, relative to the body COM.

Parameters
msystempointer to the Chrono physical simulation system
mesha 3D mesh for representing the shape of the body
parentthe parent node in Irrlicht hierarchy
mgrthe Irrlicht manager
idthe Irrlicht identifier
offsetoffset between mesh and body COM

◆ ~ChBodySceneNode()

chrono::irrlicht::ChBodySceneNode::~ChBodySceneNode ( )

Destructor.

Note: as this Irrlicht node is destructed, it also automatically removes the wrapped ChBody from the Chrono.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_irrlicht/ChBodySceneNode.h
  • /builds/uwsbel/chrono/src/chrono_irrlicht/ChBodySceneNode.cpp