70#ifndef DOXYGEN_SHOULD_SKIP_THIS
87 std::vector<cVoxelCoord> m_coords;
219 bool polygonize(
cMesh* a_mesh,
double a_gridSizeX = -1.0,
double a_gridSizeY = -1.0,
double a_gridSizeZ = -1.0);
222 bool polygonize(
cMultiMesh* a_multiMesh,
double a_gridSizeX = -1.0,
double a_gridSizeY = -1.0,
double a_gridSizeZ = -1.0);
235 bool fill(
unsigned int a_x,
unsigned int a_y,
unsigned int a_z,
cColorb& a_color,
double a_colorTolerance = 0.1);
Implements a class to model polygonal meshes.
Implements a 3D multi-mesh object.
This class implements a collision detection recorder that stores all collision events that are report...
Definition CCollisionBasics.h:186
This class implements a 3D polygonal mesh.
Definition CMesh.h:109
This class implements a 3D multi-mesh object.
Definition CMultiMesh.h:81
This class implements a 3D volumetric object composed of voxels.
Definition CVoxelObject.h:108
cVector3d m_edges[12][2]
List of edges.
Definition CVoxelObject.h:289
bool m_useColorMap
If true use color mapping.
Definition CVoxelObject.h:313
void setRenderingModeVoxelColorMap()
This method sets a basic voxel renderer with shader and colormap.
Definition CVoxelObject.cpp:197
cVoxelObject()
Constructor of cVoxelObject.
Definition CVoxelObject.cpp:84
float getVoxelOpacity()
This method returns the voxel opacity value.
Definition CVoxelObject.h:185
bool polygonize(cMesh *a_mesh, double a_gridSizeX=-1.0, double a_gridSizeY=-1.0, double a_gridSizeZ=-1.0)
This method converts this voxel object into a triangle mesh.
Definition CVoxelObject.cpp:1412
void setQuality(const double a_quality)
This method sets the quality level of the graphic rendering. This number ranges from 0....
Definition CVoxelObject.h:170
void setRenderingModeIsosurfaceMaterial()
This method sets an isosurface renderer using shader and material color.
Definition CVoxelObject.cpp:215
void setRenderingModeIsosurfaceColorMap()
This method sets an isosurface renderer using shader and colormap.
Definition CVoxelObject.cpp:280
float getIsosurfaceValue()
This method returns the isosurface value. This setting is used when isometric rendering is enabled.
Definition CVoxelObject.h:179
float getOpticalDensity()
This method returns the optical density factor.
Definition CVoxelObject.h:197
float m_voxelOpacity
Voxel opacity value.
Definition CVoxelObject.h:298
std::vector< cVoxelCoordList > m_voxelCoordList
List of points.
Definition CVoxelObject.h:316
cVector3d m_maxTextureCoord
Texture coordinate at point v111 (maximum corner).
Definition CVoxelObject.h:254
cVector3d m_minCorner
Corner with minimum position coordinate.
Definition CVoxelObject.h:245
void setRenderingModeCustom()
This method sets a custom shader renderer.
Definition CVoxelObject.cpp:322
cTexture1dPtr m_colorMap
Color Map. (Lookup table)
Definition CVoxelObject.h:257
cShaderProgramPtr m_programShaders[C_NUM_VOXEL_RENDERING_MODES]
Program shaders.
Definition CVoxelObject.h:335
virtual std::string getClassName()
This method returns the name of the object class.
Definition CVoxelObject.h:129
void setOpticalDensity(const float a_opticalDensity)
This method sets the optical density factor. This setting is used when the direct volume rendering mo...
Definition CVoxelObject.h:194
float m_opticalDensity
Optical density factor.
Definition CVoxelObject.h:304
void setRenderingModeIsosurfaceColors()
This method sets an isosurface renderer using shader and individual voxel colors.
Definition CVoxelObject.cpp:248
virtual ~cVoxelObject()
Destructor of cVoxelObject.
Definition CVoxelObject.cpp:151
bool getUseLinearInterpolation()
This method returns true if linear interpolation is enabled, false otherwise.
Definition CVoxelObject.h:203
virtual bool computeOtherCollisionDetection(cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
This method computes any collision between a segment and this object.
Definition CVoxelObject.cpp:1007
void setOpacityThreshold(const float a_opacityThreshold)
This method sets the opacity threshold. This value is the opacity accumulated along the ray before th...
Definition CVoxelObject.h:188
void setUseColorMap(const bool a_useColorMap)
This method enables or disables the use of the color look-up table.
Definition CVoxelObject.h:206
void setRenderingModeBasic()
This method sets the basic rendering mode without shader.
Definition CVoxelObject.cpp:161
bool getUseColorMap() const
This method returns true if the color look-up table is enabled, false otherwise.
Definition CVoxelObject.h:209
bool voxelize(cMesh *a_mesh, unsigned int a_largestSideInVoxels, cColorb &a_color)
This method creates a voxel model from a triangle mesh.
Definition CVoxelObject.cpp:1602
void setIsosurfaceValue(const float a_isosurfaceValue)
This method sets the isosurface value. Used when isometric rendering is enabled.
Definition CVoxelObject.h:176
int m_renderingMode
Rendering mode.
Definition CVoxelObject.h:307
void setUseLinearInterpolation(const bool a_useLinearInterpolation)
This method enables or disables linear interpolation.
Definition CVoxelObject.h:200
float m_opacityThreshold
Opacity threshold. This value is the opacity accumulated along the ray before the shader decides to s...
Definition CVoxelObject.h:301
double m_quality
Quality of the displayed graphical model.
Definition CVoxelObject.h:292
void setRenderingModeDVRColorMap()
This method sets a direct volume renderer.
Definition CVoxelObject.cpp:301
cShaderPtr m_vertexShaders[C_NUM_VOXEL_RENDERING_MODES]
Vertex shaders.
Definition CVoxelObject.h:329
bool m_flagShadersInitialized
Flag that indicates if shaders have been initialized.
Definition CVoxelObject.h:326
void update(cRenderOptions &a_options)
This method updates the mesh model.
Definition CVoxelObject.cpp:412
float m_isosurfaceValue
Isosurface value.
Definition CVoxelObject.h:295
cVector3d m_minTextureCoord
Texture coordinate at point v000 (minimum corner).
Definition CVoxelObject.h:251
void setRenderingModeVoxelColors()
This method sets a basic voxel renderer with shader.
Definition CVoxelObject.cpp:179
cVector3d m_maxCorner
Corner with maximum position coordinate.
Definition CVoxelObject.h:248
float getOpacityThreshold()
This method returns the opacity threshold.
Definition CVoxelObject.h:191
bool fill(unsigned int a_x, unsigned int a_y, unsigned int a_z, cColorb &a_color, double a_colorTolerance=0.1)
This method fills a voxel object at a given point, with a given color, and color tolerance in respect...
Definition CVoxelObject.cpp:1768
void setVoxelOpacity(const float a_voxelOpacity)
This method sets the voxel opacity value. This setting is used with basic voxel rendering mode.
Definition CVoxelObject.h:182
bool m_useLinearInterpolation
If true use linear interpolation, otherwise used nearest voxel.
Definition CVoxelObject.h:310
void loadRenderingShaders()
This method loads all rendering shaders.
Definition CVoxelObject.cpp:771
virtual void render(cRenderOptions &a_options)
This method renders the object graphically using OpenGL.
Definition CVoxelObject.cpp:342
double getQuality()
This method returns the quality level of the graphic rendering.
Definition CVoxelObject.h:173
cShaderPtr m_fragmentShaders[C_NUM_VOXEL_RENDERING_MODES]
Fragment shaders.
Definition CVoxelObject.h:332
Definition CAudioBuffer.cpp:57
T cClamp(const T &a_value, const T &a_low, const T &a_high)
This function clamps a value to a specified range.
Definition CMaths.h:387
std::shared_ptr< cShader > cShaderPtr
Definition CShader.h:110
const int C_NUM_VOXEL_RENDERING_MODES
Definition CVoxelObject.h:56
std::shared_ptr< cShaderProgram > cShaderProgramPtr
Definition CShaderProgram.h:71
std::shared_ptr< cTexture1d > cTexture1dPtr
Definition CTexture1d.h:68
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition CCollisionBasics.h:243
This class defines a color using a GLubyte representation for each component.
Definition CColor.h:1185
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition CRenderOptions.h:83
This class implements a 3D vector.
Definition CVector3d.h:89