chrono::vehicle::ChVehicleVisualSystemOpenGL Class Reference
Description
OpenGL-based Chrono run-time visualization system.
#include <ChVehicleVisualSystemOpenGL.h>
Inheritance diagram for chrono::vehicle::ChVehicleVisualSystemOpenGL:

Collaboration diagram for chrono::vehicle::ChVehicleVisualSystemOpenGL:

Public Member Functions | |
| ChVehicleVisualSystemOpenGL () | |
| Construct a vehicle OpenGL visualization system. | |
| virtual void | Initialize () override |
| Initialize the visualization system. | |
| virtual void | Advance (double step) override |
| Advance the dynamics of the chase camera. | |
Public Member Functions inherited from chrono::opengl::ChVisualSystemOpenGL | |
| void | SetWindowSize (unsigned int width, unsigned int height) |
| Set the window size (default 640x480). | |
| void | SetWindowTitle (const std::string &win_title) |
| Set the window title (default ""). | |
| void | SetCameraVertical (CameraVerticalDir vert) |
| Set camera vertical direction (default CameraVerticalDir::Z). | |
| void | SetCameraVertical (const ChVector3d &up) |
| Set camera vertical direction (default (0,0,1)). | |
| void | SetCameraProperties (float scale=0.5f, float near_clip_dist=0.1f, float far_clip_dist=1000.0f) |
| Set camera scale and clip distances. | |
| void | SetRenderMode (RenderMode mode) |
| Set render mode for solid objects (default: SOLID) | |
| void | SetParticleRenderMode (RenderMode mode, float radius) |
| Set render mode for particle systems (default: POINTS) and size. | |
| virtual void | AttachSystem (ChSystem *sys) override |
| Attach a Chrono system to the run-time visualization system. | |
| void | AttachStatsRenderer (std::shared_ptr< ChOpenGLStats > renderer) |
| Attach a user-defined text renderer for stats overlay. | |
| void | EnableStats (bool state) |
| Enable/disable stats overlay display (default: true). | |
| void | SetVerbose (bool verbose) |
| Enable/disable OpenGL information terminal output during initialization (default: true). | |
| virtual int | AddCamera (const ChVector3d &pos, ChVector3d targ=VNULL) override |
| Add a camera to the 3d scene. | |
| 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 | AddUserEventReceiver (std::shared_ptr< ChOpenGLEventCB > receiver) |
| Attach a custom event receiver to the application. | |
| void | AttachParticleSelector (std::shared_ptr< ChOpenGLParticleCB > selector) |
| Attach a custom particle rendering selector. | |
| 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 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 | Render () override |
| Draw all 3D shapes and GUI elements at the current frame. | |
| virtual void | EndScene () override |
| End the scene draw at the end of each animation frame. | |
| virtual void | WriteImageToFile (const std::string &filename) override |
| Create a snapshot of the last rendered frame and save it to the provided file. | |
Public Member Functions inherited from chrono::ChVisualSystem | |
| virtual void | UnbindItem (std::shared_ptr< ChPhysicsItem > item) |
| Remove the visual assets for the specified physics item from this visualization system. | |
| 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)) |
| Add a grid with specified parameters in the x-y plane of the given frame. | |
| 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 int | AddVisualModel (std::shared_ptr< ChVisualModel > model, const ChFrame<> &frame) |
| Add a visual model not associated with a physical item. | |
| virtual int | AddVisualModel (std::shared_ptr< ChVisualShape > shape, const ChFrame<> &frame) |
| Add a visual model not associated with a physical item. | |
| virtual void | UpdateVisualModel (int id, const ChFrame<> &frame) |
| Update the position of the specified visualization-only model. | |
| virtual void | RenderFrame (const ChFrame<> &frame, double axis_length=1) |
| Render the specified reference frame. | |
| virtual void | RenderCOGFrames (double axis_length=1) |
| Render COG frames for all bodies in the system. | |
| 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. | |
| virtual void | EnableModalAnalysis (bool val) |
| Enable modal analysis visualization. | |
| virtual void | SetModalModeNumber (int val) |
| Set the mode to be shown (only if some ChModalAssembly is found). | |
| virtual void | SetModalAmplitude (double val) |
| Set the amplitude of the shown mode (only if some ChModalAssembly is found). | |
| virtual void | SetModalSpeed (double val) |
| Set the speed of the shown mode (only if some ChModalAssembly is found). | |
| virtual void | SetModalModesMax (int maxModes) |
| Set the maximum number of modes selectable (only if some ChModalAssembly is found). | |
| std::vector< ChSystem * > | GetSystems () const |
| Get the list of associated Chrono systems. | |
| ChSystem & | GetSystem (int i) const |
| Get the specified associated Chrono system. | |
Friends | |
| class | ChVehicleKeyboardHandlerOpenGL |
Additional Inherited Members | |
Public Types inherited from chrono::ChVisualSystem | |
| enum class | Type { IRRLICHT , VSG , OpenGL , OptiX , NONE } |
| Supported run-time visualization systems. More... | |
Static Public Member Functions inherited from chrono::opengl::ChVisualSystemOpenGL | |
| static void | WrapRenderStep (void *stepFunction) |
| Callback wrapper for steps of the render loop. Works with Emscripten. | |
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 | |
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/ChVehicleVisualSystemOpenGL.h
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/ChVehicleVisualSystemOpenGL.cpp
Public Member Functions inherited from