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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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 ¢er, 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::vec3 > | plotInteractive () |
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::vec3 > | getCameraPosition () 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 |
Class for visualization of simulation results.
Definition at line 280 of file Visualizer.h.
Coordinate system to be used when specifying spatial coordinates.
Definition at line 330 of file Visualizer.h.
enum Visualizer::Ctable |
Pseudocolor map tables.
Definition at line 340 of file Visualizer.h.
Lighting model to use for shading primitives.
Definition at line 384 of file Visualizer.h.
|
explicit |
Visualizer constructor.
[in] | Wdisplay | Width of the display window in pixels, and assumes default window aspect ratio of 1.25 |
Definition at line 100 of file VisualizerCore.cpp.
Visualizer constructor.
[in] | Wdisplay | Width of the display window in pixels |
[in] | Hdisplay | Height of the display window in pixels |
Definition at line 104 of file VisualizerCore.cpp.
Constructs a Visualizer object with the specified display dimensions and anti-aliasing settings.
[in] | Wdisplay | Width of the display in pixels. |
[in] | Hdisplay | Height of the display in pixels. |
[in] | aliasing_samples | Number of anti-aliasing samples to use. |
Definition at line 108 of file VisualizerCore.cpp.
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
[in] | Wdisplay | Width of the display in pixels. |
[in] | Hdisplay | Height of the display in pixels. |
[in] | aliasing_samples | Number of anti-aliasing samples to use. |
[in] | window_decorations | Flag to remove window decorations. |
[in] | headless | If true, initializes the visualizer without opening a window. |
Definition at line 112 of file VisualizerCore.cpp.
Visualizer::~Visualizer | ( | ) |
Visualizer destructor.
Definition at line 529 of file VisualizerCore.cpp.
void Visualizer::addCoordinateAxes | ( | ) |
Add a coordinate axis with at the origin with unit length.
Definition at line 924 of file VisualizerGeometry.cpp.
void Visualizer::addCoordinateAxes | ( | const helios::vec3 & | origin, |
const helios::vec3 & | length, | ||
const std::string & | sign | ||
) |
Add a coordinate axis.
[in] | origin | (x,y,z) location of the coordinate axes orign |
[in] | length | length of coordinate axis lines from origin in each direction |
[in] | sign | either "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.
void Visualizer::addGridWireFrame | ( | const helios::vec3 & | center, |
const helios::vec3 & | size, | ||
const helios::int3 & | subdiv | ||
) |
Add a coordinate axis.
[in] | center | (x,y,z) location of the center of the grid |
[in] | size | size of the grid in each direction |
[in] | subdiv | number of grid subdivisions in each direction |
Definition at line 974 of file VisualizerGeometry.cpp.
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.
[in] | start | (x,y,z) coordinates of line starting position |
[in] | end | (x,y,z) coordinates of line ending position |
[in] | color | R-G-B-A color of the line |
[in] | coordFlag | Coordinate 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.
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.
[in] | start | (x,y,z) coordinates of line starting position |
[in] | end | (x,y,z) coordinates of line ending position |
[in] | color | R-G-B-A color of the line |
[in] | line_width | Width of the line in pixels |
[in] | coordFlag | Coordinate 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.
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.
[in] | start | (x,y,z) coordinates of line starting position |
[in] | end | (x,y,z) coordinates of line ending position |
[in] | color | R-G-B color of the line |
[in] | coordinate_system | Coordinate 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.
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.
[in] | start | (x,y,z) coordinates of line starting position |
[in] | end | (x,y,z) coordinates of line ending position |
[in] | color | R-G-B color of the line |
[in] | line_width | Width of the line in pixels |
[in] | coordinate_system | Coordinate 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.
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.
[in] | position | (x,y,z) coordinates of Point |
[in] | color | R-G-B-A color of the Point |
[in] | pointsize | Size of the point in font points |
[in] | coordinate_system | Coordinate 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.
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.
[in] | position | (x,y,z) coordinates of Point |
[in] | color | R-G-B color of the Point |
[in] | pointsize | Size of the point in font points |
[in] | coordinate_system | Coordinate 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.
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.
[in] | center | (x,y,z) location of the rectangle center |
[in] | size | Size in the x- and y-directions |
[in] | rotation | spherical rotation angle (elevation,azimuth) |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the rectangle center |
[in] | size | Size in the x- and y-directions |
[in] | rotation | spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B-A color of the rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the rectangle center |
[in] | size | Size in the x- and y-directions |
[in] | rotation | spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B color of the rectangle |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the rectangle center |
[in] | size | Size in the x- and y-directions |
[in] | rotation | spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B color of the rectangle |
[in] | glyph | Pixel map of true/false values for a transparency mask |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the rectangle center |
[in] | size | Size in the x- and y-directions |
[in] | rotation | spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B color of the rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | uvs | u-v coordinates for rectangle vertices |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | color | R-G-B-A color of the glyph |
[in] | glyph | Glyph object used to render rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | color | R-G-B-A color of the rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | uvs | u-v coordinates for rectangle vertices |
[in] | color | R-G-B color of the rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | color | R-G-B color of the rectangle |
[in] | texture_file | File corresponding to the JPEG image to be used as a texture map |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | color | R-G-B color of the glyph |
[in] | glyph | Glyph object used to render rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | vertices | (x,y,z) coordinates of four vertices |
[in] | color | R-G-B color of the rectangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | radius | Radius of the dome |
[in] | center | (x,y,z) location of dome center |
[in] | Ndivisions | Number of discrete divisions in making hemisphere |
[in] | texture_file | Name of the texture map file |
Definition at line 526 of file VisualizerGeometry.cpp.
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.
[in] | radius | Radius of the sphere |
[in] | center | (x,y,z) location of sphere center |
[in] | Ndivisions | Number of discrete divisions in making sphere |
[in] | color | R-G-B-A color of the sphere |
[in] | coordinate_system | Coordinate 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.
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.
[in] | radius | Radius of the sphere |
[in] | center | (x,y,z) location of sphere center |
[in] | Ndivisions | Number of discrete divisions in making sphere |
[in] | color | R-G-B color of the sphere |
[in] | coordinate_system | Coordinate 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.
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.
[in] | textstring | String of text to display |
[in] | center | (x,y,z) location of the text box center |
[in] | rotation | Spherical rotation angle in radians (elevation,azimuth) |
[in] | fontcolor | Color of the font |
[in] | fontsize | Size of the text font in points |
[in] | coordinate_system | Coordinate 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.
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.
[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_file | File corresponding to the image to be used as a texture map |
[in] | uv0 | u-v texture coordinates of vertex0 |
[in] | uv1 | u-v texture coordinates of vertex1 |
[in] | uv2 | u-v texture coordinates of vertex2 |
[in] | color | R-G-B-A color of the triangle |
[in] | coordFlag | Coordinate 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.
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.
[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_file | File corresponding to the image to be used as a texture map |
[in] | uv0 | u-v texture coordinates of vertex0 |
[in] | uv1 | u-v texture coordinates of vertex1 |
[in] | uv2 | u-v texture coordinates of vertex2 |
[in] | coordFlag | Coordinate 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.
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.
[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] | color | R-G-B-A color of the triangle |
[in] | coordFlag | Coordinate 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.
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.
[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] | color | R-G-B color of the triangle |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the voxel center |
[in] | size | Size in the x-, y- and z-directions |
[in] | rotation | Spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B-A color of the voxel |
[in] | coordFlag | Coordinate 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.
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.
[in] | center | (x,y,z) location of the voxel center |
[in] | size | Size in the x-, y- and z-directions |
[in] | rotation | Spherical rotation angle (elevation,azimuth) |
[in] | color | R-G-B color of the voxel |
[in] | coordFlag | Coordinate 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.
void Visualizer::buildContextGeometry | ( | helios::Context * | context_ptr | ) |
Add all geometry from the Context to the visualizer.
[in] | context_ptr | Pointer to the simulation context |
Definition at line 31 of file VisualizerContext.cpp.
void Visualizer::buildContextGeometry | ( | helios::Context * | context_ptr, |
const std::vector< uint > & | UUIDs | ||
) |
Add select geometry from the Context to the visualizer by their UUIDs.
[in] | context_ptr | Pointer to the simulation context |
[in] | UUIDs | UUIDs of Context primitives to be added to the visualizer |
Definition at line 39 of file VisualizerContext.cpp.
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.
void Visualizer::clearContextGeometry | ( | ) |
Clear all Context geometry previously added to the visualizer.
Definition at line 20 of file VisualizerContext.cpp.
void Visualizer::clearGeometry | ( | ) |
Clear all geometry previously added to the visualizer.
Definition at line 26 of file VisualizerGeometry.cpp.
void Visualizer::closeWindow | ( | ) | const |
Close the graphics window.
Definition at line 237 of file VisualizerRendering.cpp.
void Visualizer::colorContextObjectsRandomly | ( | ) |
Color objects from Context with a random color.
Definition at line 742 of file VisualizerContext.cpp.
void Visualizer::colorContextObjectsRandomly | ( | const std::vector< uint > & | ObjIDs | ) |
Color objects from Context with a random color.
Definition at line 728 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesByData | ( | const char * | data_name | ) |
Color primitives from Context by color mapping their ‘Primitive Data’.
[in] | data_name | Name of ‘Primitive Data’ |
Definition at line 640 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesByData | ( | const char * | data_name, |
const std::vector< uint > & | UUIDs | ||
) |
Color primitives from Context by color mapping their ‘Primitive Data’.
[in] | data_name | Name of ‘Primitive Data’ |
[in] | UUIDs | UUID's of primitives to be colored by data |
Definition at line 652 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesByObjectData | ( | const char * | data_name | ) |
Color primitives from Context by color mapping their ‘Object Data’.
[in] | data_name | Name of ‘Object Data’ |
Definition at line 664 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesByObjectData | ( | const char * | data_name, |
const std::vector< uint > & | ObjIDs | ||
) |
Color primitives from Context by color mapping their ‘Object Data’.
[in] | data_name | Name of ‘Object Data’ |
[in] | ObjIDs | Object ID's of primitives to be colored by object data |
Definition at line 676 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesRandomly | ( | ) |
Color primitives from Context with a random color.
Definition at line 708 of file VisualizerContext.cpp.
void Visualizer::colorContextPrimitivesRandomly | ( | const std::vector< uint > & | UUIDs | ) |
Color primitives from Context with a random color.
[in] | UUIDs | Primitive UUIDs to color randomly |
Definition at line 688 of file VisualizerContext.cpp.
void Visualizer::deleteGeometry | ( | size_t | geometry_id | ) |
Removes the geometry with the specified ID from the visualizer.
[in] | geometry_id | The unique identifier of the geometry to delete. |
Definition at line 828 of file VisualizerGeometry.cpp.
Visualizer::DEPRECATED | ( | void | addSkyDomeByCenterfloat radius, const helios::vec3 ¢er, uint Ndivisions, const char *texture_file, int layer | ) |
Add a Sky Dome, which is a hemispherical dome colored by a sky texture map.
Visualizer::DEPRECATED | ( | void | getDepthMapfloat *buffer | ) |
Get depth buffer data for the current display window.
[out] | buffer | Distance to nearest object from the camera location. |
void Visualizer::disableColorbar | ( | void | ) |
Disable the colorbar.
Definition at line 639 of file VisualizerCore.cpp.
void Visualizer::disableCoordinateAxes | ( | ) |
Remove coordinate axes (if created with Visualizer::addCoordinateAxes)
Definition at line 968 of file VisualizerGeometry.cpp.
void Visualizer::disableMessages | ( | ) |
Disable standard output from this plug-in.
Definition at line 567 of file VisualizerCore.cpp.
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.
[in] | file_name | Path to the image file to display. |
Definition at line 113 of file VisualizerRendering.cpp.
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.
[in] | pixel_data | The pixel data of the image. Each pixel requires 4 components (RGBA), and the vector size should be 4 * width_pixels * height_pixels. |
[in] | width_pixels | The width of the image in pixels. |
[in] | height_pixels | The height of the image in pixels. |
Definition at line 74 of file VisualizerRendering.cpp.
void Visualizer::enableColorbar | ( | void | ) |
Enable the colorbar.
Definition at line 635 of file VisualizerCore.cpp.
void Visualizer::enableMessages | ( | ) |
Enable standard output from this plug-in (default)
Definition at line 563 of file VisualizerCore.cpp.
helios::RGBcolor Visualizer::getBackgroundColor | ( | ) | const |
Retrieves the background color of the visualizer.
Definition at line 1036 of file VisualizerCore.cpp.
std::vector< helios::vec3 > Visualizer::getCameraPosition | ( | ) | const |
Retrieves the current camera position.
Definition at line 1044 of file VisualizerCore.cpp.
Colormap Visualizer::getCurrentColormap | ( | ) | const |
Get the current colormap used in Colorbar/visualization.
Definition at line 743 of file VisualizerCore.cpp.
void Visualizer::getDepthMap | ( | std::vector< float > & | depth_pixels, |
uint & | width_pixels, | ||
uint & | height_pixels | ||
) |
Definition at line 150 of file VisualizerRendering.cpp.
Get the size of the framebuffer in pixels.
[out] | width | Width of the framebuffer in pixels |
[out] | height | Height of the framebuffer in pixels |
Definition at line 232 of file VisualizerRendering.cpp.
glm::mat4 Visualizer::getPerspectiveTransformationMatrix | ( | ) | const |
Calculates the perspective transformation matrix for mapping between two quadrilaterals.
Definition at line 1048 of file VisualizerCore.cpp.
void Visualizer::getPointRenderingMetrics | ( | size_t & | total_points, |
size_t & | rendered_points, | ||
float & | culling_time_ms | ||
) | const |
Get point cloud rendering performance metrics.
[out] | total_points | Total number of points in the scene |
[out] | rendered_points | Number of points actually rendered after culling |
[out] | culling_time_ms | Time spent on culling in milliseconds |
Definition at line 1795 of file VisualizerRendering.cpp.
void * Visualizer::getWindow | ( | ) | const |
Retrieves the window associated with the Visualizer.
Definition at line 1023 of file VisualizerCore.cpp.
void Visualizer::getWindowPixelsRGB | ( | uint * | buffer | ) | const |
Get R-G-B pixel data in the current display window.
[out] | buffer | Pixel 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.
Get the size of the display window in pixels.
[out] | width | Width of the display window in pixels |
[out] | height | Height of the display window in pixels |
Definition at line 227 of file VisualizerRendering.cpp.
void Visualizer::hideWatermark | ( | ) |
Make Helios logo watermark invisible.
Definition at line 604 of file VisualizerCore.cpp.
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.
std::vector< helios::vec3 > Visualizer::plotInteractive | ( | ) |
Plot current geometry into an interactive graphics window.
Definition at line 242 of file VisualizerRendering.cpp.
void Visualizer::plotOnce | ( | bool | getKeystrokes | ) |
Run one rendering loop from plotInteractive()
[in] | getKeystrokes | If false, do not update visualization with input keystrokes. |
Definition at line 391 of file VisualizerRendering.cpp.
void Visualizer::plotUpdate | ( | ) |
Update the graphics window based on current geometry, then continue the program.
Definition at line 942 of file VisualizerRendering.cpp.
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.
[in] | hide_window | If false, do not display the graphic window. |
Definition at line 946 of file VisualizerRendering.cpp.
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.
void Visualizer::printWindow | ( | const char * | outfile | ) | const |
Print the current graphics window to a JPEG image file.
[in] | outfile | Path to file where image should be saved. |
Definition at line 49 of file VisualizerRendering.cpp.
|
static |
Visualizer self-test routine.
Definition at line 373 of file selfTest.cpp.
void Visualizer::setBackgroundColor | ( | const helios::RGBcolor & | color | ) |
Set the background color for the visualizer window.
[in] | color | Background color |
Definition at line 600 of file VisualizerCore.cpp.
void Visualizer::setCameraFieldOfView | ( | float | angle_FOV | ) |
Set the camera field of view (angle width) in degrees. Default value is 45 degrees.
[in] | angle_FOV | Angle of camera field of view in degrees. |
Definition at line 581 of file VisualizerCore.cpp.
void Visualizer::setCameraPosition | ( | const helios::SphericalCoord & | cameraAngle, |
const helios::vec3 & | lookAt | ||
) |
Set camera position.
[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.
void Visualizer::setCameraPosition | ( | const helios::vec3 & | cameraPosition, |
const helios::vec3 & | lookAt | ||
) |
Set camera position.
[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.
void Visualizer::setColorbarFontColor | ( | helios::RGBcolor | color | ) |
Set the RGB color of the colorbar text.
[in] | color | Font color |
Definition at line 709 of file VisualizerCore.cpp.
void Visualizer::setColorbarFontSize | ( | uint | font_size | ) |
Set the font size of the colorbar text.
[in] | font_size | Font size |
Definition at line 702 of file VisualizerCore.cpp.
void Visualizer::setColorbarPosition | ( | helios::vec3 | position | ) |
Set the position of the colorbar in normalized window coordinates (0-1)
[in] | position | Position of the colorbar in normalized window coordinates |
Definition at line 647 of file VisualizerCore.cpp.
void Visualizer::setColorbarRange | ( | float | cmin, |
float | cmax | ||
) |
Set the range of the Colorbar.
[in] | cmin | Minimum value |
[out] | cmax | Maximum value |
Definition at line 661 of file VisualizerCore.cpp.
void Visualizer::setColorbarSize | ( | helios::vec2 | size | ) |
Set the size of the colorbar in normalized window units (0-1)
[in] | size | Size of the colorbar in normalized window units (0-1) |
Definition at line 654 of file VisualizerCore.cpp.
void Visualizer::setColorbarTicks | ( | const std::vector< float > & | ticks | ) |
Set the values in the colorbar where ticks and labels should be placed.
[in] | ticks | Vector of values corresponding to ticks |
Definition at line 670 of file VisualizerCore.cpp.
void Visualizer::setColorbarTitle | ( | const char * | title | ) |
Set the title of the Colorbar.
[in] | title | Colorbar title |
Definition at line 698 of file VisualizerCore.cpp.
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.
[in] | colors | Vector of colors defining control points on the colormap. |
[in] | divisions | Vector of values defining the normalized coordinates of each color control point on the colormap. |
Definition at line 733 of file VisualizerCore.cpp.
void Visualizer::setColormap | ( | Ctable | colormap_name | ) |
Set the colormap used in Colorbar/visualization based on pre-defined colormaps.
[in] | colormap_name | Name of a colormap. |
Definition at line 713 of file VisualizerCore.cpp.
void Visualizer::setLightDirection | ( | const helios::vec3 & | direction | ) |
Set the direction of the light source.
[in] | direction | Vector 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.
void Visualizer::setLightingModel | ( | LightingModel | lightingmodel | ) |
Set the lighting model for shading of all primitives.
[in] | lightingmodel | Lighting model to be used |
Definition at line 590 of file VisualizerCore.cpp.
void Visualizer::setLightIntensityFactor | ( | float | lightintensityfactor | ) |
Set the light intensity scaling factor.
[in] | lightintensityfactor | Scaling factor for light intensity. Default is 1.0 |
Definition at line 596 of file VisualizerCore.cpp.
void Visualizer::setPointCullingEnabled | ( | bool | enabled | ) |
Point cloud culling configuration methods.
Enable or disable point cloud culling optimization
[in] | enabled | True to enable culling, false to disable |
Definition at line 1779 of file VisualizerRendering.cpp.
void Visualizer::setPointCullingThreshold | ( | size_t | threshold | ) |
Set the minimum number of points required to trigger culling.
[in] | threshold | Point count threshold for enabling culling |
Definition at line 1783 of file VisualizerRendering.cpp.
void Visualizer::setPointLODFactor | ( | float | factor | ) |
Set the level-of-detail factor for distance-based culling.
[in] | factor | LOD factor (higher values = more aggressive culling) |
Definition at line 1791 of file VisualizerRendering.cpp.
void Visualizer::setPointMaxRenderDistance | ( | float | distance | ) |
Set the maximum rendering distance for points.
[in] | distance | Maximum distance in world units (0 = auto-calculate) |
Definition at line 1787 of file VisualizerRendering.cpp.
void Visualizer::showWatermark | ( | ) |
Make Helios logo watermark visible.
Definition at line 612 of file VisualizerCore.cpp.
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.
void Visualizer::updateWatermark | ( | ) |
Update watermark geometry to match current window size.
Definition at line 1435 of file VisualizerRendering.cpp.
|
friend |
Definition at line 1461 of file Visualizer.h.
|
friend |
Definition at line 1462 of file Visualizer.h.