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

Resource objects are a collection of geometric shapes associated to a name. More...

#include <maya.h>

Public Member Functions

 MayaResources ()
 Empty.
 
 ~MayaResources ()
 Empty.
 
void Append (const QString &, const QString &)
 Append an object to the resource set. More...
 
void Append (const QString &, const MayaGeometry &)
 Add a ressource. More...
 
void Append (const QString &, const MayaGeometrySet &)
 Add a ressource. More...
 
void Append (const QString &, const MayaGeometryAll &)
 Add a geometric object to the set of objects. More...
 
void Remove (const QString &)
 Remove a given element from the set of objects. More...
 
bool Exist (const QString &) const
 Check if a given object already exists. More...
 
bool GetRessource (const QString &, MayaGeometryAll &) const
 Get the geometric object given an input name. More...
 
void Clear ()
 Clear data.
 
QString GetText (bool=false) const
 Get the text information. More...
 

Protected Attributes

QMap< QString, MayaGeometryAllatlas
 Map of ressources identified by their names.
 

Detailed Description

Resource objects are a collection of geometric shapes associated to a name.

The purpose of this class is to handle a collection of models that can be instanciated using the MayaGeometryAll framework.

Member Function Documentation

◆ Append() [1/4]

void MayaResources::Append ( const QString &  name,
const MayaGeometry mg 
)

Add a ressource.

Parameters
nameObject name.
mgGeometry of the corresponding object.

References atlas, and Exist().

◆ Append() [2/4]

void MayaResources::Append ( const QString &  name,
const MayaGeometryAll mga 
)

Add a geometric object to the set of objects.

See also
void MayaResources::Append(const QString&,const MayaGeometrySet&)
Parameters
nameObject name.
mgaSet of geometrical elements of the corresponding object.

References atlas, and Exist().

◆ Append() [3/4]

void MayaResources::Append ( const QString &  name,
const MayaGeometrySet mgs 
)

Add a ressource.

Parameters
nameObject name.
mgsSet of geometrical elements of the corresponding object.

References atlas, and Exist().

◆ Append() [4/4]

void MayaResources::Append ( const QString &  name,
const QString &  url 
)

Append an object to the resource set.

Parameters
nameIdentifier of the object.
urlFile name of the resource.

References atlas, Exist(), and MayaGeometryAll::Load_OBJ().

Referenced by MayaSceneStack::AddGeometryToAtlas(), MayaSceneStack::AddInstanceToAtlas(), and MayaGeometryAll::CreateVoxelSurface().

◆ Exist()

bool MayaResources::Exist ( const QString &  name) const

Check if a given object already exists.

Parameters
nameObject name.

References atlas.

Referenced by Append(), and Remove().

◆ GetRessource()

bool MayaResources::GetRessource ( const QString &  name,
MayaGeometryAll mga 
) const

Get the geometric object given an input name.

Parameters
nameName of the object.
mgaReturned geometry.
Returns
Boolean, set to false if the name does not exist.

References atlas.

Referenced by MayaGeometryAll::MayaGeometryAll().

◆ GetText()

QString MayaResources::GetText ( bool  html = false) const

Get the text information.

Parameters
htmlFlag to specify syntax highlighting.

References atlas.

Referenced by MayaSceneStack::GetText().

◆ Remove()

void MayaResources::Remove ( const QString &  name)

Remove a given element from the set of objects.

Parameters
nameName of the ressource.

References atlas, and Exist().