gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
gVirtualXRay::LiverMesh Class Reference

LiverMesh is a class to handle a polygon mesh for a liver. It uses 3D texture for the bump map and 2D texture for the colour. More...

#include <LiverMesh.h>

Inheritance diagram for gVirtualXRay::LiverMesh:
Inheritance graph
Collaboration diagram for gVirtualXRay::LiverMesh:
Collaboration graph

Public Member Functions

 LiverMesh (bool optimize_texture_coordinates=true, unsigned int texture_2D_size=512, unsigned int texture_3D_size=32)
 Default Constructor. More...
 
virtual ~LiverMesh ()
 Destructor. More...
 
virtual bool isSoftTissue () const
 return true if the mesh represent a soft tissue More...
 
virtual void updateVBO (int aTypeOfVBO, int aTypeOfPrimitive)
 Update the VBO. More...
 
virtual void defineDisplayShaderInput (int aShaderID)
 Link the attributes to their id in the shader. More...
 
virtual void initialize ()
 initialize the shaders, the buffers, the normal vectors and the textures More...
 
virtual bool isTransparent () const
 return true if the mesh has to be displayed with transparency More...
 
virtual void splitFaces ()
 Split each face into four faces. More...
 
void splitFaces (bool aPrintDebugInfoFlag=false)
 Split each face into four faces. More...
 
virtual void copyFrom (const InternalOrganMesh &aPolygonMesh)
 
virtual void copyFrom (const AnatomicalMesh &aPolygonMesh)
 
virtual void copyFrom (const PolygonMesh &aPolygonMesh)
 Copy. More...
 
virtual const std::string & getLabel () const
 Accessor on the label that determines the type of the mesh. More...
 
void reset ()
 Reset the data. More...
 
void setDisplayFlag (bool display)
 Set if the mesh is displayed or not. More...
 
bool getDisplayFlag () const
 Accessor on the display flag of the polygon mesh. More...
 
void display ()
 Display the triangular mesh using OpenGL. More...
 
void displayWireFrame ()
 Display the triangular mesh in wireframe using OpenGL. More...
 
void displayFaceNormal (RATIONAL_NUMBER aNormalSize=0.5 *cm)
 Display the face normal vectors. More...
 
void displayVertexNormal (RATIONAL_NUMBER aNormalSize=0.5 *cm)
 Display the vertex normal vectors. More...
 
void setFilename (const char *aFilename)
 Set the name of the file that contains the polygon mesh. More...
 
void setFilename (const std::string &aFilename)
 Set the name of the file that contains the polygon mesh. More...
 
void setFileName (const char *aFilename)
 Set the name of the file that contains the polygon mesh. More...
 
void setFileName (const std::string &aFilename)
 Set the name of the file that contains the polygon mesh. More...
 
const std::string & getFilename () const
 Accessor on the name of the file that contains the polygon mesh. More...
 
const RATIONAL_NUMBERgetUnitOfLength () const
 Accessor on the unit of length of the mesh. More...
 
void loadSTLFile (bool aMoveToCentreFlag, bool anAutoComputeNormalFlag, bool aPrintDebugInfoFlag, bool aCreateVBOFlag, RATIONAL_NUMBER aScale, int aBufferUsageHing)
 Set the name of the file that contains the polygon mesh. More...
 
void writeSTLFile ()
 Write the STL file. More...
 
void moveToCentre ()
 Move the polygon to the centre. More...
 
void moveToCenter ()
 Move the polygon to the center. More...
 
void computeNormalVectors ()
 Compute the normal vectors using the cross product method. More...
 
bool useVBO (int aBufferUsageHing, int aTypeOfPrimitive)
 Use a vertex buffer object if possible. More...
 
void setHU (short HU)
 
void setHounsfieldUnit (short HU)
 
void setHounsfieldValue (short HU)
 
void setElement (unsigned short Z)
 
void setElement (const std::string &aName)
 
void setMixture (const Mixture &aMixture)
 
void setMixture (const std::map< int, double > &aMixture)
 
void setMixture (const std::map< std::string, double > &aMixture)
 
void setMixture (const std::string &aName)
 
void setCompound (const std::string &aName)
 
void setMassAttenuationCoefficient (double aCoefficient)
 
void setLinearAttenuationCoefficient (double aCoefficient)
 
void setDensity (double aDensity)
 
double getDensity ()
 
const std::string & getMaterialLabel () const
 
std::string getCompound () const
 Accessor on the compound description of the polygon mesh. More...
 
std::vector< int > getMixtureElementSet () const
 Accessor on the element Z number set of the mixture of the polygon mesh. More...
 
std::vector< double > getMixtureWeightSet () const
 Accessor on the element weight set of the mixture of the polygon mesh. More...
 
const PhotonCrossSectiongetPhotonCrossSection () const
 
const VEC3getLocalMinCorner () const
 Accessor on the bounding box lower corner. More...
 
const VEC3getLocalMaxCorner () const
 Accessor on the bounding box upper corner. More...
 
void applyTranslation (const VEC3 &aTranslationVector)
 
void applyScaling (RATIONAL_NUMBER x, RATIONAL_NUMBER y, RATIONAL_NUMBER z)
 
void applyRotation (const VEC3 &aRotationAxis, RATIONAL_NUMBER aRotationAngleInDegrees)
 
void applyTransform (const MATRIX4 &aTransformationMatrix)
 
unsigned int getFaceNumber () const
 Accessor on the number of faces. More...
 
unsigned int getTriangleNumber () const
 Accessor on the number of triangles. More...
 
unsigned int getFaceNormalNumber () const
 Accessor on the number of face normal vectors. More...
 
unsigned int getVertexNormalNumber () const
 Accessor on the number of vertex normal vectors. More...
 
unsigned int getVertexNumber () const
 Accessor on the number of vertices. More...
 
unsigned int getIndexNumber () const
 Accessor on the number of indices. More...
 
void mergeVertices (bool aPrintDebugInfoFlag=false)
 
VEC3 getVertex (unsigned int anIndex) const
 Accessor on a given vertex. More...
 
void setVertex (unsigned int anIndex, const VEC3 &aVertex)
 Change the value of a given vertex. More...
 
void setFaceNormal (unsigned int anIndex, const VEC3 &aNormalVector)
 
void setVertexNormal (unsigned int anIndex, const VEC3 &aNormalVector)
 
int getIndex (unsigned int anIndex) const
 Accessor on a given index. More...
 
void setIndex (unsigned int anIndex, unsigned int aValue)
 Set the value of a given index. More...
 
VEC3 getFaceNormal (unsigned int anIndex) const
 Accessor on a given face normal. More...
 
VEC3 getVertexNormal (unsigned int anIndex) const
 Accessor on a given vertex normal. More...
 
