GLC_3dxmlToWorld Class Reference

GLC_3dxmlToWorld : Create an GLC_World from 3dxml file. More...

#include <glc_3dxmltoworld.h>

List of all members.

Classes

struct  AssyLink
 AssyLink : Assemblage link between parent id and GLC_StructInstance*. More...
class  MaterialRef
 MaterialRef : Material reference containing id, name and associated file. More...
class  OccurenceAttrib
 OccurenceAttrib : Specifique occurence attribute. More...
class  RepLink
 RepLink : Representation link between reference id and representation id. More...

Signals

void currentQuantum (int)

Public Member Functions

Constructor / Destructor

 GLC_3dxmlToWorld (const QGLContext *)
 Default constructor.
virtual ~GLC_3dxmlToWorld ()
Set Functions

GLC_WorldcreateWorldFrom3dxml (QFile &, bool StructureOnly)
 Create an GLC_World from an input 3DXML File.
GLC_3DRep create3DrepFrom3dxmlRep (const QString &)
 Create 3DRep from an 3DXML rep.
QStringList listOfAttachedFileName () const
 Get the list of attached files.

Private Types

typedef QHash< unsigned int,
GLC_StructReference * > 
ReferenceHash
typedef QHash
< GLC_StructInstance
*, unsigned int > 
InstanceOfHash
typedef QHash
< GLC_StructInstance
*, QString > 
InstanceOfExtRefHash
typedef QSet< const QString > SetOfExtRef
typedef QList< AssyLinkAssyLinkList
typedef QList< RepLinkRepLinkList
typedef QHash< const QString,
GLC_StructReference * > 
ExternalReferenceHash
typedef QHash< const QString,
GLC_Material * > 
MaterialHash
typedef QHash< const unsigned
int, QString > 
ReferenceRepHash

Private Member Functions

Private services functions

void loadManifest ()
 Load the 3dxml's manifest.
void clear ()
 Close all files and clear memmory.
void goToElement (const QString &)
 Go to an Element of a xml.
void goToRepId (const QString &)
 Go to a Rep of a xml.
void gotToPolygonalRepType ()
 Go to Polygonal Rep Type.
QString getContent (const QString &)
QString readAttribute (const QString &, bool required=false)
 Read the specified attribute.
void loadProductStructure ()
 Load the product structure.
void loadReference3D ()
 Load a Reference3D.
void loadInstance3D ()
 Load a Instance3D.
void loadReferenceRep ()
 Load a Reference representation.
void loadInstanceRep ()
 Load a Instance representation.
void loadExternalRef3D ()
 Load External Ref.
GLC_StructReferencecreateReferenceRep (QString id=QString())
 Add a reference from 3dxml to m_ExternalReferenceHash.
GLC_Matrix4x4 loadMatrix (const QString &)
 Load Matrix.
void createUnfoldedTree ()
 Create the unfolded tree.
void checkForXmlError (const QString &)
void loadLOD (GLC_Mesh *)
 Load Level of detail.
bool endElementNotReached (const QString &element)
 Return true if the end of specified element is not reached.
bool startElementNotReached (const QString &element)
 Return true if the start of specified element is not reached.
void loadFace (GLC_Mesh *, const int lod, double accuracy)
 Load a face.
void loadPolyline (GLC_Mesh *)
 Load polyline.
void clearMaterialHash ()
 Clear material hash.
GLC_MaterialloadSurfaceAttributes ()
 Load surface attributes.
GLC_MaterialgetMaterial ()
 get material
bool setStreamReaderToFile (QString, bool test=false)
 Set the stream reader to the specified file.
void loadGraphicsProperties ()
 Load graphics properties.
void loadDefaultViewProperty ()
 Load default view property.
void loadLocalRepresentations ()
 Load the local representation.
void loadExternRepresentations ()
 Load the extern representation.
GLC_3DRep loadCurrentExtRep ()
 Return the instance of the current extern representation.
void loadCatMaterialRef ()
 Load CatMaterial Ref if present.
void loadMaterialDef (const MaterialRef &)
 Create material from material def file.
void loadCatRepImage ()
 Load CATRepIage if present.
GLC_TextureloadTexture (QString)
 Try to construct a texture with the specified fileName.
void factorizeMaterial (GLC_3DRep *)
 Factorize material use.

Private Attributes

const QGLContext * m_pQGLContext
 OpenGL Context.
QXmlStreamReader * m_pStreamReader
 Xml Reader.
QString m_FileName
 The 3dxml fileName.
QuaZip * m_p3dxmlArchive
 The Quazip archive.
QuaZipFile * m_p3dxmlFile
 The Quazip file (Entry or archive).
QFile * m_pCurrentFile
 The current file (if there is no archive).
QString m_RootName
 The root Name of the 3dxml file.
