Public Member Functions |
Protected Member Functions |
Protected Attributes |
Friends |
List of all members
chrono::vehicle::ChVehicleVisualSystemIrrlicht Class Reference
Description
custom event receiver for chase-cam control
Customized Chrono Irrlicht visualization for vehicle simulations. This class implements an Irrlicht-based visualization wrapper for vehicles. This class extends ChVisualSystemIrrlicht and provides the following functionality:
- rendering of the entire Irrlicht scene
- custom chase-camera (which can be controlled with keyboard)
- optional rendering of links, springs, stats, etc.
#include <ChVehicleVisualSystemIrrlicht.h>
Inheritance diagram for chrono::vehicle::ChVehicleVisualSystemIrrlicht:

Collaboration diagram for chrono::vehicle::ChVehicleVisualSystemIrrlicht:

Public Member Functions | |
| ChVehicleVisualSystemIrrlicht () | |
| Construct a vehicle Irrlicht visualization system. | |
| virtual void | AttachVehicle (vehicle::ChVehicle *vehicle) override |
| Attach a vehicle to this Irrlicht vehicle visualization system. | |
| void | SetHUDLocation (int HUD_x, int HUD_y) |
| Set the upper-left point of HUD elements. | |
| void | EnableStats (bool val) |
| Turn on/off rendering of stats (HUD). | |
| void | EnableSound (bool sound) |
| Turn on/off Irrklang sound generation. | |
| virtual void | Initialize () override |
| Initialize the visualization system. | |
| virtual void | Render () override |
| Render the Irrlicht scene and additional visual elements. | |
| virtual void | Advance (double step) override |
| Advance the dynamics of the chase camera. | |
Public Member Functions inherited from chrono::irrlicht::ChVisualSystemIrrlicht | |
| ChVisualSystemIrrlicht (ChSystem *sys, const ChVector3d &camera_pos=ChVector3d(2, 2, 2), const ChVector3d &camera_targ=ChVector3d(0, 0, 0)) | |
| Auto-initialized run-time visualization system, with default settings. | |
| virtual void | AttachSystem (ChSystem *sys) override |
| Attach another Chrono system to the run-time visualization system. | |
| void | SetAntialias (bool val) |
| Enable/disable antialias (default true). | |
| void | SetFullscreen (bool val) |
| Enable/disable full-screen mode (default false). | |
| void | SetShadows (bool val) |
| Enable/disable shadows (default false). | |
| void | SetDriverType (irr::video::E_DRIVER_TYPE driver_type) |
| Set the device driver type (default irr::video::EDT_DIRECT3D9). | |
| void | SetWindowSize (unsigned int width, unsigned int height) |
| Set the window size (default 640x480). | |
| void | SetWindowTitle (const std::string &win_title) |
| Set the windoiw title (default ""). | |
| void | SetWindowId (void *window_id) |
| Set the window ID. | |
| void | SetCameraVertical (CameraVerticalDir vert) |
| Use Y-up camera rendering (default CameraVerticalDir::Y). | |
| CameraVerticalDir | GetCameraVertical () |
| Tells if the current camera vertical mode is Y or Z. | |
| void | SetLogLevel (irr::ELOG_LEVEL log_level) |
| Set the Irrlicht logging level (default irr::ELL_INFORMATION). | |
| void | SetSymbolScale (double scale) |
| Set the scale for symbol drawing (default: 1). | |
| void | AddLogo (const std::string &logo_filename=GetChronoDataFile("logo_chronoengine_alpha.png")) |
| Add a logo in a 3D scene. | |
| virtual int | AddCamera (const ChVector3d &pos, ChVector3d targ=VNULL) override |
| Add a camera in an Irrlicht 3D scene. | |
| virtual void | AddGrid (double x_step, double y_step, int nx, int ny, ChCoordsys<> pos=CSYSNORM, ChColor col=ChColor(0.1f, 0.1f, 0.1f)) override |
| Add a grid with specified parameters in the x-y plane of the given frame. | |
| void | UpdateGrid (int id, const ChCoordsys<> &csys) |
| virtual void | SetCameraPosition (int id, const ChVector3d &pos) override |
| Set the location of the specified camera. | |
| virtual void | SetCameraTarget (int id, const ChVector3d &target) override |
| Set the target (look-at) point of the specified camera. | |
| virtual void | SetCameraPosition (const ChVector3d &pos) override |
| Set the location of the current (active) camera. | |
| virtual void | SetCameraTarget (const ChVector3d &target) override |
| Set the target (look-at) point of the current (active) camera. | |
| void | AddSkyBox (const std::string &texture_dir=GetChronoDataFile("skybox/")) |
| Add a sky box in a 3D scene. | |
| irr::scene::ILightSceneNode * | AddLightDirectional (double elevation=60, double azimuth=60, ChColor ambient=ChColor(0.5f, 0.5f, 0.5f), ChColor specular=ChColor(0.2f, 0.2f, 0.2f), ChColor diffuse=ChColor(1.0f, 1.0f, 1.0f)) |
| Add a directional light to the scene. | |
| irr::scene::ILightSceneNode * | AddLight (const ChVector3d &pos, double radius, ChColor color=ChColor(0.7f, 0.7f, 0.7f)) |
| Add a point light to the scene. | |
| irr::scene::ILightSceneNode * | AddLightWithShadow (const ChVector3d &pos, const ChVector3d &aim, double radius, double near_value, double far_value, double angle, unsigned int resolution=512, ChColor color=ChColor(1, 1, 1), bool directional=false, bool clipborder=true) |
| Add a point light that cast shadow (using soft shadows/shadow maps) Note that the quality of the shadow strictly depends on how close 'near_value' and 'far_value' are to the bounding box of the scene. | |
| void | AddTypicalLights () |
| Simple shortcut to set two point lights in the scene. | |
| void | AddUserEventReceiver (irr::IEventReceiver *receiver) |
| Attach a custom event receiver to the application. | |
| void | EnableShadows (std::shared_ptr< ChPhysicsItem > item=nullptr) |
| Enable shadow maps for all visual models in a scene or only for a single physics item. | |
| void | EnableContactDrawing (ContactsDrawMode mode) |
| Enable contact rendering (default: none). | |
| void | EnableLinkDrawing (LinkDrawMode mode) |
| Enable rendering of link (joint) frames (default: none). | |
| void | EnableBodyFrameDrawing (bool val) |
| Enable rendering of body frames (default: false). | |
| void | EnableLinkFrameDrawing (bool val) |
| Enable rendering of link frames (default: false). | |
| void | EnableCollisionShapeDrawing (bool val) |
| Enable rendering of collision shapes (default: false). | |
| void | EnableAbsCoordsysDrawing (bool val) |
| Enable rendering of the absolute coordinate system (default: none). | |
| virtual void | EnableModalAnalysis (bool val) override |
| Enable modal analysis visualization (default: false). | |
| virtual void | SetModalModeNumber (int val) override |
| Set the mode to be shown (only if some ChModalAssembly is found). | |
| virtual void | SetModalAmplitude (double val) override |
| Set the amplitude of the shown mode (only if some ChModalAssembly is found). | |
| virtual void | SetModalSpeed (double val) override |
| Set the speed of the shown mode (only if some ChModalAssembly is found). | |
| virtual void | SetModalModesMax (int maxModes) override |
| Set the maximum number of modes selectable (only if some ChModalAssembly is found). | |
| void | ShowProfiler (bool val) |
| Show the realtime profiler in the 3D view. | |
| void | ShowExplorer (bool val) |
| Show the object explorer. | |
| void | ShowInfoPanel (bool val) |
| Show the info panel in the 3D view. | |
| void | SetInfoTab (int ntab) |
| Set the active tab on the info panel. | |
| irr::IrrlichtDevice * | GetDevice () |
| irr::video::IVideoDriver * | GetVideoDriver () |
| irr::scene::ISceneManager * | GetSceneManager () |
| irr::scene::ICameraSceneNode * | GetActiveCamera () |
| irr::gui::IGUIEnvironment * | GetGUIEnvironment () |
| void * | GetWindowId () const |
| Get the window ID. | |
| virtual void | BindAll () override |
| Process all visual assets in the associated ChSystem. | |
| virtual void | BindItem (std::shared_ptr< ChPhysicsItem > item) override |
| Process the visual assets for the spcified physics item. | |
| virtual void | UnbindItem (std::shared_ptr< ChPhysicsItem > item) override |
| Remove the visual assets for the specified physics item from this visualization system. | |
| virtual int | AddVisualModel (std::shared_ptr< ChVisualModel > model, const ChFrame<> &frame) override |
| Add a visual model not associated with a physical item. | |
| virtual int | AddVisualModel (std::shared_ptr< ChVisualShape > shape, const ChFrame<> &frame) override |
| Add a visual model not associated with a physical item. | |
| virtual void | UpdateVisualModel (int id, const ChFrame<> &frame) override |
| Update the position of the specified visualization-only model. | |
| virtual bool | Run () override |
| Run the Irrlicht device. | |
| virtual void | Quit () override |
| Terminate the visualization system. | |
| virtual void | BeginScene () override |
| Perform any necessary operations at the beginning of each rendering frame. | |
| virtual void | BeginScene (bool backBuffer, bool zBuffer, ChColor color) |
| Clean the canvas at the beginning of each rendering frame. | |
| virtual void | RenderFrame (const ChFrame<> &frame, double axis_length=1) override |
| Render the specified reference frame. | |
| virtual void | RenderCOGFrames (double axis_length=1) override |
| Render COG frames for all bodies in the system. | |
| virtual void | EndScene () override |
| End the scene draw at the end of each animation frame. | |
| irr::gui::IGUIFont * | GetMonospaceFont () const |
| Return a fixed-size font for rendering GUI. | |
| void | SetJPEGQuality (unsigned int quality) |
| Set the JPEG quality level (between 0 and 100) for saved snapshots (default: 0). | |
| virtual void | WriteImageToFile (const std::string &filename) override |
| Create a snapshot of the last rendered frame and save it to the provided file. | |
| bool | GetUtilityFlag () const |
| Get internal utility flag value. | |
| void | SetUtilityFlag (bool flag) |
| Set internal utility flag value. | |
| irr::SIrrlichtCreationParameters | GetCreationParameters () const |
| Get device creation parameters. | |
| void | SetCreationParameters (const irr::SIrrlichtCreationParameters &device_params) |
| Set device creation parameters. | |
Public Member Functions inherited from chrono::ChVisualSystem | |
| virtual ChVector3d | GetCameraPosition () const |
| Get the location of the current (active) camera. | |
| virtual ChVector3d | GetCameraTarget () const |
| Get the target (look-at) point of the current (active) camera. | |
| void | UpdateCamera (int id, const ChVector3d &pos, ChVector3d target) |
| Update the location and/or target points of the specified camera. | |
| void | UpdateCamera (const ChVector3d &pos, ChVector3d target) |
| virtual double | GetSimulationRTF () const |
| Return the simulation real-time factor (simulation time / simulated time). | |
| virtual double | GetSimulationTime () const |
| Return the current simulated time. | |
| void | SetImageOutputDirectory (const std::string &dir) |
| Set output directory for saving frame snapshots (default: "."). | |
| void | SetImageOutput (bool val) |
| Enable/disable writing of frame snapshots to file. | |
| std::vector< ChSystem * > | GetSystems () const |
| Get the list of associated Chrono systems. | |
| ChSystem & | GetSystem (int i) const |
| Get the specified associated Chrono system. | |
Protected Attributes | |
| ChChaseCameraEventReceiver * | m_camera_control |
| event receiver for chase-cam control | |
| bool | m_renderStats |
| turn on/off rendering of stats | |
| int | m_HUD_x |
| x-coordinate of upper-left corner of HUD elements | |
| int | m_HUD_y |
| y-coordinate of upper-left corner of HUD elements | |
Protected Attributes inherited from chrono::ChVisualSystem | |
| bool | m_initialized |
| std::vector< ChSystem * > | m_systems |
| associated Chrono system(s) | |
| bool | m_write_images |
| if true, save snapshots | |
| std::string | m_image_dir |
| directory for image files | |
Friends | |
| class | ChChaseCameraEventReceiver |
| class | ChInteractiveDriverIRR |
| class | ChSuspensionTestRigInteractiveDriverIRR |
Additional Inherited Members | |
Public Types inherited from chrono::ChVisualSystem | |
| enum class | Type { IRRLICHT , VSG , OpenGL , OptiX , NONE } |
| Supported run-time visualization systems. More... | |
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/ChVehicleVisualSystemIrrlicht.h
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/ChVehicleVisualSystemIrrlicht.cpp
Public Member Functions inherited from