35 #ifndef __InternalOrganMesh_h 36 #define __InternalOrganMesh_h 58 #ifndef __AnatomicalMesh_h 98 unsigned int texture_2D_size = 1024,
99 unsigned int texture_3D_size = 64);
174 unsigned int& frame_buffer,
189 unsigned int& frame_buffer,
190 unsigned int& texture,
ToCreate to_create);
220 unsigned int& aFrameBuffer);
231 unsigned int& aFrameBuffer,
357 #endif // INTERNALORGANMESH_H unsigned int m_texture_size_3d
InternalOrganMesh is a class to handle a polygon mesh for an internal organ. Internal organs use bump...
virtual void defineDisplayShaderInput(int shader_id)
Link the attributes to their id in the shader.
bool m_optimize_texture_coordinates
virtual InternalOrganMesh & operator=(const InternalOrganMesh &aPolygonMesh)
virtual ~InternalOrganMesh()
Destructor.
Class to handle GLSL shaders.
ToCreate
To know if a bump map or a colour texture has to be created.
unsigned int m_bump_map_texture
virtual void shareNormalVectors()
Compute a normal vector per vertex for a smoother display.
unsigned int m_texture_size_2d
virtual void generateTextures()=0
generates the textures
virtual void initialize()=0
virtual void load2DBumpShader()
Load the shader to create the 2D bump map.
std::vector< VEC2 > m_margin_direction
virtual void generate2DTexture(Shader const &shader, unsigned int &frame_buffer, ToCreate to_create)
generates a 2D texture
std::vector< VEC3 > m_gradient_tab
virtual void load3DBumpShader()
Load the shader to create the 3D bump map.
std::vector< VEC3 > m_texture_coordinates_3d
virtual void deleteIndices()
delete the indices and calculate new normal vectors
AnatomicalMesh is a class to handle a polygon mesh for tissue.
virtual void generate3DTexture(Shader const &shader, unsigned int &frame_buffer, unsigned int &texture, ToCreate to_create)
generates a 3D texture
std::vector< int > m_permutation
Shader is a class to handle shaders written in GLSL.
virtual void initialize2DBuffer(unsigned int &aTexture, unsigned int &aFrameBuffer)
initialize a 2D frame buffer and bind a texture to it
virtual void initPermutation()
initialize permutation tab for all noises
InternalOrganMesh(bool optimize_texture_coordinates=true, unsigned int texture_2D_size=1024, unsigned int texture_3D_size=64)
Default Constructor.
virtual void initialize2DTextureCoordinates()
virtual void initialize3DTextureCoordinates()
Initialise 3D texture coordinates.
Class to handle a polygon mesh for tissue.
virtual void defineBumpMapShaderInput(int shader_id)
Link the attributes to their id in the shader bump map generation.
virtual bool isTransparent() const
return true if the mesh has to be displayed with transparency
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
virtual void splitFaces()
Split each face into four faces.
bool m_generation_texture_coord_are_set
virtual void initGradientTab()
initialize gradient tab for gnoise
virtual void defineColourTextureShaderInput(int shader_id)=0
std::vector< VEC2 > m_texture_coordinates_2d
virtual void copyFrom(const InternalOrganMesh &aPolygonMesh)
unsigned int m_bump_map_frame_buffer
virtual bool isSoftTissue() const =0
return true if the mesh represent a soft tissue