1.3.49
 
Loading...
Searching...
No Matches
Visualizer Class Reference

Class for visualization of simulation results. More...

#include <Visualizer.h>

Public Types

enum  CoordinateSystem { COORDINATES_WINDOW_NORMALIZED = 0 , COORDINATES_CARTESIAN = 1 }
 Coordinate system to be used when specifying spatial coordinates. More...
 
enum  Ctable {
  COLORMAP_HOT = 0 , COLORMAP_COOL = 1 , COLORMAP_RAINBOW = 2 , COLORMAP_LAVA = 3 ,
  COLORMAP_PARULA = 4 , COLORMAP_GRAY = 5 , COLORMAP_CUSTOM = 6
}
 Pseudocolor map tables. More...
 
enum  LightingModel { LIGHTING_NONE = 0 , LIGHTING_PHONG = 1 , LIGHTING_PHONG_SHADOWED = 2 }
 Lighting model to use for shading primitives. More...
 

Public Member Functions

 Visualizer ()=delete
 forbid the default constructor
 
 Visualizer (uint Wdisplay)
 Visualizer constructor.
 
 Visualizer (uint Wdisplay, uint Hdisplay)
 Visualizer constructor.
 
 Visualizer (uint Wdisplay, uint Hdisplay, int aliasing_samples)
 Constructs a Visualizer object with the specified display dimensions and anti-aliasing settings.
 
 Visualizer (uint Wdisplay, uint Hdisplay, int aliasing_samples, bool window_decorations, bool headless)
 
 ~Visualizer ()
 Visualizer destructor.
 
void enableMessages ()
 Enable standard output from this plug-in (default)
 
void disableMessages ()
 Disable standard output from this plug-in.
 
void setCameraPosition (const helios::vec3 &cameraPosition, const helios::vec3 &lookAt)
 Set camera position.
 
void setCameraPosition (const helios::SphericalCoord &cameraAngle, const helios::vec3 &lookAt)
 Set camera position.
 
void setCameraFieldOfView (float angle_FOV)
 Set the camera field of view (angle width) in degrees. Default value is 45 degrees.
 
void setLightDirection (const helios::vec3 &direction)
 Set the direction of the light source.
 
void setLightingModel (LightingModel lightingmodel)
 Set the lighting model for shading of all primitives.
 
void setLightIntensityFactor (float lightintensityfactor)
 Set the light intensity scaling factor.
 
void setBackgroundColor (const helios::RGBcolor &color)
 Set the background color for the visualizer window.
 