GLC_Worldm_pWorld
 The World to return.
ReferenceHash m_ReferenceHash
 Reference Hash Table.
AssyLinkList m_AssyLinkList
 The Structure Link Hash Table.
InstanceOfHash m_InstanceOf
 Instance of Hash table.
SetOfExtRef m_SetOfExtRef
 The set of ext ref to load.
InstanceOfExtRefHash m_InstanceOfExtRefHash
 Instance of ext ref hash table.
ExternalReferenceHash m_ExternalReferenceHash
 Externam reference hash table.
MaterialHash m_MaterialHash
 Hash table of material.
bool m_IsInArchive
 Flag to know if the 3dxml is in an archive.
ReferenceRepHash m_ReferenceRepHash
 The Reference representation hash table.
RepLinkList m_LocalRepLinkList
 The list of local representation link.
RepLinkList m_ExternRepLinkList
 The list of extern representation link.
SetOfExtRef m_SetOfExtRep
 The set of ext rep to load.
GLC_Materialm_pCurrentMaterial
 The 3DREP current material.
QHash< QString, QString > m_TextureImagesHash
 The image file hash table.
bool m_LoadStructureOnly
 Flag indicate the loading method.
QSet< QString > m_ListOfAttachedFileName
 The list of attached file name.
QString m_CurrentFileName
 The current file name.
QDateTime m_CurrentDateTime
 The current file time and date.
QHash< unsigned int,
OccurenceAttrib * > 
m_OccurenceAttrib
 Hash table of occurence specific attributes.

Detailed Description

GLC_3dxmlToWorld : Create an GLC_World from 3dxml file.

Definition at line 53 of file glc_3dxmltoworld.h.


Member Typedef Documentation

typedef QList<AssyLink> GLC_3dxmlToWorld::AssyLinkList [private]

Definition at line 104 of file glc_3dxmltoworld.h.

typedef QHash<const QString, GLC_StructReference*> GLC_3dxmlToWorld::ExternalReferenceHash [private]

Definition at line 106 of file glc_3dxmltoworld.h.

typedef QHash<GLC_StructInstance*, QString> GLC_3dxmlToWorld::InstanceOfExtRefHash [private]

Definition at line 102 of file glc_3dxmltoworld.h.

typedef QHash<GLC_StructInstance*, unsigned int> GLC_3dxmlToWorld::InstanceOfHash [private]

Definition at line 101 of file glc_3dxmltoworld.h.

typedef QHash<const QString, GLC_Material*> GLC_3dxmlToWorld::MaterialHash [private]

Definition at line 107 of file glc_3dxmltoworld.h.

typedef QHash<unsigned int, GLC_StructReference*> GLC_3dxmlToWorld::ReferenceHash [private]

Definition at line 100 of file glc_3dxmltoworld.h.

typedef QHash<const unsigned int, QString> GLC_3dxmlToWorld::ReferenceRepHash [private]

Definition at line 108 of file glc_3dxmltoworld.h.

typedef QList<RepLink> GLC_3dxmlToWorld::RepLinkList [private]

Definition at line 105 of file glc_3dxmltoworld.h.

typedef QSet<const QString> GLC_3dxmlToWorld::SetOfExtRef [private]

Definition at line 103 of file glc_3dxmltoworld.h.


Constructor & Destructor Documentation

GLC_3dxmlToWorld::GLC_3dxmlToWorld ( const QGLContext *  pContext  ) 

Default constructor.

Definition at line 40 of file glc_3dxmltoworld.cpp.

GLC_3dxmlToWorld::~GLC_3dxmlToWorld (  )  [virtual]

Member Function Documentation

void GLC_3dxmlToWorld::checkForXmlError ( const QString &  info  )  [private]
void GLC_3dxmlToWorld::clear (  )  [private]
void GLC_3dxmlToWorld::clearMaterialHash (  )  [private]

Clear material hash.

Definition at line 1350 of file glc_3dxmltoworld.cpp.

References m_MaterialHash.

Referenced by clear(), and ~GLC_3dxmlToWorld().

GLC_3DRep GLC_3dxmlToWorld::create3DrepFrom3dxmlRep ( const QString &  fileName  ) 
GLC_StructReference * GLC_3dxmlToWorld::createReferenceRep ( QString  id = QString()  )  [private]
void GLC_3dxmlToWorld::createUnfoldedTree (  )  [private]
GLC_World * GLC_3dxmlToWorld::createWorldFrom3dxml ( QFile &  file,
bool  StructureOnly 
)
void GLC_3dxmlToWorld::currentQuantum ( int   )  [signal]
bool GLC_3dxmlToWorld::endElementNotReached ( const QString &  element  )  [inline, private]
void GLC_3dxmlToWorld::factorizeMaterial ( GLC_3DRep pRep  )  [private]

Factorize material use.

