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

This class implements a set of mesh instances optimized for the GPU. More...

#include <maya.h>

Public Member Functions

 MayaGpuAll ()
 Empty.
 
 MayaGpuAll (const MayaGeometryAll &)
 Create a set of instances on the GPU from a set of instances. More...
 
 ~MayaGpuAll ()
 Empty.
 
void Render (GpuParameter &)
 Render the set of instances. More...
 
void RenderBBox ()
 Render the set of instances.
 
void Append (const MayaGeometrySet &)
 Add an instance set to the scene. More...
 
void Append (const MayaGeometryAll &)
 Append a set of instances with the existing one. More...
 
void Replace (const MayaGeometryAll &)
 Replace a set of instances with the existing one. More...
 
void UpdateMaterial (MayaGeometryAll &)
 Update the material.
 
void Remove (const QString &)
 Clears one instance by name. More...
 
void Clear ()
 Clear all instances.
 
void ClearFrames ()
 clear all frames, preserving the instances.
 
Box getBox ()
 Retourne la boite englobante de la scène.
 
MayaStatistics GetStatistics () const
 Compute some statistics. More...
 

Protected Attributes

QMap< QString, MayaGpuSetinstances
 Map of instances with their set of frames.
 

Detailed Description

This class implements a set of mesh instances optimized for the GPU.

Constructor & Destructor Documentation

◆ MayaGpuAll()

MayaGpuAll::MayaGpuAll ( const MayaGeometryAll mia)

Create a set of instances on the GPU from a set of instances.

Parameters
miaSet of instances.

References instances, and MayaGeometryAll::instances.

Member Function Documentation

◆ Append() [1/2]

void MayaGpuAll::Append ( const MayaGeometryAll scene)

Append a set of instances with the existing one.

Parameters
sceneThe set of instances.

References Append(), and MayaGeometryAll::instances.

◆ Append() [2/2]

void MayaGpuAll::Append ( const MayaGeometrySet ins)

Add an instance set to the scene.

Checks if the object already exists in the collection of models: if so, it simply creates a new reference to it, otherwise it creates a new entry.

Parameters
insThe instance.

References MayaGeometrySet::count(), MayaGeometrySet::GetFrameScaled(), MayaGeometrySet::GetName(), and instances.

Referenced by Append(), MayaWidget::AppendWorld(), Replace(), and MayaWidget::SetWorld().

◆ GetStatistics()

MayaStatistics MayaGpuAll::GetStatistics ( ) const

Compute some statistics.

This function gathers some statistics and pack them into the structure.

References instances.

Referenced by MayaWidget::RenderForeGround().

◆ Remove()

void MayaGpuAll::Remove ( const QString &  n)

Clears one instance by name.

Parameters
nName of the instance.

References instances.

Referenced by Replace().

◆ Render()

void MayaGpuAll::Render ( GpuParameter &  gpu)

Render the set of instances.

Parameters
gpuSet of parameters.

References instances.

Referenced by MayaWidget::paintGL().

◆ Replace()

void MayaGpuAll::Replace ( const MayaGeometryAll scene)

Replace a set of instances with the existing one.

Parameters
sceneThe set of instances.

References Append(), MayaGeometryAll::instances, and Remove().

Referenced by MayaWidget::ReplaceInWorld().