Description
Utilities for interfacing Chrono and Irrlicht.
Functions | |
video::SColorf | ToIrrlichtSColorf (const ChColor &col) |
Convert a ChColor to an Irrlicht SColorf. | |
video::SColor | ToIrrlichtSColor (const ChColor &col, float alpha=1.0) |
Convert an RGB set and an opacity value to an Irrlicht SColor. | |
video::SMaterial | ToIrrlichtMaterial (std::shared_ptr< ChVisualMaterial > mat, video::IVideoDriver *driver) |
void | alignIrrlichtNode (scene::ISceneNode *mnode, const ChCoordsys<> &mcoords) |
int | drawAllContactPoints (ChVisualSystemIrrlicht *vis, double mlen=1.0, ContactsDrawMode drawtype=ContactsDrawMode::CONTACT_NORMALS) |
Draw contact points used by a ChSystem in the current Irrlicht viewer. More... | |
int | drawAllContactLabels (ChVisualSystemIrrlicht *vis, ContactsLabelMode labeltype=ContactsLabelMode::CONTACT_FORCES_N_VAL, ChColor col=ChColor(1, 1, 1)) |
Draw contact informations as labels at the contact point. | |
int | drawAllLinks (ChVisualSystemIrrlicht *vis, double mlen=1.0, LinkDrawMode drawtype=LinkDrawMode::LINK_REACT_FORCE) |
Draw reaction forces in all contacts in current Irrlicht viewer. | |
int | drawAllLinkLabels (ChVisualSystemIrrlicht *vis, LinkLabelMode labeltype=LinkLabelMode::LINK_REACT_FORCE_X, ChColor col=ChColor(1, 1, 1)) |
Draw contact informations as labels at the contact point. | |
int | drawAllBoundingBoxes (ChVisualSystemIrrlicht *vis) |
Draw collision objects bounding boxes for rigid bodies (if they have a collision shape). | |
int | drawAllCOGs (ChVisualSystemIrrlicht *vis, double scale=0.01) |
Draw coordinate systems of ChBody objects. | |
int | drawAllLinkframes (ChVisualSystemIrrlicht *vis, double scale=0.01) |
Draw coordinate systems of link frames. | |
void | drawHUDviolation (ChVisualSystemIrrlicht *vis, int mx, int my, int sx, int sy, double spfact) |
void | drawChFunction (ChVisualSystemIrrlicht *vis, std::shared_ptr< chrono::ChFunction > fx, double xmin, double xmax, double ymin, double ymax, int mx, int my, int sx, int sy, chrono::ChColor col, const char *title) |
void | drawSegment (ChVisualSystemIrrlicht *vis, ChVector<> start, ChVector<> end, ChColor col=ChColor(1, 1, 1), bool use_Zbuffer=false) |
Draw line segments in 3D space with given color. | |
void | drawPolyline (ChVisualSystemIrrlicht *vis, std::vector< ChVector<> > &points, ChColor col=ChColor(1, 1, 1), bool use_Zbuffer=false) |
Draw a polyline in 3D space, given the array of points. | |
void | drawCircle (ChVisualSystemIrrlicht *vis, double radius, ChCoordsys<> pos=CSYSNORM, ChColor col=ChColor(1, 1, 1), int resolution=36, bool use_Zbuffer=false) |
Draw a circle line in 3D space with given color. More... | |
void | drawSpring (ChVisualSystemIrrlicht *vis, double radius, ChVector<> start, ChVector<> end, ChColor col=ChColor(1, 1, 1), int resolution=65, double turns=5, bool use_Zbuffer=false) |
Draw a spring in 3D space with given color. More... | |
void | drawRotSpring (ChVisualSystemIrrlicht *vis, ChCoordsys<> pos, double radius, double start_angle, double end_angle, chrono::ChColor col, int resolution, bool use_Zbuffer) |
void | drawGrid (ChVisualSystemIrrlicht *vis, double ustep=0.1, double vstep=0.1, int nu=20, int nv=20, ChCoordsys<> pos=CSYSNORM, ChColor col=ChColor(0.7f, 0.7f, 0.7f), bool use_Zbuffer=false) |
Draw grids in 3D space with given orientation, color, and spacing. | |
void | drawColorbar (ChVisualSystemIrrlicht *vis, double vmin, double vmax, const std::string &label, int mx, int my, int sx, int sy) |
Easy-to-use function to draw color map 2D legend. More... | |
void | drawPlot3D (ChVisualSystemIrrlicht *vis, ChMatrixConstRef X, ChMatrixConstRef Y, ChMatrixConstRef Z, ChCoordsys<> pos, chrono::ChColor col, bool use_Zbuffer) |
void | drawProfilerRecursive (utils::ChProfileIterator *profileIterator, irr::IrrlichtDevice *device, int mx, int my, int sx, int sy, int xspacing, int &ypos) |
void | drawProfiler (ChVisualSystemIrrlicht *vis) |
Render run-time profiler info. | |
void | drawCoordsys (ChVisualSystemIrrlicht *vis, const ChCoordsys<> &coord=CSYSNORM, double scale=1) |
Draw RGB coordinate system. | |
ChApiIrr irr::video::SMaterial | ToIrrlichtMaterial (std::shared_ptr< ChVisualMaterial > mat, irr::video::IVideoDriver *driver) |
Convert a ChVisualMaterial to an Irrlicht material. | |
ChApiIrr void | alignIrrlichtNode (irr::scene::ISceneNode *mnode, const ChCoordsys<> &mcoords) |
Align an Irrlicht object to a the specified coordinate system. | |
ChApiIrr void | drawChFunction (ChVisualSystemIrrlicht *vis, std::shared_ptr< 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, ChColor col=ChColor(1, 0, 0), const char *title=0) |
Function Documentation
◆ drawAllContactPoints()
ChApiIrr int chrono::irrlicht::tools::drawAllContactPoints | ( | ChVisualSystemIrrlicht * | vis, |
double | mlen = 1.0 , |
||
ContactsDrawMode | drawtype = ContactsDrawMode::CONTACT_NORMALS |
||
) |
Draw contact points used by a ChSystem in the current Irrlicht viewer.
The contact points are visually represented with short lines, of length mlen, aligned to contact normals.
◆ drawCircle()
ChApiIrr void chrono::irrlicht::tools::drawCircle | ( | ChVisualSystemIrrlicht * | vis, |
double | radius, | ||
ChCoordsys<> | pos = CSYSNORM , |
||
ChColor | col = ChColor(1, 1, 1) , |
||
int | resolution = 36 , |
||
bool | use_Zbuffer = false |
||
) |
Draw a circle line in 3D space with given color.
The circle is centered in the X-Y plane of the provided coordinate system.
◆ drawColorbar()
ChApiIrr void chrono::irrlicht::tools::drawColorbar | ( | ChVisualSystemIrrlicht * | vis, |
double | vmin, | ||
double | vmax, | ||
const std::string & | label, | ||
int | mx, | ||
int | my, | ||
int | sx, | ||
int | sy | ||
) |
Easy-to-use function to draw color map 2D legend.
Draw color bar with a color map and 2D legend.
◆ drawSpring()
ChApiIrr void chrono::irrlicht::tools::drawSpring | ( | ChVisualSystemIrrlicht * | vis, |
double | radius, | ||
ChVector<> | start, | ||
ChVector<> | end, | ||
ChColor | col = ChColor(1, 1, 1) , |
||
int | resolution = 65 , |
||
double | turns = 5 , |
||
bool | use_Zbuffer = false |
||
) |
Draw a spring in 3D space with given color.
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.