The hash table of rep material

Definition at line 2132 of file glc_3dxmltoworld.cpp.

References GLC_Material::hashCode(), GLC_Object::id(), m_MaterialHash, GLC_3DRep::materialSet(), and GLC_3DRep::replaceMaterial().

Referenced by loadExternalRef3D(), and loadExternRepresentations().

QString GLC_3dxmlToWorld::getContent ( const QString &  element  )  [private]
GLC_Material * GLC_3dxmlToWorld::getMaterial (  )  [private]
void GLC_3dxmlToWorld::goToElement ( const QString &  elementName  )  [private]
void GLC_3dxmlToWorld::goToRepId ( const QString &  id  )  [private]

Go to a Rep of a xml.

Definition at line 331 of file glc_3dxmltoworld.cpp.

References m_pStreamReader.

Referenced by createReferenceRep().

void GLC_3dxmlToWorld::gotToPolygonalRepType (  )  [private]

Go to Polygonal Rep Type.

Definition at line 342 of file glc_3dxmltoworld.cpp.

References endElementNotReached(), and m_pStreamReader.

Referenced by createReferenceRep(), and loadCurrentExtRep().

QStringList GLC_3dxmlToWorld::listOfAttachedFileName (  )  const [inline]

Get the list of attached files.

Definition at line 132 of file glc_3dxmltoworld.h.

Referenced by GLC_Factory::createWorldFromFile().

void GLC_3dxmlToWorld::loadCatMaterialRef (  )  [private]
void GLC_3dxmlToWorld::loadCatRepImage (  )  [private]
GLC_3DRep GLC_3dxmlToWorld::loadCurrentExtRep (  )  [private]
void GLC_3dxmlToWorld::loadDefaultViewProperty (  )  [private]
void GLC_3dxmlToWorld::loadExternalRef3D (  )  [private]
void GLC_3dxmlToWorld::loadExternRepresentations (  )  [private]
void GLC_3dxmlToWorld::loadFace ( GLC_Mesh pMesh,
const int  lod,
double  accuracy 
) [private]
void GLC_3dxmlToWorld::loadGraphicsProperties (  )  [private]
void GLC_3dxmlToWorld::loadInstance3D (  )  [private]
void GLC_3dxmlToWorld::loadInstanceRep (  )  [private]
void GLC_3dxmlToWorld::loadLocalRepresentations (  )  [private]
void GLC_3dxmlToWorld::loadLOD ( GLC_Mesh pMesh  )  [private]
void GLC_3dxmlToWorld::loadManifest (  )  [private]
void GLC_3dxmlToWorld::loadMaterialDef ( const MaterialRef materialRef  )  [private]
GLC_Matrix4x4 GLC_3dxmlToWorld::loadMatrix ( const QString &  stringMatrix  )  [private]

Load Matrix.

Definition at line 1064 of file glc_3dxmltoworld.cpp.

Referenced by loadInstance3D().

void GLC_3dxmlToWorld::loadPolyline ( GLC_Mesh pMesh  )  [private]

Load polyline.

Definition at line 1333 of file glc_3dxmltoworld.cpp.

References GLC_Geometry::addPolyline(), and readAttribute().

Referenced by createReferenceRep(), and loadCurrentExtRep().

void GLC_3dxmlToWorld::loadProductStructure (  )  [private]
void GLC_3dxmlToWorld::loadReference3D (  )  [private]
void GLC_3dxmlToWorld::loadReferenceRep (  )  [private]

Load a Reference representation.

Definition at line 684 of file glc_3dxmltoworld.cpp.

References m_ReferenceRepHash, and readAttribute().

Referenced by loadProductStructure().

GLC_Material * GLC_3dxmlToWorld::loadSurfaceAttributes (  )  [private]

Load surface attributes.

Definition at line 1365 of file glc_3dxmltoworld.cpp.

References checkForXmlError(), endElementNotReached(), getMaterial(), m_MaterialHash, m_pStreamReader, and readAttribute().

Referenced by loadFace(), and loadLOD().

GLC_Texture * GLC_3dxmlToWorld::loadTexture ( QString  fileName  )  [private]

Try to construct a texture with the specified fileName.

Definition at line 2073 of file glc_3dxmltoworld.cpp.

References glc::builtArchiveString(), clear(), GLC_FileFormatException::FileNotSupported, m_FileName, m_IsInArchive, m_ListOfAttachedFileName, m_p3dxmlArchive, and m_pQGLContext.

Referenced by loadMaterialDef().

QString GLC_3dxmlToWorld::readAttribute ( const QString &  name,
bool  required = false 
) [private]
bool GLC_3dxmlToWorld::setStreamReaderToFile ( QString  fileName,
bool  test = false 
) [private]
bool GLC_3dxmlToWorld::startElementNotReached ( const QString &  element  )  [inline, private]

