|
Maya 1.0
|
Set of instances along with their frame lists. More...
#include <maya.h>
Public Member Functions | |
| MayaGeometryAll () | |
| Empty. | |
| MayaGeometryAll (const MayaGeometry &) | |
| Creates a set of geometries from a unique geometry. | |
| MayaGeometryAll (const MayaGeometrySet &) | |
| Create a set of geometries from a set of geometry. | |
| MayaGeometryAll (const QVector< MayaGeometrySet > &) | |
| Create a set of instances of geometries from a set of geometry. | |
| MayaGeometryAll (const MayaResources &, const MayaInstanceSet &) | |
| Create a complex geometry by combining an atlas and a set of instances. | |
| MayaGeometryAll (const MayaResources &, const MayaInstanceAll &) | |
| Create a complex geometry by combining an atlas and a set of instances. | |
| ~MayaGeometryAll () | |
| Empty. | |
| void | Append (const MayaGeometry &) |
| Add an instance to the scene. | |
| void | Append (const MayaGeometrySet &) |
| Add an instance set to the scene. | |
| void | Append (const QString &, const FrameScaled &) |
| Add an instance to the scene with a given name and frame. | |
| void | SetFramesToAll (QVector< FrameScaled >) |
| Set the frames to the entire geometry. | |
| void | SetMaterial (const MayaMaterial &) |
| Set the same material for all the objects. | |
| void | SetMaterial_EqualName (const QString &, const MayaMaterial &) |
| Set the material of all the instances whose name exactly matches the given string. | |
| void | SetMaterial_ContainsName (const QString &n, const MayaMaterial &mo) |
| Set the material of all the instances whose name contains the given string. | |
| MayaGeometry | GetGeometryByName (const QString &n) |
| gets the merged geometry of all objects whose name contains the given string. | |
| void | Rotate (const Vector &) |
| Rotate all instances. | |
| void | Translate (const Vector &) |
| Translate all instances. | |
| void | Scale (const Vector &) |
| Scale all instances. | |
| void | Remove (const QString &) |
| Clears one instance given its name. | |
| void | Clear () |
| Clears all instances. | |
| void | Append (const MayaGeometryAll &) |
| Append a set of instances. | |
| int | count () const |
| Get the number of instances. | |
| QList< QString > | GetNames () const |
| Get the list of names of the instances in the geometry. | |
| MayaGeometrySet & | operator[] (const QString &) |
| Get the MayaGeometrySet of the geometry. | |
| int | GetSetSize () const |
| Get the size of instances. | |
| Box | GetBox () const |
| Return the Bounding Box of each MayaGeometrySet. | |
| MayaGeometry | Collapse () const |
| Merge all the instances into a single geometry. | |
| bool | GetMayaGeometrySet (const QString &, MayaGeometrySet &) |
| Get one instance given its name. | |
| bool | GetMayaGeometrySet (const QString &, QVector< MayaGeometrySet > &) |
| Get a set of geometrical elements. | |
| bool | Load_OBJ (const QString &) |
| Loads the geometrys from an .obj file into a MayaGeometryAll. Experimental. | |
| bool | find_MTL_Address (const QString &, const QString &, QString &, QString &) |
| Loads the geometrys from an .obj file into a MayaGeometryAll. | |
| bool | Save_OBJ (const QString &, const bool &=true) const |
| Save the geometry as a Maya .obj file (MayaGeometryAll->MayaGeometry). | |
| bool | Save_OBJ_Collapse (const QString &) const |
| Save a single geometry as a Maya .obj file (Collapse the MayaGeomeryAll). | |
| bool | Save_PBRT (const QString &) const |
| Save the geometry as a .pbrt file (MayaGeometryAll->MayaGeometry). | |
| bool | Save_VUE (const QString &) const |
| Save the instances as a Vue python script. | |
| bool | Save_XML_Instances (const QString &) const |
| Save instances positions into an XML file compatible with Mitsuba. | |
| bool | Save_XML_Object (const QString &, const QString &id) const |
| Save instances positions into an XML file compatible with Mitsuba and put it in a shapegroup that can be instanciated. | |
| bool | Save_XML_Object (const QString &, const QString &id, const QString &objbasename, const QString &texturepath, const QString &relPath) const |
| Save objects into an XML file compatible with Mitsuba and put it in a shapegroup that can be instanciated, don't export materials (use Save_XML_Materials() in addition) | |
| bool | Save_XML (const QString &, const Camera &, const QString &instancefilename=QString(""), bool=false, const QString &=QString(""), bool objectonly=false) const |
| Save scene into an XML file. | |
| bool | Save_VueScript (const QString &) const |
| Export instances in Vue Software format. | |
| MayaStatistics | GetStatistics () const |
| Compute the statistics of the geometry. | |
| QString | GetText (int=0, bool=false) const |
| Get the text information. | |
Static Public Member Functions | |
| static MayaGeometryAll | CreateVoxelSurface (const Voxel &) |
| Create a set of visible surface patches representing the surface voxel. | |
Protected Attributes | |
| QMap< QString, MayaGeometrySet > | instances |
| Map between the name of the geometric instances and the MayaGeometrySet structure. A map is used instead of an array to speed up instance search given an input name. | |
Friends | |
| class | MayaGpuAll |
Set of instances along with their frame lists.
| MayaGeometryAll::MayaGeometryAll | ( | const MayaGeometry & | mg | ) |
Creates a set of geometries from a unique geometry.
This function creates a single geometry entry and a unique reference with identity frame.
| mg | Input geometry. |
References Append().
| MayaGeometryAll::MayaGeometryAll | ( | const MayaGeometrySet & | mgs | ) |
Create a set of geometries from a set of geometry.
| mgs | Input set of geometry. |
References Append().
| MayaGeometryAll::MayaGeometryAll | ( | const QVector< MayaGeometrySet > & | s | ) |
| MayaGeometryAll::MayaGeometryAll | ( | const MayaResources & | atlas, |
| const MayaInstanceSet & | mis ) |
Create a complex geometry by combining an atlas and a set of instances.
| atlas | The atlas of models. |
| mis | The set of instances. |
References Append(), MayaInstanceSet::GetFrameScaleds(), MayaInstance::GetName(), MayaResources::GetRessource(), MayaGeometryAll(), and SetFramesToAll().
| MayaGeometryAll::MayaGeometryAll | ( | const MayaResources & | atlas, |
| const MayaInstanceAll & | mia ) |
Create a complex geometry by combining an atlas and a set of instances.
Traverses the set of instances and replace instance by the geometry in the atlas whenever an entry exists.
| atlas | The atlas of models. |
| mia | Multiple instance object. |
References Append(), MayaInstanceAll::GetFrameScaleds(), MayaResources::GetRessource(), MayaInstanceAll::instances, MayaGeometryAll(), and SetFramesToAll().
| void MayaGeometryAll::Append | ( | const MayaGeometry & | in | ) |
Add an instance to the scene.
This function checks if the object already exists in the collection of models. If it already exists, it simply creates a reference to it, otherwise it creates a new entry.
| in | The instance. |
References MayaGeometry::GetName(), FrameScaled::Id, and instances.
Referenced by Append(), Load_OBJ(), MayaGeometryAll(), MayaGeometryAll(), MayaGeometryAll(), MayaGeometryAll(), and MayaGeometryAll().
| void MayaGeometryAll::Append | ( | const MayaGeometryAll & | scene | ) |
Append a set of instances.
| scene | The set of instances. |
References Append(), instances, and MayaGeometryAll().
| void MayaGeometryAll::Append | ( | const MayaGeometrySet & | in | ) |
Add an instance set to the scene.
This function checks if the object already exists in the collection of models. If so, it simply creates a reference to it, otherwise it creates a new entry.
| in | The instance. |
References MayaGeometrySet::count(), MayaGeometrySet::GetFrameScaled(), MayaGeometrySet::GetName(), and instances.
| MayaGeometry MayaGeometryAll::Collapse | ( | ) | const |
Merge all the instances into a single geometry.
Note that the resulting geometry can be huge if many instances were used.
References instances, and MayaGeometry::Merge().
Referenced by Save_OBJ_Collapse().
|
static |
Create a set of visible surface patches representing the surface voxel.
This function differs from MayaGeometrySet::CreateVoxel(const Voxel&) in the sense that there will be no coplanar faces between neighboring cubes.
| voxel | The voxel. |
References MayaInstanceAll::Append(), MayaResources::Append(), Voxel::At(), Array::Cell(), Array::CellSizeX(), Array::CellSizeY(), Array::CellSizeZ(), Box::Center(), MayaGeometryAll(), FrameScaled::Translation(), and Array::UnitCell().
| bool MayaGeometryAll::find_MTL_Address | ( | const QString & | url, |
| const QString & | name, | ||
| QString & | nameR, | ||
| QString & | nameA ) |
Loads the geometrys from an .obj file into a MayaGeometryAll.
| url | File name (which should contain the extension .obj). |
Loads the geometrys from an .obj file into a MayaGeometryAll.
| url | File name (which should contain the extension .obj). |
| name | Name of the current material. |
| nameR | Texture name of the diffuse map. |
| nameA | Texture name of the alpha map. |
Referenced by Load_OBJ().
| MayaGeometry MayaGeometryAll::GetGeometryByName | ( | const QString & | n | ) |
gets the merged geometry of all objects whose name contains the given string.
| n | String that will be searched and matched with the names. |
References instances, and MayaGeometry::Merge().
| bool MayaGeometryAll::GetMayaGeometrySet | ( | const QString & | n, |
| MayaGeometrySet & | mgs ) |
Get one instance given its name.
| n | Name of the instance. |
| mgs | Geometry set. |
References instances.
| bool MayaGeometryAll::GetMayaGeometrySet | ( | const QString & | n, |
| QVector< MayaGeometrySet > & | mgs ) |
| MayaStatistics MayaGeometryAll::GetStatistics | ( | ) | const |
| QString MayaGeometryAll::GetText | ( | int | spaces = 0, |
| bool | html = false ) const |
Get the text information.
| spaces | Spacing for indenting the text. |
| html | Flag to specify syntax highlighting. |
References instances.
| bool MayaGeometryAll::Load_OBJ | ( | const QString & | url | ) |
Loads the geometrys from an .obj file into a MayaGeometryAll. Experimental.
| url | File name (which should contain the extension .obj). |
References Append(), count(), and find_MTL_Address().
Referenced by MayaResources::Append().
|
inline |
| void MayaGeometryAll::Remove | ( | const QString & | n | ) |
| void MayaGeometryAll::Rotate | ( | const Vector & | r | ) |
| bool MayaGeometryAll::Save_OBJ | ( | const QString & | url, |
| const bool & | eraseTexture = true ) const |
Save the geometry as a Maya .obj file (MayaGeometryAll->MayaGeometry).
| url | Filename. |
| eraseTexture | Boolean to confirm or not to erase the existing texture. |
References instances, MayaGeometry::Save_OBJ(), and MayaGeometry::SetName().
| bool MayaGeometryAll::Save_OBJ_Collapse | ( | const QString & | url | ) | const |
Save a single geometry as a Maya .obj file (Collapse the MayaGeomeryAll).
| url | Filename. |
References Collapse(), and MayaGeometry::Save_OBJ().
| bool MayaGeometryAll::Save_PBRT | ( | const QString & | url | ) | const |
Save the geometry as a .pbrt file (MayaGeometryAll->MayaGeometry).
| url | Filename. |
References instances, MayaGeometry::Save_PBRT(), and MayaGeometry::SetName().
| bool MayaGeometryAll::Save_VUE | ( | const QString & | url | ) | const |
Save the instances as a Vue python script.
| url | Filename. |
References instances.
| bool MayaGeometryAll::Save_VueScript | ( | const QString & | url | ) | const |
| bool MayaGeometryAll::Save_XML | ( | const QString & | url, |
| const Camera & | camera, | ||
| const QString & | instancefilename = QString(""), | ||
| bool | use_normals = false, | ||
| const QString & | shape = QString(""), | ||
| bool | objectonly = false ) const |
Save scene into an XML file.
The XML format is compatible with Mitsuba.
| url | Filename. |
| camera | The camera. |
| instancefilename | What ? |
| use_normals | What ? |
| shape | What ? |
References Camera::At(), MayaMaterial::diffuse, Camera::Eye(), instances, and Camera::Up().
| bool MayaGeometryAll::Save_XML_Instances | ( | const QString & | url | ) | const |
Save instances positions into an XML file compatible with Mitsuba.
| url | Filename. |
References instances.
| bool MayaGeometryAll::Save_XML_Object | ( | const QString & | url, |
| const QString & | id ) const |
Save instances positions into an XML file compatible with Mitsuba and put it in a shapegroup that can be instanciated.
| url | Filename. |
References MayaMaterial::diffuse, and instances.
| bool MayaGeometryAll::Save_XML_Object | ( | const QString & | url, |
| const QString & | id, | ||
| const QString & | objbasename, | ||
| const QString & | texturepath, | ||
| const QString & | relPath ) const |
Save objects into an XML file compatible with Mitsuba and put it in a shapegroup that can be instanciated, don't export materials (use Save_XML_Materials() in addition)
| url | Filename. |
| id | identifier of the object |
| objbasename | the basename of the object (that shares textures) |
| texturepath | the path where all the textures should be stored |
References instances, and MayaMaterial::name.
| void MayaGeometryAll::Scale | ( | const Vector & | s | ) |
| void MayaGeometryAll::SetFramesToAll | ( | QVector< FrameScaled > | s | ) |
Set the frames to the entire geometry.
| s | Set of frames. |
References instances.
Referenced by MayaGeometryAll(), and MayaGeometryAll().
| void MayaGeometryAll::SetMaterial | ( | const MayaMaterial & | mo | ) |
| void MayaGeometryAll::SetMaterial_ContainsName | ( | const QString & | n, |
| const MayaMaterial & | mo ) |
Set the material of all the instances whose name contains the given string.
| n | String that will be searched and matched with the names. |
| mo | Material. |
References instances.
| void MayaGeometryAll::SetMaterial_EqualName | ( | const QString & | n, |
| const MayaMaterial & | mo ) |
Set the material of all the instances whose name exactly matches the given string.
| n | String that will be searched and matched with the names. |
| mo | Material. |
References instances.