Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OGLMesh Class Reference

#include <OGLMesh.h>

Inheritance diagram for OGLMesh:
Inheritance graph
[legend]
Collaboration diagram for OGLMesh:
Collaboration graph
[legend]

Public Member Functions

const std::vector< QVector3D > & vertices () const
 
const std::vector< QVector2D > & textureCoordinates () const
 
const std::vector< float > & verticesColors () const
 
const std::vector< QVector3D > & normals () const
 
const std::vector< unsigned int > & indices () const
 
void setMaterial (const OGLSimpleMaterial &material)
 
OGLSimpleMaterialmaterial ()
 
const OGLSimpleMaterialmaterial () const
 
const OGLPrivimitiveType primitiveType () const
 
const OBox boundingBox () const
 

Protected Member Functions

void recomputeBoundingBox ()
 

Protected Attributes

std::vector< QVector3D > _vertices
 
std::vector< float > _verticesColors
 
std::vector< QVector3D > _normals
 
std::vector< QVector2D > _textureCoordinates
 
std::vector< unsigned int > _indices
 
OGLSimpleMaterial _material
 
OGLPrivimitiveType _primitiveType
 
OBox _boundingBox
 

Detailed Description

Store geometry and visual material of a displayed object. A mesh can be bound to a single material. Split geometry into several meshes if you need several materials.

Definition at line 41 of file OGLMesh.h.

Member Function Documentation

◆ boundingBox()

const OBox OGLMesh::boundingBox ( ) const
inline

Get the boundingBox

Definition at line 95 of file OGLMesh.h.

Here is the caller graph for this function:

◆ indices()

const std::vector< unsigned int > & OGLMesh::indices ( ) const

Returns a dense array of primitives indices.

Definition at line 40 of file OGLMesh.cpp.

Here is the caller graph for this function:

◆ material() [1/2]

OGLSimpleMaterial & OGLMesh::material ( )

Get the material of this mesh.

Definition at line 50 of file OGLMesh.cpp.

Here is the caller graph for this function:

◆ material() [2/2]

const OGLSimpleMaterial & OGLMesh::material ( ) const

Get the material of this mesh.

Definition at line 54 of file OGLMesh.cpp.

◆ normals()

const std::vector< QVector3D > & OGLMesh::normals ( ) const

Returns a dense array of vertices normals.

Definition at line 30 of file OGLMesh.cpp.

Here is the caller graph for this function:

◆ primitiveType()

const OGLPrivimitiveType OGLMesh::primitiveType ( ) const
inline

Get the primitive type used to interpret indices.

Definition at line 87 of file OGLMesh.h.

Here is the caller graph for this function:

◆ recomputeBoundingBox()

void OGLMesh::recomputeBoundingBox ( )
protected

Definition at line 59 of file OGLMesh.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMaterial()

void OGLMesh::setMaterial ( const OGLSimpleMaterial material)

Set the material of this mesh.

Definition at line 45 of file OGLMesh.cpp.

Here is the call graph for this function:

◆ textureCoordinates()

const std::vector< QVector2D > & OGLMesh::textureCoordinates ( ) const

Returns a dense array of vertices positions.

Definition at line 35 of file OGLMesh.cpp.

Here is the caller graph for this function:

◆ vertices()

const std::vector< QVector3D > & OGLMesh::vertices ( ) const

Returns a dense array of vertices positions.

Definition at line 20 of file OGLMesh.cpp.

Here is the caller graph for this function:

◆ verticesColors()

const std::vector< float > & OGLMesh::verticesColors ( ) const

Returns a dense array of vertices positions.

Definition at line 25 of file OGLMesh.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ _boundingBox

OBox OGLMesh::_boundingBox
protected

Definition at line 108 of file OGLMesh.h.

◆ _indices

std::vector<unsigned int> OGLMesh::_indices
protected

Definition at line 105 of file OGLMesh.h.

◆ _material

OGLSimpleMaterial OGLMesh::_material
protected

Definition at line 106 of file OGLMesh.h.

◆ _normals

std::vector<QVector3D> OGLMesh::_normals
protected

Definition at line 103 of file OGLMesh.h.

◆ _primitiveType

OGLPrivimitiveType OGLMesh::_primitiveType
protected

Definition at line 107 of file OGLMesh.h.

◆ _textureCoordinates

std::vector<QVector2D> OGLMesh::_textureCoordinates
protected

Definition at line 104 of file OGLMesh.h.

◆ _vertices

std::vector<QVector3D> OGLMesh::_vertices
protected

Definition at line 101 of file OGLMesh.h.

◆ _verticesColors

std::vector<float> OGLMesh::_verticesColors
protected

Definition at line 102 of file OGLMesh.h.


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