size_t addRectangleByCenter (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its center.
 
size_t addRectangleByCenter (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its center.
 
size_t addRectangleByCenter (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const char *texture_file, CoordinateSystem coordFlag)
 Add a texture mapped rectangle by giving the coordinates of its center.
 
size_t addRectangleByCenter (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color, const char *texture_file, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its center - rectangle is colored by and RGB color value but is masked by the alpha channel of a PNG image file.
 
size_t addRectangleByCenter (const helios::vec3 &center, const helios::vec2 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color, const Glyph *glyph, CoordinateSystem coordFlag)
 Add a texture masked rectangle by giving the coordinates of its center.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBcolor &color, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const char *texture_file, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const char *texture_file, const std::vector< helios::vec2 > &uvs, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices and color by texture map.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBcolor &color, const char *texture_file, const std::vector< helios::vec2 > &uvs, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices and mask by texture map transparency channel, but color by R-G-B value.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBcolor &color, const char *texture_file, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices - rectangle is colored by an RGB color value but is masked by the alpha channel of a PNG image file.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBcolor &color, const Glyph *glyph, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices.
 
size_t addRectangleByVertices (const std::vector< helios::vec3 > &vertices, const helios::RGBAcolor &color, const Glyph *glyph, CoordinateSystem coordFlag)
 Add a rectangle by giving the coordinates of its four vertices.
 
size_t addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBcolor &color, CoordinateSystem coordFlag)
 Add a triangle by giving the coordinates of its three vertices.
 
size_t addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add a triangle by giving the coordinates of its three vertices.
 
size_t addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const char *texture_file, const helios::vec2 &uv0, const helios::vec2 &uv1, const helios::vec2 &uv2, CoordinateSystem coordFlag)
 Add a triangle by giving the coordinates of its three vertices and color by texture map.
 
size_t addTriangle (const helios::vec3 &vertex0, const helios::vec3 &vertex1, const helios::vec3 &vertex2, const char *texture_file, const helios::vec2 &uv0, const helios::vec2 &uv1, const helios::vec2 &uv2, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add a triangle by giving the coordinates of its three vertices and color by a constant color, but mask using transparency channel of texture map.
 
std::vector< size_t > addVoxelByCenter (const helios::vec3 &center, const helios::vec3 &size, const helios::SphericalCoord &rotation, const helios::RGBcolor &color, CoordinateSystem coordFlag)
 Add a voxel by giving the coordinates of its center.
 
std::vector< size_t > addVoxelByCenter (const helios::vec3 &center, const helios::vec3 &size, const helios::SphericalCoord &rotation, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add a voxel by giving the coordinates of its center.
 
size_t addLine (const helios::vec3 &start, const helios::vec3 &end, const helios::RGBcolor &color, CoordinateSystem coordinate_system)
 Add Lines by giving the coordinates of points along the Lines.
 
size_t addLine (const helios::vec3 &start, const helios::vec3 &end, const helios::RGBAcolor &color, CoordinateSystem coordFlag)
 Add Lines by giving the coordinates of points along the Lines.
 
size_t addLine (const helios::vec3 &start, const helios::vec3 &end, const helios::RGBcolor &color, float line_width, CoordinateSystem coordinate_system)
 Add Lines by giving the coordinates of points along the Lines with custom line width.
 
size_t addLine (const helios::vec3 &start, const helios::vec3 &end, const helios::RGBAcolor &color, float line_width, CoordinateSystem coordFlag)
 Add Lines by giving the coordinates of points along the Lines with custom line width.
 
size_t addPoint (const helios::vec3 &position, const helios::RGBcolor &color, float pointsize, CoordinateSystem coordinate_system)
 Add a point by giving its coordinates and size.
 
size_t addPoint (const helios::vec3 &position, const helios::RGBAcolor &color, float pointsize, CoordinateSystem coordinate_system)
 Add a point by giving its coordinates and size.
 
std::vector< size_t > addSphereByCenter (float radius, const helios::vec3 &center, uint Ndivisions, const helios::RGBcolor &color, CoordinateSystem coordinate_system)
 Add a sphere by giving the radius and center.
 
std::vector< size_t > addSphereByCenter (float radius, const helios::vec3 &center, uint Ndivisions, const helios::RGBAcolor &color, CoordinateSystem coordinate_system)
 Add a sphere by giving the radius and center.
 
std::vector< size_t > addSkyDomeByCenter (float radius, const helios::vec3 &center, uint Ndivisions, const char *texture_file)
 Add a Sky Dome, which is a hemispherical dome colored by a sky texture map.
 
 DEPRECATED (void addSkyDomeByCenter(float radius, const helios::vec3 &center, uint Ndivisions, const char *texture_file, int layer))
 Add a Sky Dome, which is a hemispherical dome colored by a sky texture map.
 
std::vector< size_t > addTextboxByCenter (const char *textstring, const helios::vec3 &center, const helios::SphericalCoord &rotation, const helios::RGBcolor &fontcolor, uint fontsize, const char *fontname, CoordinateSystem coordinate_system)
 Add a text box by giving the coordinates of its center.
 
void deleteGeometry (size_t geometry_id)
 Removes the geometry with the specified ID from the visualizer.
 
void addCoordinateAxes ()
 Add a coordinate axis with at the origin with unit length.
 
void addCoordinateAxes (const helios::vec3 &origin, const helios::vec3 &length, const std::string &sign)
 Add a coordinate axis.
 
void disableCoordinateAxes ()
 Remove coordinate axes (if created with Visualizer::addCoordinateAxes)
 
void addGridWireFrame (const helios::vec3 &center, const helios::vec3 &size, const helios::int3 &subdiv)
 Add a coordinate axis.
 
void enableColorbar ()
 Enable the colorbar.
 
void disableColorbar ()
 Disable the colorbar.
 
void setColorbarPosition (helios::vec3 position)
 Set the position of the colorbar in normalized window coordinates (0-1)
 
void setColorbarSize (helios::vec2 size)
 Set the size of the colorbar in normalized window units (0-1)
 
void setColorbarRange (float cmin, float cmax)
 Set the range of the Colorbar.
 
void setColorbarTicks (const std::vector< float > &ticks)
 Set the values in the colorbar where ticks and labels should be placed.
 
void setColorbarTitle (const char *title)
 Set the title of the Colorbar.
 
void setColorbarFontColor (helios::RGBcolor color)
 Set the RGB color of the colorbar text.
 
void setColorbarFontSize (uint font_size)
 Set the font size of the colorbar text.
 
void setColormap (Ctable colormap_name)
 Set the colormap used in Colorbar/visualization based on pre-defined colormaps.
 
void setColormap (const std::vector< helios::RGBcolor > &colors, const std::vector< float > &divisions)
 Set the colormap used in Colorbar/visualization based on a custom colormap.
 
Colormap getCurrentColormap () const
 Get the current colormap used in Colorbar/visualization.
 
void buildContextGeometry (helios::Context *context_ptr)
 Add all geometry from the Context to the visualizer.
 
void buildContextGeometry (helios::Context *context_ptr, const std::vector< uint > &UUIDs)
 Add select geometry from the Context to the visualizer by their UUIDs.
 
void updateContextPrimitiveColors ()
 Updates the colors of context primitives based on current visualization settings.
 
void colorContextPrimitivesByData (const char *data_name)
 Color primitives from Context by color mapping their ‘Primitive Data’.
 
void colorContextPrimitivesByData (const char *data_name, const std::vector< uint > &UUIDs)
 Color primitives from Context by color mapping their ‘Primitive Data’.
 
void colorContextPrimitivesByObjectData (const char *data_name)
 Color primitives from Context by color mapping their ‘Object Data’.
 
void colorContextPrimitivesByObjectData (const char *data_name, const std::vector< uint > &ObjIDs)
 Color primitives from Context by color mapping their ‘Object Data’.
 
void colorContextPrimitivesRandomly (const std::vector< uint > &UUIDs)
 Color primitives from Context with a random color.
 
void colorContextPrimitivesRandomly ()
 Color primitives from Context with a random color.
 
void colorContextObjectsRandomly (const std::vector< uint > &ObjIDs)
 Color objects from Context with a random color.
 
void colorContextObjectsRandomly ()
 Color objects from Context with a random color.
 
void hideWatermark ()
 Make Helios logo watermark invisible.
 
void showWatermark ()
 Make Helios logo watermark visible.
 
void updateWatermark ()
 Update watermark geometry to match current window size.
 
std::vector< helios::vec3plotInteractive ()
 Plot current geometry into an interactive graphics window.
 
void plotOnce (bool getKeystrokes)
 Run one rendering loop from plotInteractive()
 
void plotDepthMap ()
 Plot the depth map (distance from camera to nearest object)
 
void plotUpdate ()
 Update the graphics window based on current geometry, then continue the program.
 
void plotUpdate (bool hide_window)
 Update the graphics window based on current geometry, then continue the program, with the option not to display the graphic window.
 
void printWindow ()
 Print the current graphics window to a JPEG image file. File will be given a default filename and saved to the current directory from which the executable was run.
 
void printWindow (const char *outfile) const
 Print the current graphics window to a JPEG image file.
 
void displayImage (const std::vector< unsigned char > &pixel_data, uint width_pixels, uint height_pixels)
 Displays an image using the provided pixel data and dimensions.
 
void displayImage (const std::string &file_name)
 Displays an image file in the visualizer.
 
void getWindowPixelsRGB (uint *buffer) const
 Get R-G-B pixel data in the current display window.
 
 DEPRECATED (void getDepthMap(float *buffer))
 Get depth buffer data for the current display window.
 
void getDepthMap (std::vector< float > &depth_pixels, uint &width_pixels, uint &height_pixels)
 
void getWindowSize (uint &width, uint &height) const
 Get the size of the display window in pixels.
 
void getFramebufferSize (uint &width, uint &height) const
 Get the size of the framebuffer in pixels.
 
void clearGeometry ()
 Clear all geometry previously added to the visualizer.
 
void clearContextGeometry ()
 Clear all Context geometry previously added to the visualizer.
 
void closeWindow () const
 Close the graphics window.
 
helios::RGBcolor getBackgroundColor () const
 Retrieves the background color of the visualizer.
 
std::vector< helios::vec3getCameraPosition () const
 Retrieves the current camera position.
 
void clearColor ()
 Clears the primitive colors based on primitive data from a previous call to colorContextPrimitivesByData() or colorContextPrimitivesByObjectData().
 
void * getWindow () const
 Retrieves the window associated with the Visualizer.
 
glm::mat4 getPerspectiveTransformationMatrix () const
 Calculates the perspective transformation matrix for mapping between two quadrilaterals.
 
void setPointCullingEnabled (bool enabled)
 Point cloud culling configuration methods.
 
void setPointCullingThreshold (size_t threshold)
 Set the minimum number of points required to trigger culling.
 
void setPointMaxRenderDistance (float distance)
 Set the maximum rendering distance for points.
 
void setPointLODFactor (float factor)
 Set the level-of-detail factor for distance-based culling.
 
void getPointRenderingMetrics (size_t &total_points, size_t &rendered_points, float &culling_time_ms) const
 Get point cloud rendering performance metrics.
 

Static Public Member Functions

static int selfTest (int argc=0, char **argv=nullptr)
 Visualizer self-test routine.
 

Friends

struct Shader
 
struct Texture
 

Detailed Description

Class for visualization of simulation results.

Definition at line 280 of file Visualizer.h.

Member Enumeration Documentation

◆ CoordinateSystem

Coordinate system to be used when specifying spatial coordinates.

Enumerator
COORDINATES_WINDOW_NORMALIZED 

Coordinates are normalized to unity and are window-aligned. The point (x,y)=(0,0) is in the bottom left corner of the window, and (x,y)=(1,1) is in the upper right corner of the window. The z-coordinate specifies the depth in the screen-normal direction, with values ranging from -1 to 1. For example, an object at z=0.5 would be in front of an object at z=0.

COORDINATES_CARTESIAN 

Coordinates are specified in a 3D Cartesian system (right-handed), where +z is vertical.

Definition at line 330 of file Visualizer.h.

◆ Ctable

Pseudocolor map tables.

Enumerator
COLORMAP_HOT 

"Hot" colormap

COLORMAP_COOL 

"Cool" colormap

COLORMAP_RAINBOW 

"Rainbow" colormap

COLORMAP_LAVA 

"Lava" colormap

COLORMAP_PARULA 

"Parula" colormap

COLORMAP_GRAY 

"Gray" colormap

COLORMAP_CUSTOM 

Custom colormap.

Definition at line 340 of file Visualizer.h.

◆ LightingModel

Lighting model to use for shading primitives.

Enumerator
LIGHTING_NONE 

No shading, primitive is colored by its diffuse color.

LIGHTING_PHONG 

Phong lighting model is applied to add shading effects to the diffuse color.

LIGHTING_PHONG_SHADOWED 

Phong lighting model plus shadowing is applied to add shading effects to the diffuse color.

Definition at line 384 of file Visualizer.h.

Constructor & Destructor Documentation

◆ Visualizer() [1/4]

Visualizer::Visualizer ( uint  Wdisplay)
explicit

Visualizer constructor.

Parameters
[in]WdisplayWidth of the display window in pixels, and assumes default window aspect ratio of 1.25

Definition at line 100 of file VisualizerCore.cpp.

◆ Visualizer() [2/4]

Visualizer::Visualizer ( uint  Wdisplay,
uint  Hdisplay 
)

Visualizer constructor.

Parameters
[in]WdisplayWidth of the display window in pixels
[in]HdisplayHeight of the display window in pixels

Definition at line 104 of file VisualizerCore.cpp.

◆ Visualizer() [3/4]

Visualizer::Visualizer ( uint  Wdisplay,
uint  Hdisplay,
int  aliasing_samples 
)

Constructs a Visualizer object with the specified display dimensions and anti-aliasing settings.

Parameters
[in]WdisplayWidth of the display in pixels.
[in]HdisplayHeight of the display in pixels.
[in]aliasing_samplesNumber of anti-aliasing samples to use.

Definition at line 108 of file VisualizerCore.cpp.

◆ Visualizer() [4/4]

Visualizer::Visualizer ( uint  Wdisplay,
uint  Hdisplay,
int  aliasing_samples,
bool  window_decorations,
bool  headless 
)

Visualizer constructor with option to remove window decorations (e.g., header bar, trim). This is a workaround for an error that occurs on Linux systems when printing the window to a JPEG image (printWindow). Once a fix is found, this function will likely be removed

Parameters
[in]WdisplayWidth of the display in pixels.
[in]HdisplayHeight of the display in pixels.
[in]aliasing_samplesNumber of anti-aliasing samples to use.
[in]window_decorationsFlag to remove window decorations.
[in]headlessIf true, initializes the visualizer without opening a window.

Definition at line 112 of file VisualizerCore.cpp.

◆ ~Visualizer()

Visualizer::~Visualizer ( )

Visualizer destructor.

Definition at line 529 of file VisualizerCore.cpp.

Member Function Documentation

◆ addCoordinateAxes() [1/2]

void Visualizer::addCoordinateAxes ( )

Add a coordinate axis with at the origin with unit length.

Definition at line 924 of file VisualizerGeometry.cpp.

◆ addCoordinateAxes() [2/2]

void Visualizer::addCoordinateAxes ( const helios::vec3 origin,
const helios::vec3 length,
const std::string &  sign 
)

Add a coordinate axis.

Parameters
[in]origin(x,y,z) location of the coordinate axes orign
[in]lengthlength of coordinate axis lines from origin in each direction
[in]signeither "both" or "positive" should the axes be drawn in both positive and negative directions or just positive

Definition at line 928 of file VisualizerGeometry.cpp.

◆ addGridWireFrame()

void Visualizer::addGridWireFrame ( const helios::vec3 center,
const helios::vec3 size,
const helios::int3 subdiv 
)

Add a coordinate axis.

Parameters
[in]center(x,y,z) location of the center of the grid
[in]sizesize of the grid in each direction
[in]subdivnumber of grid subdivisions in each direction

Definition at line 974 of file VisualizerGeometry.cpp.

◆ addLine() [1/4]

size_t Visualizer::addLine ( const helios::vec3 start,
const helios::vec3 end,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add Lines by giving the coordinates of points along the Lines.

Parameters
[in]start(x,y,z) coordinates of line starting position
[in]end(x,y,z) coordinates of line ending position
[in]colorR-G-B-A color of the line
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 416 of file VisualizerGeometry.cpp.

◆ addLine() [2/4]

size_t Visualizer::addLine ( const helios::vec3 start,
const helios::vec3 end,
const helios::RGBAcolor color,
float  line_width,
CoordinateSystem  coordFlag 
)

Add Lines by giving the coordinates of points along the Lines with custom line width.

Parameters
[in]start(x,y,z) coordinates of line starting position
[in]end(x,y,z) coordinates of line ending position
[in]colorR-G-B-A color of the line
[in]line_widthWidth of the line in pixels
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 428 of file VisualizerGeometry.cpp.

◆ addLine() [3/4]

size_t Visualizer::addLine ( const helios::vec3 start,
const helios::vec3 end,
const helios::RGBcolor color,
CoordinateSystem  coordinate_system 
)

Add Lines by giving the coordinates of points along the Lines.

Parameters
[in]start(x,y,z) coordinates of line starting position
[in]end(x,y,z) coordinates of line ending position
[in]colorR-G-B color of the line
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 412 of file VisualizerGeometry.cpp.

◆ addLine() [4/4]

size_t Visualizer::addLine ( const helios::vec3 start,
const helios::vec3 end,
const helios::RGBcolor color,
float  line_width,
CoordinateSystem  coordinate_system 
)

Add Lines by giving the coordinates of points along the Lines with custom line width.

Parameters
[in]start(x,y,z) coordinates of line starting position
[in]end(x,y,z) coordinates of line ending position
[in]colorR-G-B color of the line
[in]line_widthWidth of the line in pixels
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 424 of file VisualizerGeometry.cpp.

◆ addPoint() [1/2]

size_t Visualizer::addPoint ( const helios::vec3 position,
const helios::RGBAcolor color,
float  pointsize,
CoordinateSystem  coordinate_system 
)

Add a point by giving its coordinates and size.

Parameters
[in]position(x,y,z) coordinates of Point
[in]colorR-G-B-A color of the Point
[in]pointsizeSize of the point in font points
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 446 of file VisualizerGeometry.cpp.

◆ addPoint() [2/2]

size_t Visualizer::addPoint ( const helios::vec3 position,
const helios::RGBcolor color,
float  pointsize,
CoordinateSystem  coordinate_system 
)

Add a point by giving its coordinates and size.

Parameters
[in]position(x,y,z) coordinates of Point
[in]colorR-G-B color of the Point
[in]pointsizeSize of the point in font points
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 442 of file VisualizerGeometry.cpp.

◆ addRectangleByCenter() [1/5]

size_t Visualizer::addRectangleByCenter ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const char *  texture_file,
CoordinateSystem  coordFlag 
)

Add a texture mapped rectangle by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the rectangle center
[in]sizeSize in the x- and y-directions
[in]rotationspherical rotation angle (elevation,azimuth)
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 69 of file VisualizerGeometry.cpp.

◆ addRectangleByCenter() [2/5]

size_t Visualizer::addRectangleByCenter ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the rectangle center
[in]sizeSize in the x- and y-directions
[in]rotationspherical rotation angle (elevation,azimuth)
[in]colorR-G-B-A color of the rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 42 of file VisualizerGeometry.cpp.

◆ addRectangleByCenter() [3/5]

size_t Visualizer::addRectangleByCenter ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const helios::RGBcolor color,
const char *  texture_file,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its center - rectangle is colored by and RGB color value but is masked by the alpha channel of a PNG image file.

Parameters
[in]center(x,y,z) location of the rectangle center
[in]sizeSize in the x- and y-directions
[in]rotationspherical rotation angle (elevation,azimuth)
[in]colorR-G-B color of the rectangle
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 96 of file VisualizerGeometry.cpp.

◆ addRectangleByCenter() [4/5]

size_t Visualizer::addRectangleByCenter ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const helios::RGBcolor color,
const Glyph glyph,
CoordinateSystem  coordFlag 
)

Add a texture masked rectangle by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the rectangle center
[in]sizeSize in the x- and y-directions
[in]rotationspherical rotation angle (elevation,azimuth)
[in]colorR-G-B color of the rectangle
[in]glyphPixel map of true/false values for a transparency mask
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 123 of file VisualizerGeometry.cpp.

◆ addRectangleByCenter() [5/5]

size_t Visualizer::addRectangleByCenter ( const helios::vec3 center,
const helios::vec2 size,
const helios::SphericalCoord rotation,
const helios::RGBcolor color,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the rectangle center
[in]sizeSize in the x- and y-directions
[in]rotationspherical rotation angle (elevation,azimuth)
[in]colorR-G-B color of the rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 38 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [1/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const char *  texture_file,
const std::vector< helios::vec2 > &  uvs,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices and color by texture map.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]uvsu-v coordinates for rectangle vertices
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 185 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [2/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const char *  texture_file,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 180 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [3/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBAcolor color,
const Glyph glyph,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]colorR-G-B-A color of the glyph
[in]glyphGlyph object used to render rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 250 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [4/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]colorR-G-B-A color of the rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 154 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [5/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBcolor color,
const char *  texture_file,
const std::vector< helios::vec2 > &  uvs,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices and mask by texture map transparency channel, but color by R-G-B value.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]uvsu-v coordinates for rectangle vertices
[in]colorR-G-B color of the rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 218 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [6/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBcolor color,
const char *  texture_file,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices - rectangle is colored by an RGB color value but is masked by the alpha channel of a PNG image file.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]colorR-G-B color of the rectangle
[in]texture_fileFile corresponding to the JPEG image to be used as a texture map
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 213 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [7/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBcolor color,
const Glyph glyph,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]colorR-G-B color of the glyph
[in]glyphGlyph object used to render rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 246 of file VisualizerGeometry.cpp.

◆ addRectangleByVertices() [8/8]

size_t Visualizer::addRectangleByVertices ( const std::vector< helios::vec3 > &  vertices,
const helios::RGBcolor color,
CoordinateSystem  coordFlag 
)

Add a rectangle by giving the coordinates of its four vertices.

Parameters
[in]vertices(x,y,z) coordinates of four vertices
[in]colorR-G-B color of the rectangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 150 of file VisualizerGeometry.cpp.

◆ addSkyDomeByCenter()

std::vector< size_t > Visualizer::addSkyDomeByCenter ( float  radius,
const helios::vec3 center,
uint  Ndivisions,
const char *  texture_file 
)

Add a Sky Dome, which is a hemispherical dome colored by a sky texture map.

Parameters
[in]radiusRadius of the dome
[in]center(x,y,z) location of dome center
[in]NdivisionsNumber of discrete divisions in making hemisphere
[in]texture_fileName of the texture map file

Definition at line 526 of file VisualizerGeometry.cpp.

◆ addSphereByCenter() [1/2]

std::vector< size_t > Visualizer::addSphereByCenter ( float  radius,
const helios::vec3 center,
uint  Ndivisions,
const helios::RGBAcolor color,
CoordinateSystem  coordinate_system 
)

Add a sphere by giving the radius and center.

Parameters
[in]radiusRadius of the sphere
[in]center(x,y,z) location of sphere center
[in]NdivisionsNumber of discrete divisions in making sphere
[in]colorR-G-B-A color of the sphere
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 474 of file VisualizerGeometry.cpp.

◆ addSphereByCenter() [2/2]

std::vector< size_t > Visualizer::addSphereByCenter ( float  radius,
const helios::vec3 center,
uint  Ndivisions,
const helios::RGBcolor color,
CoordinateSystem  coordinate_system 
)

Add a sphere by giving the radius and center.

Parameters
[in]radiusRadius of the sphere
[in]center(x,y,z) location of sphere center
[in]NdivisionsNumber of discrete divisions in making sphere
[in]colorR-G-B color of the sphere
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 470 of file VisualizerGeometry.cpp.

◆ addTextboxByCenter()

std::vector< size_t > Visualizer::addTextboxByCenter ( const char *  textstring,
const helios::vec3 center,
const helios::SphericalCoord rotation,
const helios::RGBcolor fontcolor,
uint  fontsize,
const char *  fontname,
CoordinateSystem  coordinate_system 
)

Add a text box by giving the coordinates of its center.

Parameters
[in]textstringString of text to display
[in]center(x,y,z) location of the text box center
[in]rotationSpherical rotation angle in radians (elevation,azimuth)
[in]fontcolorColor of the font
[in]fontsizeSize of the text font in points
[in]coordinate_systemCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 607 of file VisualizerGeometry.cpp.

◆ addTriangle() [1/4]

size_t Visualizer::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const char *  texture_file,
const helios::vec2 uv0,
const helios::vec2 uv1,
const helios::vec2 uv2,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add a triangle by giving the coordinates of its three vertices and color by a constant color, but mask using transparency channel of texture map.

Parameters
[in]vertex0(x,y,z) location of first vertex
[in]vertex1(x,y,z) location of first vertex
[in]vertex2(x,y,z) location of first vertex
[in]texture_fileFile corresponding to the image to be used as a texture map
[in]uv0u-v texture coordinates of vertex0
[in]uv1u-v texture coordinates of vertex1
[in]uv2u-v texture coordinates of vertex2
[in]colorR-G-B-A color of the triangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 349 of file VisualizerGeometry.cpp.

◆ addTriangle() [2/4]

size_t Visualizer::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const char *  texture_file,
const helios::vec2 uv0,
const helios::vec2 uv1,
const helios::vec2 uv2,
CoordinateSystem  coordFlag 
)

Add a triangle by giving the coordinates of its three vertices and color by texture map.

Parameters
[in]vertex0(x,y,z) location of first vertex
[in]vertex1(x,y,z) location of first vertex
[in]vertex2(x,y,z) location of first vertex
[in]texture_fileFile corresponding to the image to be used as a texture map
[in]uv0u-v texture coordinates of vertex0
[in]uv1u-v texture coordinates of vertex1
[in]uv2u-v texture coordinates of vertex2
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 318 of file VisualizerGeometry.cpp.

◆ addTriangle() [3/4]

size_t Visualizer::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add a triangle by giving the coordinates of its three vertices.

Parameters
[in]vertex0(x,y,z) location of first vertex
[in]vertex1(x,y,z) location of first vertex
[in]vertex2(x,y,z) location of first vertex
[in]colorR-G-B-A color of the triangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 290 of file VisualizerGeometry.cpp.

◆ addTriangle() [4/4]

size_t Visualizer::addTriangle ( const helios::vec3 vertex0,
const helios::vec3 vertex1,
const helios::vec3 vertex2,
const helios::RGBcolor color,
CoordinateSystem  coordFlag 
)

Add a triangle by giving the coordinates of its three vertices.

Parameters
[in]vertex0(x,y,z) location of first vertex
[in]vertex1(x,y,z) location of first vertex
[in]vertex2(x,y,z) location of first vertex
[in]colorR-G-B color of the triangle
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 286 of file VisualizerGeometry.cpp.

◆ addVoxelByCenter() [1/2]

std::vector< size_t > Visualizer::addVoxelByCenter ( const helios::vec3 center,
const helios::vec3 size,
const helios::SphericalCoord rotation,
const helios::RGBAcolor color,
CoordinateSystem  coordFlag 
)

Add a voxel by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the voxel center
[in]sizeSize in the x-, y- and z-directions
[in]rotationSpherical rotation angle (elevation,azimuth)
[in]colorR-G-B-A color of the voxel
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 384 of file VisualizerGeometry.cpp.

◆ addVoxelByCenter() [2/2]

std::vector< size_t > Visualizer::addVoxelByCenter ( const helios::vec3 center,
const helios::vec3 size,
const helios::SphericalCoord rotation,
const helios::RGBcolor color,
CoordinateSystem  coordFlag 
)

Add a voxel by giving the coordinates of its center.

Parameters
[in]center(x,y,z) location of the voxel center
[in]sizeSize in the x-, y- and z-directions
[in]rotationSpherical rotation angle (elevation,azimuth)
[in]colorR-G-B color of the voxel
[in]coordFlagCoordinate system to be used when specifying spatial coordinates. Should be one of "Visualizer::COORDINATES_WINDOW_NORMALIZED" or "Visualizer::COORDINATES_CARTESIAN".

Definition at line 380 of file VisualizerGeometry.cpp.

◆ buildContextGeometry() [1/2]

void Visualizer::buildContextGeometry ( helios::Context context_ptr)

Add all geometry from the Context to the visualizer.

Parameters
[in]context_ptrPointer to the simulation context

Definition at line 31 of file VisualizerContext.cpp.

◆ buildContextGeometry() [2/2]

void Visualizer::buildContextGeometry ( helios::Context context_ptr,
const std::vector< uint > &  UUIDs 
)

Add select geometry from the Context to the visualizer by their UUIDs.

Parameters
[in]context_ptrPointer to the simulation context
[in]UUIDsUUIDs of Context primitives to be added to the visualizer

Definition at line 39 of file VisualizerContext.cpp.

◆ clearColor()

void Visualizer::clearColor ( )

Clears the primitive colors based on primitive data from a previous call to colorContextPrimitivesByData() or colorContextPrimitivesByObjectData().

Definition at line 757 of file VisualizerContext.cpp.

◆ clearContextGeometry()

void Visualizer::clearContextGeometry ( )

Clear all Context geometry previously added to the visualizer.

Definition at line 20 of file VisualizerContext.cpp.

◆ clearGeometry()

void Visualizer::clearGeometry ( )

Clear all geometry previously added to the visualizer.

Definition at line 26 of file VisualizerGeometry.cpp.

◆ closeWindow()

void Visualizer::closeWindow ( ) const

Close the graphics window.

Definition at line 237 of file VisualizerRendering.cpp.

◆ colorContextObjectsRandomly() [1/2]

void Visualizer::colorContextObjectsRandomly ( )

Color objects from Context with a random color.

Note
Useful for visualizing individual objects

Definition at line 742 of file VisualizerContext.cpp.

◆ colorContextObjectsRandomly() [2/2]

void Visualizer::colorContextObjectsRandomly ( const std::vector< uint > &  ObjIDs)

Color objects from Context with a random color.

Note
Useful for visualizing individual objects

Definition at line 728 of file VisualizerContext.cpp.

◆ colorContextPrimitivesByData() [1/2]

void Visualizer::colorContextPrimitivesByData ( const char *  data_name)

Color primitives from Context by color mapping their ‘Primitive Data’.

Parameters
[in]data_nameName of ‘Primitive Data’
Note
If the data value does not exist for a certain primitive, a value of 0 is assumed.

Definition at line 640 of file VisualizerContext.cpp.

◆ colorContextPrimitivesByData() [2/2]

void Visualizer::colorContextPrimitivesByData ( const char *  data_name,
const std::vector< uint > &  UUIDs 
)

Color primitives from Context by color mapping their ‘Primitive Data’.

Parameters
[in]data_nameName of ‘Primitive Data’
[in]UUIDsUUID's of primitives to be colored by data
Note
If the data value does not exist for a certain primitive, a value of 0 is assumed.

Definition at line 652 of file VisualizerContext.cpp.

◆ colorContextPrimitivesByObjectData() [1/2]

void Visualizer::colorContextPrimitivesByObjectData ( const char *  data_name)

Color primitives from Context by color mapping their ‘Object Data’.

Parameters
[in]data_nameName of ‘Object Data’
Note
If the data value does not exist for a certain primitive, a value of 0 is assumed.

Definition at line 664 of file VisualizerContext.cpp.

◆ colorContextPrimitivesByObjectData() [2/2]

void Visualizer::colorContextPrimitivesByObjectData ( const char *  data_name,
const std::vector< uint > &  ObjIDs 
)

Color primitives from Context by color mapping their ‘Object Data’.

Parameters
[in]data_nameName of ‘Object Data’
[in]ObjIDsObject ID's of primitives to be colored by object data
Note
If the data value does not exist for a certain primitive, a value of 0 is assumed.

Definition at line 676 of file VisualizerContext.cpp.

◆ colorContextPrimitivesRandomly() [1/2]

void Visualizer::colorContextPrimitivesRandomly ( )

Color primitives from Context with a random color.

Note
Useful for visualizing individual primitives that are part of compound objects

Definition at line 708 of file VisualizerContext.cpp.

◆ colorContextPrimitivesRandomly() [2/2]

void Visualizer::colorContextPrimitivesRandomly ( const std::vector< uint > &  UUIDs)

Color primitives from Context with a random color.

Parameters
[in]UUIDsPrimitive UUIDs to color randomly
Note
Useful for visualizing individual primitives that are part of compound objects

Definition at line 688 of file VisualizerContext.cpp.

◆ deleteGeometry()

void Visualizer::deleteGeometry ( size_t  geometry_id)

Removes the geometry with the specified ID from the visualizer.

Parameters
[in]geometry_idThe unique identifier of the geometry to delete.

Definition at line 828 of file VisualizerGeometry.cpp.

◆ DEPRECATED() [1/2]

Visualizer::DEPRECATED ( void   addSkyDomeByCenterfloat radius, const helios::vec3 &center, uint Ndivisions, const char *texture_file, int layer)

Add a Sky Dome, which is a hemispherical dome colored by a sky texture map.

Note
This function has been deprecated, as layers are no longer supported.

◆ DEPRECATED() [2/2]

Visualizer::DEPRECATED ( void   getDepthMapfloat *buffer)

Get depth buffer data for the current display window.

Parameters
[out]bufferDistance to nearest object from the camera location.

◆ disableColorbar()

void Visualizer::disableColorbar ( void  )

Disable the colorbar.

Definition at line 639 of file VisualizerCore.cpp.

◆ disableCoordinateAxes()

void Visualizer::disableCoordinateAxes ( )

Remove coordinate axes (if created with Visualizer::addCoordinateAxes)

Definition at line 968 of file VisualizerGeometry.cpp.

◆ disableMessages()

void Visualizer::disableMessages ( )

Disable standard output from this plug-in.

Definition at line 567 of file VisualizerCore.cpp.

◆ displayImage() [1/2]

void Visualizer::displayImage ( const std::string &  file_name)

Displays an image file in the visualizer.

Note that this function clears any existing geometry in the visualizer.

Parameters
[in]file_namePath to the image file to display.

Definition at line 113 of file VisualizerRendering.cpp.

◆ displayImage() [2/2]

void Visualizer::displayImage ( const std::vector< unsigned char > &  pixel_data,
uint  width_pixels,
uint  height_pixels 
)

Displays an image using the provided pixel data and dimensions.

Note that this function clears any existing geometry in the visualizer.

Parameters
[in]pixel_dataThe pixel data of the image. Each pixel requires 4 components (RGBA), and the vector size should be 4 * width_pixels * height_pixels.
[in]width_pixelsThe width of the image in pixels.
[in]height_pixelsThe height of the image in pixels.
Note
The function assumes the pixel data has a length consistent with the resolution specified by width_pixels and height_pixels.

Definition at line 74 of file VisualizerRendering.cpp.

◆ enableColorbar()

void Visualizer::enableColorbar ( void  )

Enable the colorbar.

Definition at line 635 of file VisualizerCore.cpp.

◆ enableMessages()

void Visualizer::enableMessages ( )

Enable standard output from this plug-in (default)

Definition at line 563 of file VisualizerCore.cpp.

◆ getBackgroundColor()

helios::RGBcolor Visualizer::getBackgroundColor ( ) const

Retrieves the background color of the visualizer.

Returns
The current background color as an RGBcolor object.

Definition at line 1036 of file VisualizerCore.cpp.

◆ getCameraPosition()

std::vector< helios::vec3 > Visualizer::getCameraPosition ( ) const

Retrieves the current camera position.

Returns
A vector containing the camera look-at center and the camera eye location as two elements of type helios::vec3.

Definition at line 1044 of file VisualizerCore.cpp.

◆ getCurrentColormap()

Colormap Visualizer::getCurrentColormap ( ) const

Get the current colormap used in Colorbar/visualization.

Definition at line 743 of file VisualizerCore.cpp.

◆ getDepthMap()

void Visualizer::getDepthMap ( std::vector< float > &  depth_pixels,
uint width_pixels,
uint height_pixels 
)

Definition at line 150 of file VisualizerRendering.cpp.

◆ getFramebufferSize()

void Visualizer::getFramebufferSize ( uint width,
uint height 
) const

Get the size of the framebuffer in pixels.

Parameters
[out]widthWidth of the framebuffer in pixels
[out]heightHeight of the framebuffer in pixels

Definition at line 232 of file VisualizerRendering.cpp.

◆ getPerspectiveTransformationMatrix()

glm::mat4 Visualizer::getPerspectiveTransformationMatrix ( ) const

Calculates the perspective transformation matrix for mapping between two quadrilaterals.

Returns
4x4 perspective transformation matrix.

Definition at line 1048 of file VisualizerCore.cpp.

◆ getPointRenderingMetrics()

void Visualizer::getPointRenderingMetrics ( size_t &  total_points,
size_t &  rendered_points,
float &  culling_time_ms 
) const

Get point cloud rendering performance metrics.

Parameters
[out]total_pointsTotal number of points in the scene
[out]rendered_pointsNumber of points actually rendered after culling
[out]culling_time_msTime spent on culling in milliseconds

Definition at line 1795 of file VisualizerRendering.cpp.

◆ getWindow()

void * Visualizer::getWindow ( ) const

Retrieves the window associated with the Visualizer.

Returns
Pointer to the window object.

Definition at line 1023 of file VisualizerCore.cpp.

◆ getWindowPixelsRGB()

void Visualizer::getWindowPixelsRGB ( uint buffer) const

Get R-G-B pixel data in the current display window.

Parameters
[out]bufferPixel data. The data is stored as r-g-b * column * row. So indices (0,1,2) would be the RGB values for row 0 and column 0, indices (3,4,5) would be RGB values for row 0 and column 1, and so on. Thus, buffer is of size 3*width*height.

Definition at line 130 of file VisualizerRendering.cpp.

◆ getWindowSize()

void Visualizer::getWindowSize ( uint width,
uint height 
) const

Get the size of the display window in pixels.

Parameters
[out]widthWidth of the display window in pixels
[out]heightHeight of the display window in pixels

Definition at line 227 of file VisualizerRendering.cpp.

◆ hideWatermark()

void Visualizer::hideWatermark ( )

Make Helios logo watermark invisible.

Definition at line 604 of file VisualizerCore.cpp.

◆ plotDepthMap()

void Visualizer::plotDepthMap ( )

Plot the depth map (distance from camera to nearest object)

The resulting image is normalized depth, where white = closest and black = farthest.

Definition at line 1132 of file VisualizerRendering.cpp.

◆ plotInteractive()

std::vector< helios::vec3 > Visualizer::plotInteractive ( )

Plot current geometry into an interactive graphics window.

Definition at line 242 of file VisualizerRendering.cpp.

◆ plotOnce()

void Visualizer::plotOnce ( bool  getKeystrokes)

Run one rendering loop from plotInteractive()

Parameters
[in]getKeystrokesIf false, do not update visualization with input keystrokes.

Definition at line 391 of file VisualizerRendering.cpp.

◆ plotUpdate() [1/2]

void Visualizer::plotUpdate ( )

Update the graphics window based on current geometry, then continue the program.

Definition at line 942 of file VisualizerRendering.cpp.

◆ plotUpdate() [2/2]

void Visualizer::plotUpdate ( bool  hide_window)

Update the graphics window based on current geometry, then continue the program, with the option not to display the graphic window.

If running a large number of renderings, or running remotely, it can be desirable to not open the graphic window.

Parameters
[in]hide_windowIf false, do not display the graphic window.

Definition at line 946 of file VisualizerRendering.cpp.

◆ printWindow() [1/2]

void Visualizer::printWindow ( )

Print the current graphics window to a JPEG image file. File will be given a default filename and saved to the current directory from which the executable was run.

Definition at line 35 of file VisualizerRendering.cpp.

◆ printWindow() [2/2]

void Visualizer::printWindow ( const char *  outfile) const

Print the current graphics window to a JPEG image file.

Parameters
[in]outfilePath to file where image should be saved.
Note
If outfile does not have extension ‘.jpg’, it will be appended to the file name.

Definition at line 49 of file VisualizerRendering.cpp.

◆ selfTest()

int Visualizer::selfTest ( int  argc = 0,
char **  argv = nullptr 
)
static

Visualizer self-test routine.

Definition at line 373 of file selfTest.cpp.

◆ setBackgroundColor()

void Visualizer::setBackgroundColor ( const helios::RGBcolor color)

Set the background color for the visualizer window.

Parameters
[in]colorBackground color

Definition at line 600 of file VisualizerCore.cpp.

◆ setCameraFieldOfView()

void Visualizer::setCameraFieldOfView ( float  angle_FOV)

Set the camera field of view (angle width) in degrees. Default value is 45 degrees.

Parameters
[in]angle_FOVAngle of camera field of view in degrees.

Definition at line 581 of file VisualizerCore.cpp.

◆ setCameraPosition() [1/2]

void Visualizer::setCameraPosition ( const helios::SphericalCoord cameraAngle,
const helios::vec3 lookAt 
)

Set camera position.

Parameters
[in]cameraAngle(elevation,azimuth) angle to the camera with respect to the ‘lookAt’ position.
[in]lookAt(x,y,z) position of where the camera is looking at.

Definition at line 576 of file VisualizerCore.cpp.

◆ setCameraPosition() [2/2]

void Visualizer::setCameraPosition ( const helios::vec3 cameraPosition,
const helios::vec3 lookAt 
)

Set camera position.

Parameters
[in]cameraPosition(x,y,z) position of the camera, i.e., this is where the actual camera or ‘eye’ is positioned.
[in]lookAt(x,y,z) position of where the camera is looking at.

Definition at line 571 of file VisualizerCore.cpp.

◆ setColorbarFontColor()

void Visualizer::setColorbarFontColor ( helios::RGBcolor  color)

Set the RGB color of the colorbar text.

Parameters
[in]colorFont color

Definition at line 709 of file VisualizerCore.cpp.

◆ setColorbarFontSize()

void Visualizer::setColorbarFontSize ( uint  font_size)

Set the font size of the colorbar text.

Parameters
[in]font_sizeFont size

Definition at line 702 of file VisualizerCore.cpp.

◆ setColorbarPosition()

void Visualizer::setColorbarPosition ( helios::vec3  position)

Set the position of the colorbar in normalized window coordinates (0-1)

Parameters
[in]positionPosition of the colorbar in normalized window coordinates

Definition at line 647 of file VisualizerCore.cpp.

◆ setColorbarRange()

void Visualizer::setColorbarRange ( float  cmin,
float  cmax 
)

Set the range of the Colorbar.

Parameters
[in]cminMinimum value
[out]cmaxMaximum value

Definition at line 661 of file VisualizerCore.cpp.

◆ setColorbarSize()

void Visualizer::setColorbarSize ( helios::vec2  size)

Set the size of the colorbar in normalized window units (0-1)

Parameters
[in]sizeSize of the colorbar in normalized window units (0-1)

Definition at line 654 of file VisualizerCore.cpp.

◆ setColorbarTicks()

void Visualizer::setColorbarTicks ( const std::vector< float > &  ticks)

Set the values in the colorbar where ticks and labels should be placed.

Parameters
[in]ticksVector of values corresponding to ticks
Note
If tick values are outside of the colorbar range (see setColorBarRange()), the colorbar will be automatically expanded to fit the tick values.

Definition at line 670 of file VisualizerCore.cpp.

◆ setColorbarTitle()

void Visualizer::setColorbarTitle ( const char *  title)

Set the title of the Colorbar.

Parameters
[in]titleColorbar title

Definition at line 698 of file VisualizerCore.cpp.

◆ setColormap() [1/2]

void Visualizer::setColormap ( const std::vector< helios::RGBcolor > &  colors,
const std::vector< float > &  divisions 
)

Set the colormap used in Colorbar/visualization based on a custom colormap.

Parameters
[in]colorsVector of colors defining control points on the colormap.
[in]divisionsVector of values defining the normalized coordinates of each color control point on the colormap.

Definition at line 733 of file VisualizerCore.cpp.

◆ setColormap() [2/2]

void Visualizer::setColormap ( Ctable  colormap_name)

Set the colormap used in Colorbar/visualization based on pre-defined colormaps.

Parameters
[in]colormap_nameName of a colormap.
Note
Valid colormaps are "COLORMAP_HOT", "COLORMAP_COOL", "COLORMAP_LAVA", "COLORMAP_RAINBOW", "COLORMAP_PARULA", "COLORMAP_GRAY".

Definition at line 713 of file VisualizerCore.cpp.

◆ setLightDirection()

void Visualizer::setLightDirection ( const helios::vec3 direction)

Set the direction of the light source.

Parameters
[in]directionVector pointing in the direction of the light source (vector starts at light source and points toward scene.)

Definition at line 585 of file VisualizerCore.cpp.

◆ setLightingModel()

void Visualizer::setLightingModel ( LightingModel  lightingmodel)

Set the lighting model for shading of all primitives.

Parameters
[in]lightingmodelLighting model to be used
See also
LightingModel

Definition at line 590 of file VisualizerCore.cpp.

◆ setLightIntensityFactor()

void Visualizer::setLightIntensityFactor ( float  lightintensityfactor)

Set the light intensity scaling factor.

Parameters
[in]lightintensityfactorScaling factor for light intensity. Default is 1.0

Definition at line 596 of file VisualizerCore.cpp.

◆ setPointCullingEnabled()

void Visualizer::setPointCullingEnabled ( bool  enabled)

Point cloud culling configuration methods.

Enable or disable point cloud culling optimization

Parameters
[in]enabledTrue to enable culling, false to disable

Definition at line 1779 of file VisualizerRendering.cpp.

◆ setPointCullingThreshold()

void Visualizer::setPointCullingThreshold ( size_t  threshold)

Set the minimum number of points required to trigger culling.

Parameters
[in]thresholdPoint count threshold for enabling culling

Definition at line 1783 of file VisualizerRendering.cpp.

◆ setPointLODFactor()

void Visualizer::setPointLODFactor ( float  factor)

Set the level-of-detail factor for distance-based culling.

Parameters
[in]factorLOD factor (higher values = more aggressive culling)

Definition at line 1791 of file VisualizerRendering.cpp.

◆ setPointMaxRenderDistance()

void Visualizer::setPointMaxRenderDistance ( float  distance)

Set the maximum rendering distance for points.

Parameters
[in]distanceMaximum distance in world units (0 = auto-calculate)

Definition at line 1787 of file VisualizerRendering.cpp.

◆ showWatermark()

void Visualizer::showWatermark ( )

Make Helios logo watermark visible.

Definition at line 612 of file VisualizerCore.cpp.

◆ updateContextPrimitiveColors()

void Visualizer::updateContextPrimitiveColors ( )

Updates the colors of context primitives based on current visualization settings.

This method processes all primitive geometries within the context, applies appropriate color mapping based on configured data or object data, updates their color values, and handles internal logic for colormap range adjustments and primitive existence checks.

Definition at line 452 of file VisualizerContext.cpp.

◆ updateWatermark()

void Visualizer::updateWatermark ( )

Update watermark geometry to match current window size.

Definition at line 1435 of file VisualizerRendering.cpp.

Friends And Related Symbol Documentation

◆ Shader

friend struct Shader
friend

Definition at line 1461 of file Visualizer.h.

◆ Texture

friend struct Texture
friend

Definition at line 1462 of file Visualizer.h.


The documentation for this class was generated from the following files: