Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

AC3D::AC3DObject Class Reference

#include <ac3dobject.h>

List of all members.

Public Member Functions

 AC3DObject (stringstream &data)
void AddKid (AC3DObject *kid)
bool IsTranslucent () const
string GetName () const
unsigned int GetNumberKid () const
const string & GetTextureFile () const
const float * GetLoc () const
const vector< Vertex > & GetVVertex () const
const vector< AC3DSurface * > & GetVPSurface () const
const vector< AC3DObject * > & GetVPObject () const
void Parse (stringstream &data)
string ToStr () const

Private Member Functions

void ac3dSetDefault ()
void ac3dobjectParseVertex (unsigned int nb, stringstream &data, char *buffer)
void ac3dobjectParseSurface (unsigned int nb, stringstream &data, char *buffer)

Private Attributes

OBJECT_TYPE type
 Object's type.
string strName
 Content of the "name" command.
int iData
 Not used.
string strTexture
 Texture file name.
float fTexRep [2]
 Default (1, 1). The texture repeat values for the tiling of a texture on an object's surfaces.
float fRot [9]
 Rotation matrix.
float fLoc [3]
 Translation vector.
float fCrease
 Angle in degrees for calculating normals for smoothing.
string strURL
 The URL of the file.
uint uiNumVert
 Number of vertices in this object.
vector< VertexvVertex
 Table of vertices.
uint uiNumSurf
 Number of surfaces of this object.
vector< AC3DSurface * > vpSurface
 Table of surfaces.
uint uiKids
 Number of kids.
vector< AC3DObject * > vpObject
 Table of child objects.


Detailed Description

Author:
Duong-Khang NGUYEN

Definition at line 54 of file ac3dobject.h.


Member Function Documentation

void AC3D::AC3DObject::AddKid AC3DObject kid  ) 
 

Add a new kid to this object

Definition at line 84 of file ac3dobject.cpp.

const float * AC3D::AC3DObject::GetLoc  )  const
 

Returns:
The "location" translation vector

Definition at line 126 of file ac3dobject.cpp.

References fLoc.

string AC3D::AC3DObject::GetName  )  const
 

Returns:
The content of the name command

Definition at line 102 of file ac3dobject.cpp.

References strName.

unsigned int AC3D::AC3DObject::GetNumberKid  )  const
 

Returns:
The number of kids which may differ from the size of the vector returned by GetVPObject() during loading process.

Definition at line 110 of file ac3dobject.cpp.

References uiKids.

const string & AC3D::AC3DObject::GetTextureFile  )  const
 

Returns:
The file name of the texture

Definition at line 118 of file ac3dobject.cpp.

References strTexture.

const vector< AC3DObject * > & AC3D::AC3DObject::GetVPObject  )  const
 

Returns:
The constant reference to the vector which contains all the child objects

Definition at line 150 of file ac3dobject.cpp.

References vpObject.

const vector< AC3DSurface * > & AC3D::AC3DObject::GetVPSurface  )  const
 

Returns:
The constant reference to the vector which contains all the pointers to the surface of the object

Definition at line 142 of file ac3dobject.cpp.

References vpSurface.

const vector< Vertex > & AC3D::AC3DObject::GetVVertex  )  const
 

Returns:
The constant reference to the vector which contains all the vertex of the object

Definition at line 134 of file ac3dobject.cpp.

References vVertex.

bool AC3D::AC3DObject::IsTranslucent  )  const
 

Decode the "name" to determine whether the object is translucent or not

Returns:
True if the object is translucent

Definition at line 94 of file ac3dobject.cpp.

void AC3D::AC3DObject::Parse stringstream &  data  ) 
 

Parse and extract the data from the given stream

Definition at line 158 of file ac3dobject.cpp.

References strName, strTexture, strURL, and type.


The documentation for this class was generated from the following files:
Generated on Sat Nov 11 10:21:11 2006 for OpenCity by  doxygen 1.4.2