Return true if the start of specified element is not reached.

Definition at line 209 of file glc_3dxmltoworld.h.

Referenced by createReferenceRep(), goToElement(), and loadCurrentExtRep().


Member Data Documentation

The Structure Link Hash Table.

Definition at line 294 of file glc_3dxmltoworld.h.

Referenced by createUnfoldedTree(), and loadInstance3D().

The current file name.

Definition at line 339 of file glc_3dxmltoworld.h.

Referenced by checkForXmlError(), createReferenceRep(), loadCurrentExtRep(), and setStreamReaderToFile().

Externam reference hash table.

Definition at line 306 of file glc_3dxmltoworld.h.

Referenced by loadExternalRef3D(), and loadProductStructure().

The list of extern representation link.

Definition at line 321 of file glc_3dxmltoworld.h.

Referenced by loadExternRepresentations(), and loadInstanceRep().

QString GLC_3dxmlToWorld::m_FileName [private]

Instance of Hash table.

Definition at line 297 of file glc_3dxmltoworld.h.

Referenced by loadInstance3D(), and loadProductStructure().

Instance of ext ref hash table.

Definition at line 303 of file glc_3dxmltoworld.h.

Referenced by loadInstance3D(), and loadProductStructure().

Flag to know if the 3dxml is in an archive.

Definition at line 312 of file glc_3dxmltoworld.h.

Referenced by create3DrepFrom3dxmlRep(), createWorldFrom3dxml(), loadExternalRef3D(), loadExternRepresentations(), loadTexture(), and setStreamReaderToFile().

The list of attached file name.

Definition at line 336 of file glc_3dxmltoworld.h.

Referenced by loadExternalRef3D(), loadExternRepresentations(), loadTexture(), and setStreamReaderToFile().

Flag indicate the loading method.

Definition at line 333 of file glc_3dxmltoworld.h.

Referenced by createWorldFrom3dxml(), loadExternalRef3D(), and loadExternRepresentations().

The list of local representation link.

Definition at line 318 of file glc_3dxmltoworld.h.

Referenced by loadInstanceRep(), and loadLocalRepresentations().

Hash table of material.

Definition at line 309 of file glc_3dxmltoworld.h.

Referenced by clearMaterialHash(), factorizeMaterial(), getMaterial(), loadMaterialDef(), and loadSurfaceAttributes().

QHash<unsigned int, OccurenceAttrib*> GLC_3dxmlToWorld::m_OccurenceAttrib [private]

Hash table of occurence specific attributes.

Definition at line 345 of file glc_3dxmltoworld.h.

Referenced by loadDefaultViewProperty(), loadProductStructure(), and ~GLC_3dxmlToWorld().

QuaZipFile* GLC_3dxmlToWorld::m_p3dxmlFile [private]

The Quazip file (Entry or archive).

Definition at line 279 of file glc_3dxmltoworld.h.

Referenced by clear(), loadManifest(), setStreamReaderToFile(), and ~GLC_3dxmlToWorld().

The current file (if there is no archive).

Definition at line 282 of file glc_3dxmltoworld.h.

Referenced by clear(), setStreamReaderToFile(), and ~GLC_3dxmlToWorld().

The 3DREP current material.

Definition at line 327 of file glc_3dxmltoworld.h.

Referenced by loadCurrentExtRep(), loadFace(), and loadLOD().

const QGLContext* GLC_3dxmlToWorld::m_pQGLContext [private]

OpenGL Context.

Definition at line 267 of file glc_3dxmltoworld.h.

Referenced by loadTexture().

QXmlStreamReader* GLC_3dxmlToWorld::m_pStreamReader [private]

The World to return.

Definition at line 288 of file glc_3dxmltoworld.h.

Referenced by clear(), createUnfoldedTree(), createWorldFrom3dxml(), loadProductStructure(), and loadReference3D().

The Reference representation hash table.

Definition at line 315 of file glc_3dxmltoworld.h.

Referenced by loadExternRepresentations(), loadLocalRepresentations(), and loadReferenceRep().

QString GLC_3dxmlToWorld::m_RootName [private]

The root Name of the 3dxml file.

Definition at line 285 of file glc_3dxmltoworld.h.

Referenced by createWorldFrom3dxml(), loadManifest(), and loadProductStructure().

The set of ext ref to load.

Definition at line 300 of file glc_3dxmltoworld.h.

Referenced by loadExternalRef3D(), and loadInstance3D().

The set of ext rep to load.

Definition at line 324 of file glc_3dxmltoworld.h.

QHash<QString, QString> GLC_3dxmlToWorld::m_TextureImagesHash [private]

The image file hash table.

Definition at line 330 of file glc_3dxmltoworld.h.

Referenced by loadCatRepImage(), and loadMaterialDef().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005 Laurent Ribon