Description
VSG-based Chrono run-time visualization system.
#include <ChVisualSystemVSG.h>


Classes | |
| struct | DeformableMesh |
| Data related to deformable (mutable) meshes, both visualization and collision. More... | |
| struct | ParticleCloud |
| Data for particle clouds managed by the visual system. More... | |
Public Member Functions | |
| ChVisualSystemVSG (int num_divs=24) | |
| Create the Chrono::VSG run-time visualization system. More... | |
| void | AttachPlugin (std::shared_ptr< ChVisualSystemVSGPlugin > plugin) |
| Attach a custom plugin. More... | |
| virtual void | Initialize () override |
| Initialize the visualization system. | |
| virtual void | BindAll () override |
| Process all visual assets in the associated ChSystem. More... | |
| virtual void | BindItem (std::shared_ptr< ChPhysicsItem > item) override |
| Process the visual assets for the specified physics item. More... | |
| virtual bool | Run () override |
| Check if rendering is running. More... | |
| 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. More... | |
| virtual void | EndScene () override |
| End the scene draw at the end of each animation frame. | |
| void | SetBodyObjVisibility (bool vis, int tag=-1) |
| Set the visibility of bodies with specified tag. More... | |
| void | SetLinkObjVisibility (bool vis, int tag=-1) |
| Set the visibility of links with specified tag. More... | |
| void | SetFeaMeshVisibility (bool vis, int tag=-1) |
| Set the visibility of FEA meshes with specified tag. More... | |
| void | SetSpringVisibility (bool vis, int tag=-1) |
| Set the visibility of springs with specified tag. More... | |
| void | SetSegmentVisibility (bool vis, int tag=-1) |
| Set the visibility of segments with specified tag. More... | |
| void | SetParticleCloudVisibility (bool vis, int tag=-1) |
| Set the visibility of particle clouds with specified tag to the provided value. More... | |
| void | SetCollisionVisibility (bool vis, int tag=-1) |
| — Collision and contact More... | |
| void | SetCollisionColor (const ChColor &color) |
| Set color for rendering wireframe collision shapes. | |
| void | SetContactNormalsVisibility (bool vis, int tag=-1) |
| Enable/disable visualization of contact normals (default: false). More... | |
| void | SetContactNormalsColor (const ChColor &color) |
| Set color for rendering contact normals. | |
| void | SetContactNormalsScale (double length) |
| Set scale for rendering contact normals. | |
| void | SetContactForcesVisibility (bool vis, int tag=-1) |
| Enable/disable visualization of contact forces (default: false). More... | |
| void | SetContactForcesColor (const ChColor &color) |
| Set color for rendering contact forces. | |
| void | SetContactForcesScale (double length) |
| Set scale for rendering contact forces. | |
| void | SetAbsFrameScale (double axis_length) |
| Render the absolute (global) reference frame. | |
| void | ToggleAbsFrameVisibility () |
| void | RenderRefFrames (double axis_length=1) |
| Render ref frames for all objects in the system. | |
| void | SetRefFrameScale (double axis_length) |
| Set scale for rendering reference frames. | |
| void | ToggleRefFrameVisibility () |
| Toggle on/off visibility of reference frames. | |
| void | SetCOMFrameScale (double axis_length) |
| Render COM frames for all bodies in the system. | |
| void | ToggleCOMFrameVisibility () |
| Toggle on/off visibilityy of COM frames. | |
| void | ToggleCOMSymbolVisibility () |
| Render COM symbol for all bodies in the system. | |
| void | SetLinkFrameScale (double axis_length) |
| Render link frames for all links in the system. | |
| void | ToggleLinkFrameVisibility () |
| Toggle on/off visibility of link frames. | |
| void | ToggleBodyLabelVisibility () |
| Toggle visibility of body labels. | |
| void | SetBodyLabelsColor (const ChColor &color) |
| Set color for body labels. | |
| void | SetBodyLabelsScale (double length) |
| Set rendering scale for body labels. | |
| void | ToggleLinkLabelVisibility () |
| Toggle visibility of link labels. | |
| void | SetLinkLabelsColor (const ChColor &color) |
| Set color for link labels. | |
| void | SetLinkLabelsScale (double length) |
| Set rendering scale for link labels. | |
| virtual void | WriteImageToFile (const std::string &filename) override |
| Create a snapshot of the frame to be rendered and save it to the provided file. More... | |
| void | SetWindowSize (const ChVector2i &size) |
| Set window size (default: 800x600). | |
| void | SetWindowSize (int width, int height) |
| Set window size (default: 800x600). | |
| void | SetWindowPosition (const ChVector2i &pos) |
| Set window position (default: 50,50). | |
| void | SetWindowPosition (int from_left, int from_top) |
| Set window position (default: 50,50). | |
| void | SetWindowTitle (const std::string &title) |
| Set window title (default: ""). | |
| void | SetOutputScreen (int screenNum=0) |
| Set default output screen. | |
| void | EnableFullscreen (bool val=true) |
| Enable full-screen mode (default: false). More... | |
| void | EnableSkyBox (bool val=true) |
| Enable/disable use of a sky box background (default: false). More... | |
| void | SetSkyBoxTexture (const std::string &filename) |
| Set the sky box texture. | |
| void | SetCameraVertical (CameraVerticalDir upDir) |
| Set the camera up vector (default: Z). | |
| virtual int | AddCamera (const ChVector3d &pos, ChVector3d targ=VNULL) override |
| Add a camera to the VSG scene. More... | |
| 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. | |
| virtual ChVector3d | GetCameraPosition () const override |
| Get the location of the current (active) camera. | |
| virtual ChVector3d | GetCameraTarget () const override |
| Get the target (look-at) point of the current (active) camera. | |
| double | GetRenderingFPS () const |
| Get estimated rendering FPS. | |
| void | SetTargetRenderFPS (double fps) |
| Set target render frame rate (default: 0 means render every frame) When set to, for example, 60fps, it limits rendering to approximately that many FPS even if physics is running faster. More... | |
| void | EnableShadows (bool val=true) |
| Enable/disable rendering of shadows (default: false). More... | |
| bool | AreShadowsEnabled () const |
| Indicate whether or not shadows are enabled. | |
| void | SetLightIntensity (float intensity) |
| Set light intensity (default: 1). More... | |
| void | SetLightDirection (double azimuth, double elevation) |
| Set azimuth and elevation for directional light (default: 3pi/4 and pi/4) . More... | |
| void | SetCameraAngleDeg (double angleDeg) |
| Set the camera field of view in degrees (default: 40). | |
| void | SetGuiFontSize (float size) |
| Set GUI font size (default: 13). | |
| 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 wireframe grid with specified resolution at the specified position. More... | |
| virtual int | AddVisualModel (std::shared_ptr< ChVisualModel > model, const ChFrame<> &frame) override |
| Add a visual model not bound to a Chrono object. More... | |
| virtual int | AddVisualModel (std::shared_ptr< ChVisualShape > model, const ChFrame<> &frame) override |
| Add a visual shape not bound to a Chrono object. More... | |
| virtual void | UpdateVisualModel (int id, const ChFrame<> &frame) override |
| Modify the position of the specified un-bound visual model. | |
| size_t | AddGuiComponent (std::shared_ptr< ChGuiComponentVSG > gc) |
| Add a user-defined GUI component. More... | |
| size_t | AddGuiColorbar (const std::string &title, const ChVector2d &range, ChColormap::Type type, bool bimodal=false, float width=400) |
| Add a colorbar as a GUI component. More... | |
| std::shared_ptr< ChGuiComponentVSG > | GetGuiComponent (size_t id) |
| Access the specified GUI component. More... | |
| void | SetGuiVisibility (bool show_gui) |
| Set visibility for all GUI components (default: true). | |
| void | ToggleGuiVisibility () |
| Toggle GUI visibility for all GUI components. | |
| bool | IsGuiVisible () const |
| Indicate whether or not GUI is visible. | |
| void | SetBaseGuiVisibility (bool show_gui) |
| Set visibility for the default (base) GUI component (default: true). | |
| void | ToggleBaseGuiVisibility () |
| Toggle GUI visibility for the default (base) GUI component. | |
| bool | IsBaseGuiVisible () const |
| Indicate whether or not the default (base) GUI is visible. | |
| void | SetLogo (const std::string &filename) |
| Change logo image. | |
| void | HideLogo () |
| Disable showing the Chrono logo (default: true). | |
| void | SetLogoHeight (float height) |
| Set logo display height (in pixels, default: 64). | |
| void | SetLogoPosition (const ChVector2f &position) |
| Set logo position (default: [10,10]). More... | |
| bool | IsLogoVisible () const |
| Indicate whether or not logo is visible. | |
| void | AddEventHandler (std::shared_ptr< ChEventHandlerVSG > eh) |
| Add a user-defined VSG event handler. | |
| vsg::ref_ptr< vsg::Group > | GetVSGScene () const |
| Get a reference to the underlying VSG scene. | |
| vsg::ref_ptr< ShapeBuilder > | GetVSGShapeBuilder () const |
| Get a reference to the underlying shape builder. | |
| vsg::ref_ptr< vsgImGui::Texture > | GetColormapTexture (ChColormap::Type type) const |
| Get the ImGui texture for the specified colormap. | |
| std::vector< ParticleCloud > & | GetParticleClouds () |
| Access particle cloud metadata. | |
| const std::vector< ParticleCloud > & | GetParticleClouds () const |
| void | AddComputeCommands (vsg::ref_ptr< vsg::Commands > commands) |
| Register commands that must run on the compute queue before rendering. | |
| vsg::ref_ptr< vsg::CommandGraph > | GetComputeCommandGraph () const |
| Access command graphs used for compute and rendering work. | |
| vsg::ref_ptr< vsg::CommandGraph > | GetRenderCommandGraph () const |
| vsg::ref_ptr< vsg::Window > | GetWindow () const |
| Access the underlying window. | |
| vsg::ref_ptr< vsg::Options > | GetOptions () const |
| Access the VSG options object used for resource loading. | |
Public Member Functions inherited from chrono::ChVisualSystem | |
| void | SetVerbose (bool verbose) |
| Enable/disable information terminal output during initialization (default: false). | |
| bool | IsInitialized () const |
| Indicate whether the visual system was initialized or not. | |
| virtual void | AttachSystem (ChSystem *sys) |
| Attach a Chrono system to this visualization system. | |
| virtual void | UnbindItem (std::shared_ptr< ChPhysicsItem > item) |
| Remove the visual assets for the specified physics item from this visualization system. | |
| void | SetBackgroundColor (const ChColor &color) |
| Set window background color. | |
| 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 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. | |
| std::vector< ChSystem * > & | GetSystems () |
| Get the list of associated Chrono systems. | |
| ChSystem & | GetSystem (int i) const |
| Get the specified associated Chrono system. | |
| double | GetSimulationTime () const |
| Return the current simulated time. More... | |
| double | GetRTF () const |
| Return the overall real time factor. More... | |
| double | GetSimulationRTF (unsigned int i) const |
| Return the simulation real-time factor (simulation time / simulated time) for the specified associated system. More... | |
| std::vector< double > | GetSimulationRTFs () const |
| Return the simulation real-time factor (simulation time / simulated time) for all associated system. More... | |
| unsigned int | GetNumBodies () const |
| Get the number of bodies (across all visualized systems). More... | |
| unsigned int | GetNumLinks () const |
| Get the number of links (across all visualized systems). More... | |
| unsigned int | GetNumMeshes () const |
| Get the number of meshes (across all visualized systems). | |
| unsigned int | GetNumShafts () const |
| Get the number of shafts (across all visualized systems). | |
| unsigned int | GetNumStates () const |
| Get the number of coordinates at the velocity level (across all visualized systems). | |
| unsigned int | GetNumConstraints () const |
| Get the number of scalar constraints (across all visualized systems). | |
| unsigned int | GetNumContacts () const |
| Gets the number of contacts. | |
| 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. | |
Protected Member Functions | |
| virtual void | OnSetup (ChSystem *sys) override |
| Perform necessary setup operations at the beginning of a time step. | |
| void | Update () |
| Update all VSG scenes with the current state of the associated Chrono systems. | |
| bool | GetDesiredCloudVisibility (int tag) const |
Protected Member Functions inherited from chrono::ChVisualSystem | |
| virtual void | OnUpdate (ChSystem *sys) |
| Perform any necessary update operations at the end of a time step. More... | |
| virtual void | OnClear (ChSystem *sys) |
| Remove all visualization objects from this visualization system. More... | |
Protected Attributes | |
| int | m_screen_num = -1 |
| bool | m_use_fullscreen |
| bool | m_use_shadows |
| vsg::ref_ptr< vsg::Window > | m_window |
| vsg::ref_ptr< vsg::Viewer > | m_viewer |
| high-level VSG rendering manager | |
| vsg::ref_ptr< vsg::RenderGraph > | m_renderGraph |
| vsg::ref_ptr< vsg::CommandGraph > | m_renderCommandGraph |
| graphics submit path | |
| vsg::ref_ptr< vsg::CommandGraph > | m_computeCommandGraph |
| compute submit path (particle colouring) | |
| bool | m_show_logo |
| float | m_logo_height |
| ChVector2f | m_logo_pos |
| std::string | m_logo_filename |
| bool | m_show_gui |
| flag to toggle global GUI visibility | |
| bool | m_show_base_gui |
| flag to toggle base GUI visibility | |
| size_t | m_camera_gui |
| identifier for the camera info GUI component | |
| std::shared_ptr< ChGuiComponentVSG > | m_base_gui |
| default (base) GUI component | |
| std::vector< std::shared_ptr< ChGuiComponentVSG > > | m_gui |
| list of all additional GUI components | |
| std::vector< std::shared_ptr< ChEventHandlerVSG > > | m_evhandler |
| list of all additional event handlers | |
| vsg::dvec3 | m_vsg_cameraEye = vsg::dvec3(-10.0, 0.0, 0.0) |
| vsg::dvec3 | m_vsg_cameraTarget = vsg::dvec3(0.0, 0.0, 0.0) |
| vsg::ref_ptr< vsg::LookAt > | m_lookAt |
| vsg::ref_ptr< vsg::Camera > | m_vsg_camera |
| bool | m_camera_trackball |
| create a camera trackball control? | |
| vsg::ref_ptr< vsg::Group > | m_scene |
| vsg::ref_ptr< vsg::Switch > | m_pointpointScene |
| vsg::ref_ptr< vsg::Switch > | m_particleScene |
| vsg::ref_ptr< vsg::Switch > | m_visFixedScene |
| vsg::ref_ptr< vsg::Switch > | m_visMutableScene |
| vsg::ref_ptr< vsg::Switch > | m_collFixedScene |
| vsg::ref_ptr< vsg::Switch > | m_collMutableScene |
| vsg::ref_ptr< vsg::Switch > | m_contactNormalsScene |
| vsg::ref_ptr< vsg::Switch > | m_contactForcesScene |
| vsg::ref_ptr< vsg::Switch > | m_absFrameScene |
| vsg::ref_ptr< vsg::Switch > | m_refFrameScene |
| vsg::ref_ptr< vsg::Switch > | m_linkFrameScene |
| vsg::ref_ptr< vsg::Switch > | m_comFrameScene |
| vsg::ref_ptr< vsg::Switch > | m_comSymbolScene |
| vsg::ref_ptr< vsg::Switch > | m_bodyLabelScene |
| vsg::ref_ptr< vsg::Switch > | m_linkLabelScene |
| vsg::ref_ptr< vsg::Group > | m_decoScene |
| vsg::ref_ptr< vsg::Options > | m_options |
| I/O related options for vsg::read/write calls. | |
| vsg::ref_ptr< vsg::Builder > | m_vsgBuilder |
| vsg::ref_ptr< ShapeBuilder > | m_shapeBuilder |
| bool | m_capture_image |
| export current frame to image file | |
| std::string | m_image_filename |
| name of file to export current frame | |
| std::vector< DeformableMesh > | m_def_meshes |
| std::vector< ParticleCloud > | m_clouds |
| particle cloud metadata cached for VSG interop | |
| bool | m_default_cloud_visibility = true |
| fallback visibility before a specific tag is toggled | |
| std::unordered_map< int, bool > | m_cloud_visibility_overrides |
| per-tag visibility overrides | |
| bool | m_show_visibility_controls |
| enable/disable global visibility controls | |
| std::vector< std::shared_ptr< ChVisualSystemVSGPlugin > > | m_plugins |
Protected Attributes inherited from chrono::ChVisualSystem | |
| bool | m_verbose |
| terminal output | |
| bool | m_initialized |
| visual system initialized | |
| ChColor | m_background_color |
| window background color | |
| ChTimer | m_timer |
| timer for evaluating RTF | |
| double | m_rtf |
| overall real time factor | |
| 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 | ChMainGuiVSG |
| class | ChBaseGuiComponentVSG |
| class | ChBaseEventHandlerVSG |
Additional Inherited Members | |
Public Types inherited from chrono::ChVisualSystem | |
| enum | Type { Type::IRRLICHT, Type::VSG, Type::OptiX, NONE } |
| Supported run-time visualization systems. More... | |
Constructor & Destructor Documentation
◆ ChVisualSystemVSG()
| chrono::vsg3d::ChVisualSystemVSG::ChVisualSystemVSG | ( | int | num_divs = 24 | ) |
Create the Chrono::VSG run-time visualization system.
Optionally, specify the resolution used for tesselation of primitive shapes, by providing the number of divisions used to discretize a full circle. The default value of 24 corresponds to 15-degree divisions.
Member Function Documentation
◆ AddCamera()
|
overridevirtual |
Add a camera to the VSG scene.
Note that currently only one camera is supported.
Reimplemented from chrono::ChVisualSystem.
◆ AddGrid()
|
overridevirtual |
Add a wireframe grid with specified resolution at the specified position.
line color
- Parameters
-
x_step spacing in x direction y_step spacing in y direction nx number of divisions in x direction ny number of divisions in y direction pos position of grid center
Reimplemented from chrono::ChVisualSystem.
◆ AddGuiColorbar()
| size_t chrono::vsg3d::ChVisualSystemVSG::AddGuiColorbar | ( | const std::string & | title, |
| const ChVector2d & | range, | ||
| ChColormap::Type | type, | ||
| bool | bimodal = false, |
||
| float | width = 400 |
||
| ) |
Add a colorbar as a GUI component.
Returns the index of the new component. This function must be called before Initialize().
- Parameters
-
title GUI window title range data range type colormap bimodal negative/positive width texture width in pixels
◆ AddGuiComponent()
| size_t chrono::vsg3d::ChVisualSystemVSG::AddGuiComponent | ( | std::shared_ptr< ChGuiComponentVSG > | gc | ) |
Add a user-defined GUI component.
Returns the index of the new component. This function must be called before Initialize().
◆ AddVisualModel() [1/2]
|
overridevirtual |
Add a visual model not bound to a Chrono object.
The return value is the index of the new visual model.
Reimplemented from chrono::ChVisualSystem.
◆ AddVisualModel() [2/2]
|
overridevirtual |
Add a visual shape not bound to a Chrono object.
The return value is the index of the new visual model.
Reimplemented from chrono::ChVisualSystem.
◆ AttachPlugin()
| void chrono::vsg3d::ChVisualSystemVSG::AttachPlugin | ( | std::shared_ptr< ChVisualSystemVSGPlugin > | plugin | ) |
Attach a custom plugin.
Plugins offer a mechanism for extending a base VSG visual system with custom functionality; e.g., for rendering, controlling, and displaying information for specific types of Chrono systems. An arbitrary number of plugins can be attached to a VSG visual system. Attaching plugins muct be done before initialization of the VSG system.
◆ BindAll()
|
overridevirtual |
Process all visual assets in the associated ChSystem.
This function is called by default by Initialize(), but can also be called later if further modifications to visualization assets occur.
Reimplemented from chrono::ChVisualSystem.
◆ BindItem()
|
overridevirtual |
Process the visual assets for the specified physics item.
This function must be called if a new physics item is added to the system or if changes to its visual model occur after the call to Initialize().
Reimplemented from chrono::ChVisualSystem.
◆ EnableFullscreen()
| void chrono::vsg3d::ChVisualSystemVSG::EnableFullscreen | ( | bool | val = true | ) |
Enable full-screen mode (default: false).
This function must be called before Initialize().
◆ EnableShadows()
|
inline |
Enable/disable rendering of shadows (default: false).
This function must be called before Initialize().
◆ EnableSkyBox()
| void chrono::vsg3d::ChVisualSystemVSG::EnableSkyBox | ( | bool | val = true | ) |
Enable/disable use of a sky box background (default: false).
This function must be called before Initialize().
◆ GetGuiComponent()
| std::shared_ptr< ChGuiComponentVSG > chrono::vsg3d::ChVisualSystemVSG::GetGuiComponent | ( | size_t | id | ) |
Access the specified GUI component.
Identify the GUI component with the index returned by AddGuiComponent.
◆ Render()
|
overridevirtual |
Draw all 3D shapes and GUI elements at the current frame.
This function is typically called inside a loop such as
while(vis->Run()) {...}
Reimplemented from chrono::ChVisualSystem.
◆ Run()
|
overridevirtual |
Check if rendering is running.
Returns false if the viewer was closed.
Reimplemented from chrono::ChVisualSystem.
◆ SetBodyObjVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetBodyObjVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of bodies with specified tag.
A tag value of -1 indicates that the visibility flag should be applied to all bodies.
◆ SetCollisionVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetCollisionVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
— Collision and contact
Set visibility of collision shapes for objects with specified tag. A tag of -1 indicates that the visibility flag should be applied to all collision shapes.
◆ SetContactForcesVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetContactForcesVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Enable/disable visualization of contact forces (default: false).
A tag value of -1 indicates that the visibility flag should be applied to all collision objects.
◆ SetContactNormalsVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetContactNormalsVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Enable/disable visualization of contact normals (default: false).
A tag value of -1 indicates that the visibility flag should be applied to all collision objects.
◆ SetFeaMeshVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetFeaMeshVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of FEA meshes with specified tag.
A tag value of -1 indicates that the visibility flag should be applied to all meshes.
◆ SetLightDirection()
| void chrono::vsg3d::ChVisualSystemVSG::SetLightDirection | ( | double | azimuth, |
| double | elevation | ||
| ) |
Set azimuth and elevation for directional light (default: 3pi/4 and pi/4) .
The azimuth is measured conter-clockwise from the x-axis and is clamped in [-pi, pi]. The elevation is measured from the (xy)-plane and is clamped in [-pi/2, pi/2].
◆ SetLightIntensity()
| void chrono::vsg3d::ChVisualSystemVSG::SetLightIntensity | ( | float | intensity | ) |
Set light intensity (default: 1).
The light intensity is clamped in [0,1]. Directional light intensity is set to 100% of this value, unless shadow are enabled, in which case it is set to 80%. Ambient light intensity is set to 10% of this value.
◆ SetLinkObjVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetLinkObjVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of links with specified tag.
A tag value of -1 indicates that the visibility flag should be applied to all links.
◆ SetLogoPosition()
|
inline |
Set logo position (default: [10,10]).
This is the position of the right-top corner of the logo image (in pixels) relative to the right-top corner of the rendering window.
◆ SetParticleCloudVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetParticleCloudVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of particle clouds with specified tag to the provided value.
A tag value of -1 indicates that the visibility flag should be applied to all particle clouds.
◆ SetSegmentVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetSegmentVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of segments with specified tag.
A tag value of -1 indicates that the visibility flag should be applied to all segments.
◆ SetSpringVisibility()
| void chrono::vsg3d::ChVisualSystemVSG::SetSpringVisibility | ( | bool | vis, |
| int | tag = -1 |
||
| ) |
Set the visibility of springs with specified tag.
A tag value of -1 indicates that the visibility flag should be applied to all springs.
◆ SetTargetRenderFPS()
|
inline |
Set target render frame rate (default: 0 means render every frame) When set to, for example, 60fps, it limits rendering to approximately that many FPS even if physics is running faster.
Dramatically improves performance for VSG since recordAndSubmit() is expensive
◆ WriteImageToFile()
|
overridevirtual |
Create a snapshot of the frame to be rendered and save it to the provided file.
The file extension determines the image format.
Reimplemented from chrono::ChVisualSystem.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_vsg/ChVisualSystemVSG.h
- /builds/uwsbel/chrono/src/chrono_vsg/ChVisualSystemVSG.cpp
Public Member Functions inherited from