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

This class implements a set of instances along with their frame lists. More...

#include <maya.h>

Public Member Functions

 MayaInstanceAll ()
 Empty.
 
 ~MayaInstanceAll ()
 Empty.
 
void Append (const MayaInstance &)
 Add an instance to the scene. More...
 
void Append (const MayaInstanceSet &)
 Add an instance set to the scene. More...
 
void Append (const MayaInstanceAll &)
 Append a set of instances with the existing one. More...
 
void Append (const QString &, const FrameScaled &)
 Add an instance to the scene. More...
 
void AppendNew (const MayaInstanceSet &)
 Add an instance set to the scene. More...
 
QList< QString > GetNames () const
 Get the list of names from the set of instances.
 
MayaInstanceSet operator[] (const QString &) const
 Get one set from the list of all instances. More...
 
void Rotate (const Vector &)
 Rotate all instances. More...
 
void Translate (const Vector &)
 Translate all instances. More...
 
void Scale (const Vector &)
 Scale all instances. More...
 
void Remove (const QString &)
 Clears one instance by name. More...
 
void Clear ()
 Clears all instances.
 
void ClearFrames ()
 Clears frames of all instances.
 
MayaInstanceAll Crop (const Box2 &) const
 Get a crop of the instances. More...
 
QVector< FrameScaledGetFrameScaleds (const QString &) const
 Get the set of frames from the list of all instances. More...
 
bool LoadInstances (const QString &)
 Load instances with a maya file. More...
 
QString ExportVueScript ()
 Export Vue 7 script.
 
void exportSceneJson (QTextStream &out, const QString &url) const
 Export scene with Json.
 
QString GetText (int=0, bool=false) const
 Get the text information. More...
 

Protected Attributes

QMap< QString, MayaInstanceSetinstances
 Map between names and set of instances.
 

Friends

class MayaGeometryAll
 

Detailed Description

This class implements a set of instances along with their frame lists.

Member Function Documentation

◆ Append() [1/4]

void MayaInstanceAll::Append ( const MayaInstance in)

Add an instance to the scene.

This function checks if the object already exists in the collection of instances. If it already exists, it simply creates a new reference to it, otherwise it creates a new entry with the identity matrix.

Parameters
inThe instance.

References MayaInstance::GetName(), FrameScaled::Id, and instances.

Referenced by MayaSceneStack::AddInstanceToScene(), Append(), MayaGeometryAll::CreateVoxelSurface(), Crop(), and LoadInstances().

◆ Append() [2/4]

void MayaInstanceAll::Append ( const MayaInstanceAll scene)

Append a set of instances with the existing one.

Parameters
sceneThe set of instances.

References Append(), and instances.

◆ Append() [3/4]

void MayaInstanceAll::Append ( const MayaInstanceSet ins)

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 new reference to it, otherwise it creates a new entry.

Parameters
insThe instance.

References MayaInstanceSet::GetFrameScaleds(), MayaInstance::GetName(), and instances.

◆ Append() [4/4]

void MayaInstanceAll::Append ( const QString &  name,
const FrameScaled frame 
)

Add an instance to the scene.

This function checks if the object already exists in the collection of instances. If it already exists, it simply creates a new reference to it with the frame,otherwise it creates a new entry with the argument frame.

Parameters
nameName of the instance.
frameThe frame.

References instances.

◆ AppendNew()

void MayaInstanceAll::AppendNew ( const MayaInstanceSet ins)

Add an instance set to the scene.

This function creates a new entry without checking the name of the object.

Parameters
insThe instance.

References MayaInstance::GetName(), and instances.

◆ Crop()

MayaInstanceAll MayaInstanceAll::Crop ( const Box2 box) const

Get a crop of the instances.

Parameters
boxThe Crop boundary.

References Append(), MayaInstanceSet::GetFrameScaleds(), and instances.

◆ GetFrameScaleds()

QVector< FrameScaled > MayaInstanceAll::GetFrameScaleds ( const QString &  n) const
inline

Get the set of frames from the list of all instances.

Parameters
nThe name.

References instances.

Referenced by MayaGeometryAll::MayaGeometryAll().

◆ GetText()

QString MayaInstanceAll::GetText ( int  spaces = 0,
bool  html = false 
) const

Get the text information.

Parameters
spacesSpacing for indenting the text.
htmlFlag to specify syntax highlighting.

References instances.

Referenced by MayaSceneStack::GetText().

◆ LoadInstances()

bool MayaInstanceAll::LoadInstances ( const QString &  file)

Load instances with a maya file.

Parameters
fileName of the file.
Returns
A boolean checking if loading has been successful.

References Append(), Math::Pi, and Matrix::Rotation().

◆ operator[]()

MayaInstanceSet MayaInstanceAll::operator[] ( const QString &  name) const
inline

Get one set from the list of all instances.

Parameters
nameThe name.

References instances.

◆ Remove()

void MayaInstanceAll::Remove ( const QString &  n)

Clears one instance by name.

Parameters
nName of the instance.

References instances.

◆ Rotate()

void MayaInstanceAll::Rotate ( const Vector r)

Rotate all instances.

Parameters
rRotation vector.

References instances.

◆ Scale()

void MayaInstanceAll::Scale ( const Vector s)

Scale all instances.

Parameters
sScaling vector.

References instances.

◆ Translate()

void MayaInstanceAll::Translate ( const Vector t)

Translate all instances.

Parameters
tTranslation vector.

References instances.