void setExternalData (int aTypeOfPrimitive, const void *aVertexArray, unsigned int aNumberOfVertices, int aVertexDataType, const void *anIndexArray, unsigned int aNumberOfIndices, int anIndexDataType, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setExternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setVBOData (const void *aVertexArray, unsigned int aNumberOfVertices, unsigned int aVertexVBO, unsigned int aNormalVBO, unsigned int aTextureVBO, unsigned int anIndexVBO, unsigned int aNumberOfIndices, int anIndexDataType, const void *aIndexArray=NULL, const void *aNormalArray=NULL)
 
void setInternalData (int aTypeOfPrimitive, const void *aVertexArray, unsigned int aNumberOfVertices, int aVertexDataType, const void *anIndexArray, unsigned int aNumberOfIndices, int anIndexDataType, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< float > *aNormalArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< double > *aNormalArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< float > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< float > *aNormalArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< double > *aNormalArray, const std::vector< unsigned char > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< double > *aNormalArray, const std::vector< unsigned short > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void setInternalData (int aTypeOfPrimitive, const std::vector< double > *aVertexArray, const std::vector< double > *aNormalArray, const std::vector< unsigned int > *anIndexArray, bool aCreateVBOFlag, int aTypeOfVBO)
 
void applyScale (const RATIONAL_NUMBER &aScale)
 
void applyScale (const RATIONAL_NUMBER &aScaleX, const RATIONAL_NUMBER &aScaleY, const RATIONAL_NUMBER &aScaleZ)
 
void invertNormalVectors ()
 Inverse the normal vectors. More...
 
virtual void updateVBOs (unsigned int aVertexVBO, unsigned int aNormalVBO, unsigned int aTextureVBO, unsigned int anIndexVBO)
 Update the VBOs with VBO already created. More...
 
const MaterialgetMaterial () const
 Accessor on the material of the polygon mesh. More...
 
MaterialgetMaterial ()
 Accessor on the material of the polygon mesh. More...
 
virtual PolygonMesh operator+ (const PolygonMesh &aPolygonMesh) const
 operator+. More...
 
virtual PolygonMesh operator+ (const VEC3 &aTranslationVector) const
 operator+. More...
 
virtual PolygonMesh operator- (const PolygonMesh &aPolygonMesh) const
 operator-. More...
 
virtual PolygonMesh operator- (const VEC3 &aTranslationVector) const
 operator-. More...
 
virtual PolygonMeshoperator+= (const PolygonMesh &aPolygonMesh)
 operator+=. More...
 
virtual PolygonMeshoperator+= (const VEC3 &aTranslationVector)
 operator+=. More...
 
virtual PolygonMeshoperator-= (const PolygonMesh &aPolygonMesh)
 operator-=. More...
 
virtual PolygonMeshoperator-= (const VEC3 &aTranslationVector)
 operator-=. More...
 
std::map< RATIONAL_NUMBER, VEC3rayIntersect (const VEC3 &aRayOrigin, const VEC3 &aRayDirection, const MATRIX4 &aTransformationMatrix) const
 
void getTriangleVertices (VEC3 &v0, VEC3 &v1, VEC3 &v2, unsigned int anIndex) const
 
bool hasNormalVectorsInverted () const
 Check if the normal vectors have been inverted. More...
 

Protected Types

enum  ToCreate { TO_CREATE_BUMP_MAP, TO_CREATE_COLOUR_TEXTURE }
 To know if a bump map or a colour texture has to be created. More...
 

Protected Member Functions

virtual void generateTextures ()
 generates the textures More...
 
virtual void defineBumpMapShaderInput (int shader_id)
 Link the attributes to their id in the shader bump map generation. More...
 
virtual void defineColourTextureShaderInput (int shader_id)
 
virtual void generate2DTexture (Shader const &shader, unsigned int &frame_buffer, ToCreate to_create)
 generates a 2D texture More...
 
virtual void generate3DTexture (Shader const &shader, unsigned int &frame_buffer, unsigned int &texture, ToCreate to_create)
 generates a 3D texture More...
 
virtual void initialize2DBuffer (unsigned int &aTexture, unsigned int &aFrameBuffer)
 initialize a 2D frame buffer and bind a texture to it More...
 
virtual void initialize3DBuffer (unsigned int &aTexture, unsigned int &aFrameBuffer, bool has_colours)
 initialize a 3D frame buffer and bind a texture to its layer 0 More...
 
virtual void load2DBumpShader ()
 Load the shader to create the 2D bump map. More...
 
virtual void load3DBumpShader ()
 Load the shader to create the 3D bump map. More...
 
virtual void initialize2DTextureCoordinates ()
 
virtual void initialize3DTextureCoordinates ()
 Initialise 3D texture coordinates. More...
 
virtual void shareNormalVectors ()
 Compute a normal vector per vertex for a smoother display. More...
 
virtual void deleteIndices ()
 delete the indices and calculate new normal vectors More...
 
virtual void initGradientTab ()
 initialize gradient tab for gnoise More...
 
virtual void initPermutation ()
 initialize permutation tab for all noises More...
 
void computeBoundingBox ()
 Update the bounding box. More...
 
void normaliseNormals ()
 Normalise the normal vectors. More...
 
void destroyVertexData ()
 Release the memory held by the vertex data if needed. More...
 
void destroyIndexData ()
 Release the memory held by the index data if needed. More...
 
void removeIndex (bool aPrintDebugInfoFlag=false)
 Remove the index. More...
 
void copyVertexSet (const void *apVertexSet)
 Copy a vertex set. More...
 
void copyIndexSet (const void *apIndexSet)
 Copy an index set. More...
 
void loadASCIISTLFile (bool aMoveToCentreFlag, bool anAutoComputeNormalFlag, bool aPrintDebugInfoFlag, bool aCreateVBOFlag, RATIONAL_NUMBER aScale, int aBufferUsageHing)
 Set the name of the file that contains the polygon mesh. More...
 
void loadBinarySTLFile (bool aMoveToCentreFlag, bool anAutoComputeNormalFlag, bool aPrintDebugInfoFlag, bool aCreateVBOFlag, RATIONAL_NUMBER aScale, int aBufferUsageHing)
 Set the name of the file that contains the polygon mesh. More...
 
void loadSTLDataFromBinaryStream (const char *apInputData, bool aMoveToCentreFlag, bool anAutoComputeNormalFlag, bool aPrintDebugInfoFlag, bool aCreateVBOFlag, RATIONAL_NUMBER aScale, int aBufferUsageHing)
 Set the name of the file that contains the polygon mesh. More...
 

Protected Attributes

unsigned int m_colour_texture
 
unsigned int m_colour_texture_frame_buffer
 
int m_use_3D_colour_texture
 
Shader m_colour_texture_shader
 
std::vector< VEC3m_gradient_tab
 
std::vector< int > m_permutation
 
std::vector< VEC2m_texture_coordinates_2d
 
std::vector< VEC3m_texture_coordinates_3d
 
std::vector< VEC2m_margin_direction
 
unsigned int m_bump_map_texture
 
unsigned int m_bump_map_frame_buffer
 
Shader m_bump_map_shader
 
int m_has_tendon
 
int m_is_lung
 
int m_has_thin_bumps
 
int m_use_3D_bump_map
 
unsigned int m_texture_size_2d
 
unsigned int m_texture_size_3d
 
bool m_need_initialize
 
bool m_generation_texture_coord_are_set
 
bool m_optimize_texture_coordinates
 
int m_use_texture
 1 if the mesh use texturing; default value is 0 More...
 
int m_use_bump_map
 1 if the mesh use bump mapping; default value is 0 More...
 
std::string m_label
 A label to determine the type of the mesh. More...
 
std::string m_filename
 Name of the file that contains the polygon mesh. More...
 
RATIONAL_NUMBER m_file_scale
 Unit of length of the file that contains the polygon mesh (if negative, then unknown) More...
 
std::auto_ptr< VBOm_p_vbo
 Vertex buffer object. More...
 
std::auto_ptr< PolygonMeshm_p_face_normal_vbo
 
std::auto_ptr< PolygonMeshm_p_vertex_normal_vbo
 
PhotonCrossSection m_photon_cross_section
 Material properties, with respect to X-ray. More...
 
VEC3 m_local_min_corner
 Lower corner of the bounding box. More...
 
VEC3 m_local_max_corner
 Upper corner of the bounding box. More...
 
std::vector< RATIONAL_NUMBERm_p_vertex_normal_set
 Array containing the normal vectors (one per triangle) More...
 
void * m_p_vertex_set
 Array containing the vertices. More...
 
void * m_p_index_set
 Array containing the index. More...
 
unsigned int m_number_of_indices
 Number of indices. More...
 
unsigned int m_number_of_vertices
 Number of vertices. More...
 
int m_index_data_type
 
int m_vertex_data_type
 
int m_polygon_type
 Polygon type; valid values are GL_TRIANGLES. More...
 
bool m_external_data_flag
 
bool m_display_flag
 
Material m_material
 Material of the object. More...
 
bool m_has_inverted_normal_vectors
 A flag set to true if the normal vectors are inverted. More...
 

Detailed Description

LiverMesh is a class to handle a polygon mesh for a liver. It uses 3D texture for the bump map and 2D texture for the colour.

Definition at line 78 of file LiverMesh.h.

Member Enumeration Documentation

◆ ToCreate

To know if a bump map or a colour texture has to be created.

Enumerator
TO_CREATE_BUMP_MAP 
TO_CREATE_COLOUR_TEXTURE 

Definition at line 151 of file InternalOrganMesh.h.

Constructor & Destructor Documentation

◆ LiverMesh()

gVirtualXRay::LiverMesh::LiverMesh ( bool  optimize_texture_coordinates = true,
unsigned int  texture_2D_size = 512,
unsigned int  texture_3D_size = 32 
)

Default Constructor.

◆ ~LiverMesh()

virtual gVirtualXRay::LiverMesh::~LiverMesh ( )
virtual

Destructor.

Member Function Documentation

◆ applyRotation()

void gVirtualXRay::PolygonMesh::applyRotation ( const VEC3 aRotationAxis,
RATIONAL_NUMBER  aRotationAngleInDegrees 
)
inlineinherited

Rotate the polygon mesh given a rotation axis and angle, and update the VBO if needed.

Parameters
aRotationAxisthe rotation axis
aRotationAngleInDegreesthe rotation angle in degrees

Definition at line 586 of file PolygonMesh.inl.

◆ applyScale() [1/2]

void gVirtualXRay::PolygonMesh::applyScale ( const RATIONAL_NUMBER aScale)
inlineinherited

Apply a scaling factor to the vertex data. Note that the bounding box will be automatically updated.

Parameters
aScalescaling factor

Definition at line 475 of file PolygonMesh.inl.

◆ applyScale() [2/2]

void gVirtualXRay::PolygonMesh::applyScale ( const RATIONAL_NUMBER aScaleX,
const RATIONAL_NUMBER aScaleY,
const RATIONAL_NUMBER aScaleZ 
)
inherited

Apply a scaling factor to the vertex data. Note that the bounding box will be automatically updated.

Parameters
aScaleXscaling factor alng the x-axis
aScaleYscaling factor alng the y-axis
aScaleZscaling factor alng the z-axis

◆ applyScaling()

void gVirtualXRay::PolygonMesh::applyScaling ( RATIONAL_NUMBER  x,
RATIONAL_NUMBER  y,
RATIONAL_NUMBER  z 
)
inlineinherited

Scale the polygon mesh given scaling factors, and update the VBO if needed.

Parameters
xthe scaling factor along the X-axis
ythe scaling factor along the Y-axis
zthe scaling factor along the Z-axis

Definition at line 516 of file PolygonMesh.inl.

◆ applyTransform()

void gVirtualXRay::PolygonMesh::applyTransform ( const MATRIX4 aTransformationMatrix)
inlineinherited

Transform the polygon mesh given a transformation matrix and update the VBO if needed.

Parameters
aTransformationMatrixthe transformation matrix

Definition at line 636 of file PolygonMesh.inl.

◆ applyTranslation()

void gVirtualXRay::PolygonMesh::applyTranslation ( const VEC3 aTranslationVector)
inlineinherited

Translate the polygon mesh given a translation vector, and update the VBO if needed.

Parameters
aTranslationVectorthe translation vector

Definition at line 483 of file PolygonMesh.inl.

◆ computeBoundingBox()

void gVirtualXRay::PolygonMesh::computeBoundingBox ( )
inlineprotectedinherited

Update the bounding box.

Definition at line 439 of file PolygonMesh.inl.

◆ computeNormalVectors()

void gVirtualXRay::PolygonMesh::computeNormalVectors ( )
inherited

Compute the normal vectors using the cross product method.

◆ copyFrom() [1/3]

virtual void gVirtualXRay::AnatomicalMesh::copyFrom ( const AnatomicalMesh aPolygonMesh)
virtualinherited

◆ copyFrom() [2/3]

virtual void gVirtualXRay::InternalOrganMesh::copyFrom ( const InternalOrganMesh aPolygonMesh)
virtualinherited

◆ copyFrom() [3/3]

virtual void gVirtualXRay::PolygonMesh::copyFrom ( const PolygonMesh aPolygonMesh)
virtualinherited

Copy.

Parameters
aPolygonMeshthe polygon mesh to copy

◆ copyIndexSet()

void gVirtualXRay::PolygonMesh::copyIndexSet ( const void *  apIndexSet)
protectedinherited

Copy an index set.

◆ copyVertexSet()

void gVirtualXRay::PolygonMesh::copyVertexSet ( const void *  apVertexSet)
protectedinherited

Copy a vertex set.

◆ defineBumpMapShaderInput()

virtual void gVirtualXRay::SoftTissueMesh::defineBumpMapShaderInput ( int  shader_id)
protectedvirtualinherited

Link the attributes to their id in the shader bump map generation.

Reimplemented from gVirtualXRay::InternalOrganMesh.

Reimplemented in gVirtualXRay::LungsMesh, and gVirtualXRay::DiaphragmMesh.

◆ defineColourTextureShaderInput()

virtual void gVirtualXRay::SoftTissueMesh::defineColourTextureShaderInput ( int  shader_id)
protectedvirtualinherited

Link the attributes to their id in the shader for colour texture generation

Implements gVirtualXRay::InternalOrganMesh.

Reimplemented in gVirtualXRay::LungsMesh, and gVirtualXRay::DiaphragmMesh.

◆ defineDisplayShaderInput()

virtual void gVirtualXRay::SoftTissueMesh::defineDisplayShaderInput ( int  aShaderID)
virtualinherited

Link the attributes to their id in the shader.

Reimplemented from gVirtualXRay::InternalOrganMesh.

◆ deleteIndices()

virtual void gVirtualXRay::InternalOrganMesh::deleteIndices ( )
protectedvirtualinherited

delete the indices and calculate new normal vectors

◆ destroyIndexData()

void gVirtualXRay::PolygonMesh::destroyIndexData ( )
protectedinherited

Release the memory held by the index data if needed.

◆ destroyVertexData()

void gVirtualXRay::PolygonMesh::destroyVertexData ( )
protectedinherited

Release the memory held by the vertex data if needed.

◆ display()

void gVirtualXRay::PolygonMesh::display ( )
inherited

Display the triangular mesh using OpenGL.

◆ displayFaceNormal()

void gVirtualXRay::PolygonMesh::displayFaceNormal ( RATIONAL_NUMBER  aNormalSize = 0.5 *cm)
inherited

Display the face normal vectors.

Parameters
aNormalSizethe size of the vectors (default value is 0.5 cm)

◆ displayVertexNormal()

void gVirtualXRay::PolygonMesh::displayVertexNormal ( RATIONAL_NUMBER  aNormalSize = 0.5 *cm)
inherited

Display the vertex normal vectors.

Parameters
aNormalSizethe size of the vectors (default value is 0.5 cm)

◆ displayWireFrame()

void gVirtualXRay::PolygonMesh::displayWireFrame ( )
inherited

Display the triangular mesh in wireframe using OpenGL.

◆ generate2DTexture()

virtual void gVirtualXRay::InternalOrganMesh::generate2DTexture ( Shader const &  shader,
unsigned int &  frame_buffer,
ToCreate  to_create 
)
protectedvirtualinherited

generates a 2D texture

◆ generate3DTexture()

virtual void gVirtualXRay::InternalOrganMesh::generate3DTexture ( Shader const &  shader,
unsigned int &  frame_buffer,
unsigned int &  texture,
ToCreate  to_create 
)
protectedvirtualinherited

generates a 3D texture

◆ generateTextures()

virtual void gVirtualXRay::SoftTissueMesh::generateTextures ( )
protectedvirtualinherited

generates the textures

Implements gVirtualXRay::InternalOrganMesh.

◆ getCompound()

std::string gVirtualXRay::PolygonMesh::getCompound ( ) const
inlineinherited

Accessor on the compound description of the polygon mesh.

Returns
if the sample is made of a compound, then return the description of the compound (e.g. H2O for water), otherwise return an empty string

Definition at line 290 of file PolygonMesh.inl.

◆ getDensity()

double gVirtualXRay::PolygonMesh::getDensity ( )
inlineinherited

Definition at line 274 of file PolygonMesh.inl.

◆ getDisplayFlag()

bool gVirtualXRay::PolygonMesh::getDisplayFlag ( ) const
inlineinherited

Accessor on the display flag of the polygon mesh.

Returns
display flag

Definition at line 99 of file PolygonMesh.inl.

◆ getFaceNormal()

VEC3 gVirtualXRay::PolygonMesh::getFaceNormal ( unsigned int  anIndex) const
inlineinherited

Accessor on a given face normal.

Parameters
anIndexthe index of the normal to access
Returns
the normal

Definition at line 377 of file PolygonMesh.inl.

◆ getFaceNormalNumber()

unsigned int gVirtualXRay::PolygonMesh::getFaceNormalNumber ( ) const
inlineinherited

Accessor on the number of face normal vectors.

Returns
the number of face normal vectors

Definition at line 340 of file PolygonMesh.inl.

◆ getFaceNumber()

unsigned int gVirtualXRay::PolygonMesh::getFaceNumber ( ) const
inherited

Accessor on the number of faces.

Returns
the number of faces

◆ getFilename()

const std::string & gVirtualXRay::PolygonMesh::getFilename ( ) const
inlineinherited

Accessor on the name of the file that contains the polygon mesh.

Returns
the file name

Definition at line 143 of file PolygonMesh.inl.

◆ getIndex()

int gVirtualXRay::PolygonMesh::getIndex ( unsigned int  anIndex) const
inherited

Accessor on a given index.

Parameters
anIndexthe index of the index to access
Returns
the index

◆ getIndexNumber()

unsigned int gVirtualXRay::PolygonMesh::getIndexNumber ( ) const
inlineinherited

Accessor on the number of indices.

Returns
the number of indices

Definition at line 369 of file PolygonMesh.inl.

◆ getLabel()

virtual const std::string& gVirtualXRay::AnatomicalMesh::getLabel ( ) const
virtualinherited

Accessor on the label that determines the type of the mesh.

◆ getLocalMaxCorner()

const VEC3 & gVirtualXRay::PolygonMesh::getLocalMaxCorner ( ) const
inlineinherited

Accessor on the bounding box upper corner.

Returns
the bounding box upper corner

Definition at line 331 of file PolygonMesh.inl.

◆ getLocalMinCorner()

const VEC3 & gVirtualXRay::PolygonMesh::getLocalMinCorner ( ) const
inlineinherited

Accessor on the bounding box lower corner.

Returns
the bounding box lower corner

Definition at line 322 of file PolygonMesh.inl.

◆ getMaterial() [1/2]

const Material & gVirtualXRay::PolygonMesh::getMaterial ( ) const
inlineinherited

Accessor on the material of the polygon mesh.

Returns
the material

Definition at line 762 of file PolygonMesh.inl.

◆ getMaterial() [2/2]

Material & gVirtualXRay::PolygonMesh::getMaterial ( )
inlineinherited

Accessor on the material of the polygon mesh.

Returns
the material

Definition at line 770 of file PolygonMesh.inl.

◆ getMaterialLabel()

const std::string & gVirtualXRay::PolygonMesh::getMaterialLabel ( ) const
inlineinherited

Definition at line 282 of file PolygonMesh.inl.

◆ getMixtureElementSet()

std::vector< int > gVirtualXRay::PolygonMesh::getMixtureElementSet ( ) const
inlineinherited

Accessor on the element Z number set of the mixture of the polygon mesh.

Returns
if the sample is made of a mixture, then return the element Z number set of the mixture, otherwise return an empty vector

Definition at line 298 of file PolygonMesh.inl.

◆ getMixtureWeightSet()

std::vector< double > gVirtualXRay::PolygonMesh::getMixtureWeightSet ( ) const
inlineinherited

Accessor on the element weight set of the mixture of the polygon mesh.

Returns
if the sample is made of a mixture, then return the element weight set of the mixture, otherwise return an empty vector

Definition at line 306 of file PolygonMesh.inl.

◆ getPhotonCrossSection()

const PhotonCrossSection & gVirtualXRay::PolygonMesh::getPhotonCrossSection ( ) const
inlineinherited

Definition at line 267 of file PolygonMesh.inl.

◆ getTriangleNumber()

unsigned int gVirtualXRay::PolygonMesh::getTriangleNumber ( ) const
inherited

Accessor on the number of triangles.

Returns
the number of triangles

◆ getTriangleVertices()

void gVirtualXRay::PolygonMesh::getTriangleVertices ( VEC3 v0,
VEC3 v1,
VEC3 v2,
unsigned int  anIndex 
) const
inherited

◆ getUnitOfLength()

const RATIONAL_NUMBER & gVirtualXRay::PolygonMesh::getUnitOfLength ( ) const
inlineinherited

Accessor on the unit of length of the mesh.

Returns
the unit of length

Definition at line 152 of file PolygonMesh.inl.

◆ getVertex()

VEC3 gVirtualXRay::PolygonMesh::getVertex ( unsigned int  anIndex) const
inherited

Accessor on a given vertex.

Parameters
anIndexthe index of the vertex to access
Returns
the vertex

◆ getVertexNormal()

VEC3 gVirtualXRay::PolygonMesh::getVertexNormal ( unsigned int  anIndex) const
inlineinherited

Accessor on a given vertex normal.

Parameters
anIndexthe index of the normal to access
Returns
the normal

Definition at line 424 of file PolygonMesh.inl.

◆ getVertexNormalNumber()

unsigned int gVirtualXRay::PolygonMesh::getVertexNormalNumber ( ) const
inlineinherited

Accessor on the number of vertex normal vectors.

Returns
the number of vertex normal vectors

Definition at line 351 of file PolygonMesh.inl.

◆ getVertexNumber()

unsigned int gVirtualXRay::PolygonMesh::getVertexNumber ( ) const
inlineinherited

Accessor on the number of vertices.

Returns
the number of vertices

Definition at line 361 of file PolygonMesh.inl.

◆ hasNormalVectorsInverted()

bool gVirtualXRay::PolygonMesh::hasNormalVectorsInverted ( ) const
inlineinherited

Check if the normal vectors have been inverted.

Returns
true if the normal vectors have been inverted; false otherwise.

Definition at line 314 of file PolygonMesh.inl.

◆ initGradientTab()

virtual void gVirtualXRay::InternalOrganMesh::initGradientTab ( )
protectedvirtualinherited

initialize gradient tab for gnoise

◆ initialize()

virtual void gVirtualXRay::SoftTissueMesh::initialize ( )
virtualinherited

initialize the shaders, the buffers, the normal vectors and the textures

Implements gVirtualXRay::InternalOrganMesh.

◆ initialize2DBuffer()

virtual void gVirtualXRay::InternalOrganMesh::initialize2DBuffer ( unsigned int &  aTexture,
unsigned int &  aFrameBuffer 
)
protectedvirtualinherited

initialize a 2D frame buffer and bind a texture to it

◆ initialize2DTextureCoordinates()

virtual void gVirtualXRay::InternalOrganMesh::initialize2DTextureCoordinates ( )
protectedvirtualinherited

Initialise optimised texture coordinates by sharing an hypothenuse in the texture for two adjacent polygons.

◆ initialize3DBuffer()

virtual void gVirtualXRay::InternalOrganMesh::initialize3DBuffer ( unsigned int &  aTexture,
unsigned int &  aFrameBuffer,
bool  has_colours 
)
protectedvirtualinherited

initialize a 3D frame buffer and bind a texture to its layer 0

◆ initialize3DTextureCoordinates()

virtual void gVirtualXRay::InternalOrganMesh::initialize3DTextureCoordinates ( )
protectedvirtualinherited

Initialise 3D texture coordinates.

◆ initPermutation()

virtual void gVirtualXRay::InternalOrganMesh::initPermutation ( )
protectedvirtualinherited

initialize permutation tab for all noises

◆ invertNormalVectors()

void gVirtualXRay::PolygonMesh::invertNormalVectors ( )
inlineinherited

Inverse the normal vectors.

Definition at line 694 of file PolygonMesh.inl.

◆ isSoftTissue()

virtual bool gVirtualXRay::SoftTissueMesh::isSoftTissue ( ) const
virtualinherited

return true if the mesh represent a soft tissue

Implements gVirtualXRay::InternalOrganMesh.

◆ isTransparent()

virtual bool gVirtualXRay::InternalOrganMesh::isTransparent ( ) const
virtualinherited

return true if the mesh has to be displayed with transparency

Implements gVirtualXRay::AnatomicalMesh.

◆ load2DBumpShader()

virtual void gVirtualXRay::InternalOrganMesh::load2DBumpShader ( )
protectedvirtualinherited

Load the shader to create the 2D bump map.

◆ load3DBumpShader()

virtual void gVirtualXRay::InternalOrganMesh::load3DBumpShader ( )
protectedvirtualinherited

Load the shader to create the 3D bump map.

◆ loadASCIISTLFile()

void gVirtualXRay::PolygonMesh::loadASCIISTLFile ( bool  aMoveToCentreFlag,
bool  anAutoComputeNormalFlag,
bool  aPrintDebugInfoFlag,
bool  aCreateVBOFlag,
RATIONAL_NUMBER  aScale,
int  aBufferUsageHing 
)
protectedinherited

Set the name of the file that contains the polygon mesh.

Parameters
aMoveToCentreFlaga flag to move the polygon to the center or not
anAutoComputeNormalFlaga flag to compute normals or not
aPrintDebugInfoFlaga flag to display additional debug information in the console or not
aCreateVBOFlaga flag to use a vertex buffer object or not
aScalethe unit in which data is stored in the file (e.g. mm, cm, m)
aBufferUsageHingthe buffer usage hint; valid values are: GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ loadBinarySTLFile()

void gVirtualXRay::PolygonMesh::loadBinarySTLFile ( bool  aMoveToCentreFlag,
bool  anAutoComputeNormalFlag,
bool  aPrintDebugInfoFlag,
bool  aCreateVBOFlag,
RATIONAL_NUMBER  aScale,
int  aBufferUsageHing 
)
protectedinherited

Set the name of the file that contains the polygon mesh.

Parameters
aMoveToCentreFlaga flag to move the polygon to the center or not
anAutoComputeNormalFlaga flag to compute normals or not
aPrintDebugInfoFlaga flag to display additional debug information in the console or not
aCreateVBOFlaga flag to use a vertex buffer object or not
aScalethe unit in which data is stored in the file (e.g. mm, cm, m)
aBufferUsageHingthe buffer usage hint; valid values are: GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ loadSTLDataFromBinaryStream()

void gVirtualXRay::PolygonMesh::loadSTLDataFromBinaryStream ( const char *  apInputData,
bool  aMoveToCentreFlag,
bool  anAutoComputeNormalFlag,
bool  aPrintDebugInfoFlag,
bool  aCreateVBOFlag,
RATIONAL_NUMBER  aScale,
int  aBufferUsageHing 
)
protectedinherited

Set the name of the file that contains the polygon mesh.

Parameters
apInputDatathe input data to load
aMoveToCentreFlaga flag to move the polygon to the centre or not
anAutoComputeNormalFlaga flag to compute normals or nor
aPrintDebugInfoFlaga flag to display additional debug information in the console or not
aCreateVBOFlaga flag to use a vertex buffer object or not
aScalethe unit in which data is stored in the file (e.g. mm, cm, m)
aBufferUsageHingthe buffer usage hint; valid values are: GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ loadSTLFile()

void gVirtualXRay::PolygonMesh::loadSTLFile ( bool  aMoveToCentreFlag,
bool  anAutoComputeNormalFlag,
bool  aPrintDebugInfoFlag,
bool  aCreateVBOFlag,
RATIONAL_NUMBER  aScale,
int  aBufferUsageHing 
)
inherited

Set the name of the file that contains the polygon mesh.

Parameters
aMoveToCentreFlaga flag to move the polygon to the center or not
anAutoComputeNormalFlaga flag to compute normals or not
aPrintDebugInfoFlaga flag to display additional debug information in the console or not
aCreateVBOFlaga flag to use a vertex buffer object or not
aScalethe unit in which data is stored in the file (e.g. mm, cm, m)
aBufferUsageHingthe buffer usage hint; valid values are: GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ mergeVertices()

void gVirtualXRay::PolygonMesh::mergeVertices ( bool  aPrintDebugInfoFlag = false)
inherited

Merge the vertices of the mesh if the data is managed by the class instance, and if no index has been build.

◆ moveToCenter()

void gVirtualXRay::PolygonMesh::moveToCenter ( )
inlineinherited

Move the polygon to the center.

Definition at line 160 of file PolygonMesh.inl.

◆ moveToCentre()

void gVirtualXRay::PolygonMesh::moveToCentre ( )
inlineinherited

Move the polygon to the centre.

Definition at line 683 of file PolygonMesh.inl.

◆ normaliseNormals()

void gVirtualXRay::PolygonMesh::normaliseNormals ( )
protectedinherited

Normalise the normal vectors.

◆ operator+() [1/2]

virtual PolygonMesh gVirtualXRay::PolygonMesh::operator+ ( const PolygonMesh aPolygonMesh) const
virtualinherited

operator+.

Parameters
aPolygonMeshthe polygon mesh to add
Returns
the new PolygonMesh

◆ operator+() [2/2]

virtual PolygonMesh gVirtualXRay::PolygonMesh::operator+ ( const VEC3 aTranslationVector) const
virtualinherited

operator+.

Parameters
aTranslationVectorthe translation vector
Returns
the new PolygonMesh

◆ operator+=() [1/2]

virtual PolygonMesh& gVirtualXRay::PolygonMesh::operator+= ( const PolygonMesh aPolygonMesh)
virtualinherited

operator+=.

Parameters
aPolygonMeshthe polygon mesh to add
Returns
the new PolygonMesh

◆ operator+=() [2/2]

virtual PolygonMesh& gVirtualXRay::PolygonMesh::operator+= ( const VEC3 aTranslationVector)
virtualinherited

operator+=.

Parameters
aTranslationVectorthe translation vector
Returns
the new PolygonMesh

◆ operator-() [1/2]

virtual PolygonMesh gVirtualXRay::PolygonMesh::operator- ( const PolygonMesh aPolygonMesh) const
virtualinherited

operator-.

Parameters
aPolygonMeshthe polygon mesh to remove
Returns
the new PolygonMesh

◆ operator-() [2/2]

virtual PolygonMesh gVirtualXRay::PolygonMesh::operator- ( const VEC3 aTranslationVector) const
virtualinherited

operator-.

Parameters
aTranslationVectorthe translation vector
Returns
the new PolygonMesh

◆ operator-=() [1/2]

virtual PolygonMesh& gVirtualXRay::PolygonMesh::operator-= ( const PolygonMesh aPolygonMesh)
virtualinherited

operator-=.

Parameters
aPolygonMeshthe polygon mesh to remove
Returns
the new PolygonMesh

◆ operator-=() [2/2]

virtual PolygonMesh& gVirtualXRay::PolygonMesh::operator-= ( const VEC3 aTranslationVector)
virtualinherited

operator-=.

Parameters
aTranslationVectorthe translation vector
Returns
the new PolygonMesh

◆ rayIntersect()

std::map<RATIONAL_NUMBER, VEC3> gVirtualXRay::PolygonMesh::rayIntersect ( const VEC3 aRayOrigin,
const VEC3 aRayDirection,
const MATRIX4 aTransformationMatrix 
) const
inherited

◆ removeIndex()

void gVirtualXRay::PolygonMesh::removeIndex ( bool  aPrintDebugInfoFlag = false)
protectedinherited

Remove the index.

◆ reset()

void gVirtualXRay::PolygonMesh::reset ( )
inherited

Reset the data.

◆ setCompound()

void gVirtualXRay::PolygonMesh::setCompound ( const std::string &  aName)
inlineinherited

Definition at line 243 of file PolygonMesh.inl.

◆ setDensity()

void gVirtualXRay::PolygonMesh::setDensity ( double  aDensity)
inlineinherited

Definition at line 261 of file PolygonMesh.inl.

◆ setDisplayFlag()

void gVirtualXRay::PolygonMesh::setDisplayFlag ( bool  display)
inlineinherited

Set if the mesh is displayed or not.

Parameters
displaytrue or false

Definition at line 91 of file PolygonMesh.inl.

◆ setElement() [1/2]

void gVirtualXRay::PolygonMesh::setElement ( unsigned short  Z)
inlineinherited

Definition at line 207 of file PolygonMesh.inl.

◆ setElement() [2/2]

void gVirtualXRay::PolygonMesh::setElement ( const std::string &  aName)
inlineinherited

Definition at line 213 of file PolygonMesh.inl.

◆ setExternalData() [1/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const void *  aVertexArray,
unsigned int  aNumberOfVertices,
int  aVertexDataType,
const void *  anIndexArray,
unsigned int  aNumberOfIndices,
int  anIndexDataType,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNumberOfVerticesnumber of vertices
aVertexDataTypedata type of the vertex data; valid values are GL_FLOAT, GL_DOUBLE and GL_NONE
anIndexArrayarray containing the index data
aNumberOfIndicesnumber of indices
anIndexDataTypedata type of the index data; valid values are GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE and GL_NONE
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [2/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [3/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [4/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [5/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [6/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [7/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [8/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setExternalData() [9/9]

void gVirtualXRay::PolygonMesh::setExternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will not manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setFaceNormal()

void gVirtualXRay::PolygonMesh::setFaceNormal ( unsigned int  anIndex,
const VEC3 aNormalVector 
)
inlineinherited

Definition at line 552 of file PolygonMesh.inl.

◆ setFilename() [1/2]

void gVirtualXRay::PolygonMesh::setFilename ( const char *  aFilename)
inlineinherited

Set the name of the file that contains the polygon mesh.

Parameters
aFilenamethe file name

Definition at line 107 of file PolygonMesh.inl.

◆ setFilename() [2/2]

void gVirtualXRay::PolygonMesh::setFilename ( const std::string &  aFilename)
inlineinherited

Set the name of the file that contains the polygon mesh.

Parameters
aFilenamethe file name

Definition at line 116 of file PolygonMesh.inl.

◆ setFileName() [1/2]

void gVirtualXRay::PolygonMesh::setFileName ( const char *  aFilename)
inlineinherited

Set the name of the file that contains the polygon mesh.

Parameters
aFilenamethe file name

Definition at line 125 of file PolygonMesh.inl.

◆ setFileName() [2/2]

void gVirtualXRay::PolygonMesh::setFileName ( const std::string &  aFilename)
inlineinherited

Set the name of the file that contains the polygon mesh.

Parameters
aFilenamethe file name

Definition at line 134 of file PolygonMesh.inl.

◆ setHounsfieldUnit()

void gVirtualXRay::PolygonMesh::setHounsfieldUnit ( short  HU)
inlineinherited

Definition at line 195 of file PolygonMesh.inl.

◆ setHounsfieldValue()

void gVirtualXRay::PolygonMesh::setHounsfieldValue ( short  HU)
inlineinherited

Definition at line 201 of file PolygonMesh.inl.

◆ setHU()

void gVirtualXRay::PolygonMesh::setHU ( short  HU)
inlineinherited

Definition at line 189 of file PolygonMesh.inl.

◆ setIndex()

void gVirtualXRay::PolygonMesh::setIndex ( unsigned int  anIndex,
unsigned int  aValue 
)
inherited

Set the value of a given index.

Parameters
anIndexthe index of the index to access
aValuethe new value of the index

◆ setInternalData() [1/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const void *  aVertexArray,
unsigned int  aNumberOfVertices,
int  aVertexDataType,
const void *  anIndexArray,
unsigned int  aNumberOfIndices,
int  anIndexDataType,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNumberOfVerticesnumber of vertices
aVertexDataTypedata type of the vertex data; valid values are GL_FLOAT, GL_DOUBLE and GL_NONE
anIndexArrayarray containing the index data
aNumberOfIndicesnumber of indices
anIndexDataTypedata type of the index data; valid values are GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE and GL_NONE
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [2/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< float > *  aNormalArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [3/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [4/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< double > *  aNormalArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [5/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [6/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [7/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

◆ setInternalData() [8/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [9/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [10/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [11/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [12/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [13/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [14/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [15/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< float > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [16/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [17/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< float > *  aNormalArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [18/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< double > *  aNormalArray,
const std::vector< unsigned char > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [19/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< double > *  aNormalArray,
const std::vector< unsigned short > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setInternalData() [20/20]

void gVirtualXRay::PolygonMesh::setInternalData ( int  aTypeOfPrimitive,
const std::vector< double > *  aVertexArray,
const std::vector< double > *  aNormalArray,
const std::vector< unsigned int > *  anIndexArray,
bool  aCreateVBOFlag,
int  aTypeOfVBO 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
aVertexArrayarray containing the vertex data
aNormalArrayarray containing the normal data
anIndexArrayarray containing the index data
aCreateVBOFlagflag set to true to create a VBO, set to false to not set a VBO
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW

◆ setLinearAttenuationCoefficient()

void gVirtualXRay::PolygonMesh::setLinearAttenuationCoefficient ( double  aCoefficient)
inlineinherited

Definition at line 255 of file PolygonMesh.inl.

◆ setMassAttenuationCoefficient()

void gVirtualXRay::PolygonMesh::setMassAttenuationCoefficient ( double  aCoefficient)
inlineinherited

Definition at line 249 of file PolygonMesh.inl.

◆ setMixture() [1/4]

void gVirtualXRay::PolygonMesh::setMixture ( const Mixture aMixture)
inlineinherited

Definition at line 219 of file PolygonMesh.inl.

◆ setMixture() [2/4]

void gVirtualXRay::PolygonMesh::setMixture ( const std::map< int, double > &  aMixture)
inlineinherited

Definition at line 225 of file PolygonMesh.inl.

◆ setMixture() [3/4]

void gVirtualXRay::PolygonMesh::setMixture ( const std::map< std::string, double > &  aMixture)
inlineinherited

Definition at line 231 of file PolygonMesh.inl.

◆ setMixture() [4/4]

void gVirtualXRay::PolygonMesh::setMixture ( const std::string &  aName)
inlineinherited

Definition at line 237 of file PolygonMesh.inl.

◆ setVBOData()

void gVirtualXRay::PolygonMesh::setVBOData ( const void *  aVertexArray,
unsigned int  aNumberOfVertices,
unsigned int  aVertexVBO,
unsigned int  aNormalVBO,
unsigned int  aTextureVBO,
unsigned int  anIndexVBO,
unsigned int  aNumberOfIndices,
int  anIndexDataType,
const void *  aIndexArray = NULL,
const void *  aNormalArray = NULL 
)
inherited

Set the polygon mesh using external data. The class instance will manage the memory.

Parameters
aVertexArrayarray containing the vertex data
aNumberOfVerticesnumber of vertices
aVertexVBOidentificator of vbo for vertices
aNormalVBOidentificator of vbo for normals
aTextureVBOidentificator of vbo for texture coords
anIndexVBOarray containing the index data
aNumberOfIndicesnumber of indices
anIndexDataTypedata type of the index data; valid values are GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE and GL_NONE
aIndexArrayarray containing the index data
aNormalArrayarray containing the normal data

◆ setVertex()

void gVirtualXRay::PolygonMesh::setVertex ( unsigned int  anIndex,
const VEC3 aVertex 
)
inherited

Change the value of a given vertex.

Parameters
anIndexthe index of the vertex to access
aVertexthe new value of the vertex

◆ setVertexNormal()

void gVirtualXRay::PolygonMesh::setVertexNormal ( unsigned int  anIndex,
const VEC3 aNormalVector 
)
inlineinherited

Definition at line 570 of file PolygonMesh.inl.

◆ shareNormalVectors()

virtual void gVirtualXRay::InternalOrganMesh::shareNormalVectors ( )
protectedvirtualinherited

Compute a normal vector per vertex for a smoother display.

◆ splitFaces() [1/2]

virtual void gVirtualXRay::InternalOrganMesh::splitFaces ( )
virtualinherited

Split each face into four faces.

◆ splitFaces() [2/2]

void gVirtualXRay::PolygonMesh::splitFaces ( bool  aPrintDebugInfoFlag = false)
inherited

Split each face into four faces.

◆ updateVBO()

virtual void gVirtualXRay::SoftTissueMesh::updateVBO ( int  aTypeOfVBO,
int  aTypeOfPrimitive 
)
virtualinherited

Update the VBO.

Parameters
aTypeOfVBOVBO usage hint to set; valid values are GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES

Reimplemented from gVirtualXRay::PolygonMesh.

◆ updateVBOs()

virtual void gVirtualXRay::PolygonMesh::updateVBOs ( unsigned int  aVertexVBO,
unsigned int  aNormalVBO,
unsigned int  aTextureVBO,
unsigned int  anIndexVBO 
)
virtualinherited

Update the VBOs with VBO already created.

Parameters
aVertexVBOidentificator of vbo for vertices
aNormalVBOidentificator of vbo for normals
aTextureVBOidentificator of vbo for texture coords
anIndexVBOarray containing the index data

◆ useVBO()

bool gVirtualXRay::PolygonMesh::useVBO ( int  aBufferUsageHing,
int  aTypeOfPrimitive 
)
inlineinherited

Use a vertex buffer object if possible.

Parameters
aBufferUsageHingthe buffer usage hint; valid values are: GL_STATIC_DRAW, GL_DYNAMIC_DRAW and GL_STREAM_DRAW
aTypeOfPrimitivetype of primitive; valid values are GL_TRIANGLES
Returns
true if the VBO can be used, false otherwise

Definition at line 168 of file PolygonMesh.inl.

◆ writeSTLFile()

void gVirtualXRay::PolygonMesh::writeSTLFile ( )
inherited

Write the STL file.

Field Documentation

◆ m_bump_map_frame_buffer

unsigned int gVirtualXRay::InternalOrganMesh::m_bump_map_frame_buffer
protectedinherited

Definition at line 308 of file InternalOrganMesh.h.

◆ m_bump_map_shader

Shader gVirtualXRay::InternalOrganMesh::m_bump_map_shader
protectedinherited

Definition at line 312 of file InternalOrganMesh.h.

◆ m_bump_map_texture

unsigned int gVirtualXRay::InternalOrganMesh::m_bump_map_texture
protectedinherited

Definition at line 305 of file InternalOrganMesh.h.

◆ m_colour_texture

unsigned int gVirtualXRay::SoftTissueMesh::m_colour_texture
protectedinherited

Definition at line 165 of file SoftTissueMesh.h.

◆ m_colour_texture_frame_buffer

unsigned int gVirtualXRay::SoftTissueMesh::m_colour_texture_frame_buffer
protectedinherited

Definition at line 168 of file SoftTissueMesh.h.

◆ m_colour_texture_shader

Shader gVirtualXRay::SoftTissueMesh::m_colour_texture_shader
protectedinherited

Definition at line 176 of file SoftTissueMesh.h.

◆ m_display_flag

bool gVirtualXRay::PolygonMesh::m_display_flag
protectedinherited

A flag set to true if you want to display in the Xray image

Definition at line 1626 of file PolygonMesh.h.

◆ m_external_data_flag

bool gVirtualXRay::PolygonMesh::m_external_data_flag
protectedinherited

A flag set to true if the memory is managed outside of this class instance; set to false if the memory is managed by this class instance

Definition at line 1621 of file PolygonMesh.h.

◆ m_file_scale

RATIONAL_NUMBER gVirtualXRay::PolygonMesh::m_file_scale
protectedinherited

Unit of length of the file that contains the polygon mesh (if negative, then unknown)

Definition at line 1553 of file PolygonMesh.h.

◆ m_filename

std::string gVirtualXRay::PolygonMesh::m_filename
protectedinherited

Name of the file that contains the polygon mesh.

Definition at line 1549 of file PolygonMesh.h.

◆ m_generation_texture_coord_are_set

bool gVirtualXRay::InternalOrganMesh::m_generation_texture_coord_are_set
protectedinherited

Definition at line 346 of file InternalOrganMesh.h.

◆ m_gradient_tab

std::vector<VEC3> gVirtualXRay::InternalOrganMesh::m_gradient_tab
protectedinherited

Definition at line 285 of file InternalOrganMesh.h.

◆ m_has_inverted_normal_vectors

bool gVirtualXRay::PolygonMesh::m_has_inverted_normal_vectors
protectedinherited

A flag set to true if the normal vectors are inverted.

Definition at line 1634 of file PolygonMesh.h.

◆ m_has_tendon

int gVirtualXRay::InternalOrganMesh::m_has_tendon
protectedinherited

Definition at line 317 of file InternalOrganMesh.h.

◆ m_has_thin_bumps

int gVirtualXRay::InternalOrganMesh::m_has_thin_bumps
protectedinherited

Definition at line 327 of file InternalOrganMesh.h.

◆ m_index_data_type

int gVirtualXRay::PolygonMesh::m_index_data_type
protectedinherited

Data type of the index data; valid values are GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE and GL_NONE

Definition at line 1606 of file PolygonMesh.h.

◆ m_is_lung

int gVirtualXRay::InternalOrganMesh::m_is_lung
protectedinherited

Definition at line 322 of file InternalOrganMesh.h.

◆ m_label

std::string gVirtualXRay::AnatomicalMesh::m_label
protectedinherited

A label to determine the type of the mesh.

Definition at line 153 of file AnatomicalMesh.h.

◆ m_local_max_corner

VEC3 gVirtualXRay::PolygonMesh::m_local_max_corner
protectedinherited

Upper corner of the bounding box.

Definition at line 1577 of file PolygonMesh.h.

◆ m_local_min_corner

VEC3 gVirtualXRay::PolygonMesh::m_local_min_corner
protectedinherited

Lower corner of the bounding box.

Definition at line 1573 of file PolygonMesh.h.

◆ m_margin_direction

std::vector<VEC2> gVirtualXRay::InternalOrganMesh::m_margin_direction
protectedinherited

Definition at line 301 of file InternalOrganMesh.h.

◆ m_material

Material gVirtualXRay::PolygonMesh::m_material
protectedinherited

Material of the object.

Definition at line 1630 of file PolygonMesh.h.

◆ m_need_initialize

bool gVirtualXRay::InternalOrganMesh::m_need_initialize
protectedinherited

Definition at line 342 of file InternalOrganMesh.h.

◆ m_number_of_indices

unsigned int gVirtualXRay::PolygonMesh::m_number_of_indices
protectedinherited

Number of indices.

Definition at line 1597 of file PolygonMesh.h.

◆ m_number_of_vertices

unsigned int gVirtualXRay::PolygonMesh::m_number_of_vertices
protectedinherited

Number of vertices.

Definition at line 1601 of file PolygonMesh.h.

◆ m_optimize_texture_coordinates

bool gVirtualXRay::InternalOrganMesh::m_optimize_texture_coordinates
protectedinherited

Definition at line 350 of file InternalOrganMesh.h.

◆ m_p_face_normal_vbo

std::auto_ptr<PolygonMesh> gVirtualXRay::PolygonMesh::m_p_face_normal_vbo
protectedinherited

Definition at line 1559 of file PolygonMesh.h.

◆ m_p_index_set

void* gVirtualXRay::PolygonMesh::m_p_index_set
protectedinherited

Array containing the index.

Definition at line 1593 of file PolygonMesh.h.

◆ m_p_vbo

std::auto_ptr<VBO> gVirtualXRay::PolygonMesh::m_p_vbo
protectedinherited

Vertex buffer object.

Definition at line 1558 of file PolygonMesh.h.

◆ m_p_vertex_normal_set

std::vector<RATIONAL_NUMBER> gVirtualXRay::PolygonMesh::m_p_vertex_normal_set
protectedinherited

Array containing the normal vectors (one per triangle)

Array containing the normal vectors (one per vertex)

Definition at line 1585 of file PolygonMesh.h.

◆ m_p_vertex_normal_vbo

std::auto_ptr<PolygonMesh> gVirtualXRay::PolygonMesh::m_p_vertex_normal_vbo
protectedinherited

Definition at line 1560 of file PolygonMesh.h.

◆ m_p_vertex_set

void* gVirtualXRay::PolygonMesh::m_p_vertex_set
protectedinherited

Array containing the vertices.

Definition at line 1589 of file PolygonMesh.h.

◆ m_permutation

std::vector<int> gVirtualXRay::InternalOrganMesh::m_permutation
protectedinherited

Definition at line 289 of file InternalOrganMesh.h.

◆ m_photon_cross_section

PhotonCrossSection gVirtualXRay::PolygonMesh::m_photon_cross_section
protectedinherited

Material properties, with respect to X-ray.

Definition at line 1569 of file PolygonMesh.h.

◆ m_polygon_type

int gVirtualXRay::PolygonMesh::m_polygon_type
protectedinherited

Polygon type; valid values are GL_TRIANGLES.

Definition at line 1615 of file PolygonMesh.h.

◆ m_texture_coordinates_2d

std::vector<VEC2> gVirtualXRay::InternalOrganMesh::m_texture_coordinates_2d
protectedinherited

Definition at line 293 of file InternalOrganMesh.h.

◆ m_texture_coordinates_3d

std::vector<VEC3> gVirtualXRay::InternalOrganMesh::m_texture_coordinates_3d
protectedinherited

Definition at line 297 of file InternalOrganMesh.h.

◆ m_texture_size_2d

unsigned int gVirtualXRay::InternalOrganMesh::m_texture_size_2d
protectedinherited

Definition at line 334 of file InternalOrganMesh.h.

◆ m_texture_size_3d

unsigned int gVirtualXRay::InternalOrganMesh::m_texture_size_3d
protectedinherited

Definition at line 338 of file InternalOrganMesh.h.

◆ m_use_3D_bump_map

int gVirtualXRay::InternalOrganMesh::m_use_3D_bump_map
protectedinherited

Definition at line 330 of file InternalOrganMesh.h.

◆ m_use_3D_colour_texture

int gVirtualXRay::SoftTissueMesh::m_use_3D_colour_texture
protectedinherited

Definition at line 172 of file SoftTissueMesh.h.

◆ m_use_bump_map

int gVirtualXRay::AnatomicalMesh::m_use_bump_map
protectedinherited

1 if the mesh use bump mapping; default value is 0

Definition at line 150 of file AnatomicalMesh.h.

◆ m_use_texture

int gVirtualXRay::AnatomicalMesh::m_use_texture
protectedinherited

1 if the mesh use texturing; default value is 0

Definition at line 147 of file AnatomicalMesh.h.

◆ m_vertex_data_type

int gVirtualXRay::PolygonMesh::m_vertex_data_type
protectedinherited

Data type of the vertex data; valid values are GL_FLOAT, GL_DOUBLE and GL_NONE

Definition at line 1611 of file PolygonMesh.h.


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