MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChExternalObject Class Reference

#include <CHexternalObject.h>

List of all members.

Public Member Functions

virtual
ChExternalObject
new_Duplicate ()=0
virtual char * GetName ()
virtual void onChronoChanged ()
virtual void onChronoProbeRecord (double mtime)
virtual void onChronoProbeReset ()
virtual void onAddCollisionGeometries (collision::ChCollisionModel *chmodel, ChBody *mbody, int lod, ChVector< double > *mt, ChMatrix33< double > *mr)
virtual
ChExternalObject
GetNthChild (int nc)
virtual
ChExternalObject
GetChildByName (char *mname)
virtual ChCoordsys GetPos ()
virtual void SetPos (ChCoordsys<> mpos)
virtual ChVector Eval (double u, double v, double w)
virtual ChVector Normal (double u, double v, double w)


Detailed Description

This class is used by ChObj as an interface to external object, that is 3rd party objects which may 'encapsulate' chrono objects inherited by the ChObj class. For example, a chrono ChBody object may be a property of a geometric object in a 3D modeler (for example a R3OBJ* in case of a plugin for the Realsoft3D software, or a SceneNode in case of Irrlicht rendering engine, etc.) Thank to this abstract interface, the chrono engine can 'talk' to the external encapsulator. Each custom implementation will provide the proper inherited version of this class, for example there may be a ChExtrenalObjectIrrlicht class, etc.

Member Function Documentation

virtual ChExternalObject* chrono::ChExternalObject::new_Duplicate (  )  [pure virtual]

Important!!! Derived classes MUST implement this function!

virtual char* chrono::ChExternalObject::GetName (  )  [virtual]

Interface to get the name of r3d-party encapsulator object, Derived classes may implement this.

virtual void chrono::ChExternalObject::onChronoChanged (  )  [virtual]

Interface to move the r3d-party encapsulator object. This function will be called each time a chrono object moves at the end of a frame simulation. Derived classes may implement this and take the proper actions.

virtual void chrono::ChExternalObject::onChronoProbeRecord ( double  mtime  )  [virtual]

Interface used by ChProbe() objects to tell that Chrono has completed a simulation step, at time 'mtime', and recording of data into external probe object is required for that time instant. Derived classes may implement this and take the proper actions.

virtual void chrono::ChExternalObject::onChronoProbeReset (  )  [virtual]

Interface used by ChProbe() objects to tell that Chrono wants the recorded data in external probe object to be reset/deleted. Derived classes may implement this and take the proper actions.

virtual void chrono::ChExternalObject::onAddCollisionGeometries ( collision::ChCollisionModel chmodel,
ChBody mbody,
int  lod,
ChVector< double > *  mt,
ChMatrix33< double > *  mr 
) [virtual]

Interface to tell that Chrono wants the 3rd-party encapsulator object to add collision geometries (for example, in a plugin implementation, here a conversion to native 3d objects to chrono collision objects may take place.) The required level of detail of conversion is 'lod'.

virtual ChExternalObject* chrono::ChExternalObject::GetNthChild ( int  nc  )  [virtual]

Interface to access the N-th sub-object (n-th child in tree hieararchy, if any). This _creates_ a ChExternalObject object enclosing the n-th child. If not success, or nc too high, return 0. Derived classes may implement this and take the proper actions.

virtual ChExternalObject* chrono::ChExternalObject::GetChildByName ( char *  mname  )  [virtual]

Given a name, _creates_ a ChExternalObject object enclosing an item whose name matches. If not success, returned 0. Derived classes may implement this and take the proper actions.

virtual ChCoordsys chrono::ChExternalObject::GetPos (  )  [virtual]

Returns position as ChCoordsys, if possible.

virtual void chrono::ChExternalObject::SetPos ( ChCoordsys<>  mpos  )  [virtual]

Set position, if possible.

virtual ChVector chrono::ChExternalObject::Eval ( double  u,
double  v,
double  w 
) [virtual]

Computes position at parametric u,v values, if it's a surface.

virtual ChVector chrono::ChExternalObject::Normal ( double  u,
double  v,
double  w 
) [virtual]

Computes normal at parametric u,v values, if it's a surface.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen