Maya 1.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MayaGpu Class Reference

This class implements a mesh whose structure is optimized for the GPU. More...

#include <maya.h>

Inheritance diagram for MayaGpu:
MayaGpuSet

Public Member Functions

 MayaGpu ()
 Empty. More...
 
 MayaGpu (const MayaGeometry &)
 Creates an instance. More...
 
 ~MayaGpu ()
 Destry a Maya Gpu instance.
 
void RenderBBox ()
 Renders the bounding box of the instance.
 
void SetName (const QString &)
 Set the name of the object. More...
 
void SetMaterial (const MayaMaterial &)
 Set material. More...
 
void InitMaterial ()
 Initialize the material of the object.
 
void InitTexture ()
 Initialize the texture.
 
QString GetName () const
 Get the name of the object.
 
Box getBox ()
 Get the bounding box of the object.
 
MayaStatistics GetStatistics () const
 Compute statistics.
 

Protected Member Functions

void InitRenderer ()
 initialize the renderer
 
void CreateGpu (const MayaGeometry &)
 Create a MayaGpu from the MayaGeometry. More...
 
void DeleteBuffers ()
 Delete all buffers.
 

Protected Attributes

QString name
 Signature of the object, implemented as the name of the corresponding mesh file.
 
MayaStatistics statistics
 Statistics of the object, which are derived from the arguments of the constructor.
 
MayaMaterial mat
 Material structure of the Object.
 
GLuint buffer_vertex
 Buffer of vertex.
 
GLuint buffer_normal
 Buffer of normal.
 
GLuint buffer_color
 Buffer of color.
 
GLuint buffer_UVmap
 Buffer of UVMaps.
 
GLuint buffer_index
 Buffer of indexes.
 
MayaGpuMaterial material
 Material data.
 
GLuint buffer_material
 Uniform material buffer.
 
GLuint buffer_texture
 Buffer of texture.
 
int nv
 Number of vertices.
 
int nt
 Number of triangles.
 
Box bbox
 Bounding box.
 
MayaSimpleRenderer * boxRenderer
 Renderer used to draw the bounding box.
 

Detailed Description

This class implements a mesh whose structure is optimized for the GPU.

Constructor & Destructor Documentation

◆ MayaGpu() [1/2]

MayaGpu::MayaGpu ( )

Empty.

Create a Maya Gpu instance.

References boxRenderer.

◆ MayaGpu() [2/2]

MayaGpu::MayaGpu ( const MayaGeometry mg)

Member Function Documentation

◆ CreateGpu()

void MayaGpu::CreateGpu ( const MayaGeometry mg)
protected

◆ SetMaterial()

void MayaGpu::SetMaterial ( const MayaMaterial m)

Set material.

Parameters
mMaterial.

References InitMaterial(), InitTexture(), and mat.

◆ SetName()

void MayaGpu::SetName ( const QString &  n)
inline

Set the name of the object.

Parameters
nName.

References name.