MULTIBODY SIMULATION SOFTWARE - API documentation

irr::ChIrrTools Class Reference

#include <CHdisplayTools.h>

List of all members.

Public Types

enum  eCh_ContactsDrawMode {
  CONTACT_NORMALS = 0, CONTACT_DISTANCES, CONTACT_FORCES_N, CONTACT_FORCES,
  CONTACT_NONE
}
enum  eCh_ContactsLabelMode {
  CONTACT_DISTANCES_VAL, CONTACT_FORCES_VAL, CONTACT_FORCES_N_VAL, CONTACT_FORCES_T_VAL,
  CONTACT_TORQUES_VAL, CONTACT_TORQUES_S_VAL, CONTACT_TORQUES_R_VAL, CONTACT_NONE_VAL
}

Static Public Member Functions

static void alignIrrlichtNodeToChronoCsys (scene::ISceneNode *mnode, chrono::ChCoordsys<> &mcoords)
static int drawAllContactPoints (chrono::ChSystem &mphysicalSystem, video::IVideoDriver *driver, double mlen=1.0, eCh_ContactsDrawMode drawtype=CONTACT_NORMALS)
static int drawAllContactLabels (chrono::ChSystem &mphysicalSystem, irr::IrrlichtDevice *device, eCh_ContactsLabelMode labeltype=CONTACT_FORCES_N_VAL, video::SColor mcol=video::SColor(255, 255, 255, 255))
static void drawHUDviolation (video::IVideoDriver *driver, IrrlichtDevice *mdevice, chrono::ChSystem &asystem, int mx=10, int my=290, int sx=300, int sy=100, double spfact=100.0, double posfact=500.0)
static void drawCHfunction (IrrlichtDevice *mdevice, chrono::ChFunction *fx, double xmin=0, double xmax=1, double ymin=-1, double ymax=1, int mx=10, int my=290, int sx=300, int sy=100)
static void drawSegment (video::IVideoDriver *driver, chrono::ChVector<> mstart, chrono::ChVector<> mend, video::SColor mcol=video::SColor(255, 0, 0, 0), bool use_Zbuffer=false)
static void drawPolyline (video::IVideoDriver *driver, std::vector< chrono::ChVector<> > mpoints, video::SColor mcol=video::SColor(255, 0, 0, 0), bool use_Zbuffer=false)
static void drawCircle (video::IVideoDriver *driver, double radius, chrono::ChCoordsys<> mpos=chrono::CSYSNORM, video::SColor mcol=video::SColor(255, 0, 0, 0), int mresolution=36, bool use_Zbuffer=false)
static void drawSpring (video::IVideoDriver *driver, double radius, chrono::ChVector<> start, chrono::ChVector<> end, video::SColor mcol=video::SColor(255, 0, 0, 0), int mresolution=65, double turns=5, bool use_Zbuffer=false)
static void drawGrid (video::IVideoDriver *driver, double ustep=0.1, double vstep=0.1, int nu=20, int nv=20, chrono::ChCoordsys<> mpos=chrono::CSYSNORM, video::SColor mcol=video::SColor(50, 80, 110, 110), bool use_Zbuffer=false)


Detailed Description

Class with static functions which help with the integration of Chrono::Engine and Irrlicht 3D rendering library.

Member Enumeration Documentation

enum irr::ChIrrTools::eCh_ContactsDrawMode

Easy-to-use function which draws contact points used by a ChSystem in the current Irrlicht viewer (the IVideoDriver). Small lines are drawn, of length mlen, aligned to contact normals.

enum irr::ChIrrTools::eCh_ContactsLabelMode

Easy-to-use function which draws contact informations as labels at the contact point


Member Function Documentation

static void irr::ChIrrTools::alignIrrlichtNodeToChronoCsys ( scene::ISceneNode *  mnode,
chrono::ChCoordsys<> &  mcoords 
) [static]

Function to align an Irrlicht object to a Chrono::Engine coordsys:

static void irr::ChIrrTools::drawSegment ( video::IVideoDriver *  driver,
chrono::ChVector<>  mstart,
chrono::ChVector<>  mend,
video::SColor  mcol = video::SColor(255,0,0,0),
bool  use_Zbuffer = false 
) [static]

Easy-to-use function to draw segment lines in 3D space, with given colour.

static void irr::ChIrrTools::drawPolyline ( video::IVideoDriver *  driver,
std::vector< chrono::ChVector<> >  mpoints,
video::SColor  mcol = video::SColor(255,0,0,0),
bool  use_Zbuffer = false 
) [static]

Easy-to-use function to draw a polyline in 3D space, given the array of points as a std::vector.

static void irr::ChIrrTools::drawCircle ( video::IVideoDriver *  driver,
double  radius,
chrono::ChCoordsys<>  mpos = chrono::CSYSNORM,
video::SColor  mcol = video::SColor(255,0,0,0),
int  mresolution = 36,
bool  use_Zbuffer = false 
) [static]

Easy-to-use function to draw a circle line in 3D space, with given colour. Specify the center as coordsys position. Orientation as coordsys quaternion (default in xy plane)

static void irr::ChIrrTools::drawSpring ( video::IVideoDriver *  driver,
double  radius,
chrono::ChVector<>  start,
chrono::ChVector<>  end,
video::SColor  mcol = video::SColor(255,0,0,0),
int  mresolution = 65,
double  turns = 5,
bool  use_Zbuffer = false 
) [static]

Easy-to-use function to draw a spring in 3D space, with given colour. Specify the radius, the end points in absolute space, the resolution (i.e. the number of segments approximating the helix) and the number of turns.

static void irr::ChIrrTools::drawGrid ( video::IVideoDriver *  driver,
double  ustep = 0.1,
double  vstep = 0.1,
int  nu = 20,
int  nv = 20,
chrono::ChCoordsys<>  mpos = chrono::CSYSNORM,
video::SColor  mcol = video::SColor(50,80,110,110),
bool  use_Zbuffer = false 
) [static]

Easy-to-use function to draw grids in 3D space, with given orientation, colour and spacing.


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