opentl::core::parser::COLLADAParser Class Reference

Inherits opentl::core::parser::XMLParser.

List of all members.

Public Member Functions

 COLLADAParser ()
void output (std::vector< opentl::core::cvdata::ShapeAppearance::Face * > faces)
void parseEffect (XMLTag *effect, opentl::core::cvdata::ShapeAppearance::Material *m, std::string *filepath)
void parseGeometry (XMLTag *geometry, opentl::core::cvdata::ShapeAppearance *shape, int linkId)
void parseLibrary_visual_scenes (XMLTag *library_visual_scenes, std::string *filepath, int linkId)
void parseLines (XMLTag *lines, opentl::core::cvdata::ShapeAppearance *shape, int linkId)
 Parse a mesh of line segments of a collada document and put them into a polygon Attention: This function expects that all line segments lie in a single plane!
void parseMaterial (XMLTag *material, opentl::core::cvdata::ShapeAppearance::Material *m, std::string *filepath)
void parseNode (XMLTag *node, math::Transform transform, std::string *filepath, int linkId)
void parseNormal (XMLTag *source, std::vector< math::Vector4 > &plist)
void parsePolygons (XMLTag *polygons, opentl::core::cvdata::ShapeAppearance *shape, int linkdId)
void parsePolylist (XMLTag *polylist, opentl::core::cvdata::ShapeAppearance *shape, int linkId, int cntFacepoints=-1)
void parseTex (XMLTag *source, std::vector< opentl::core::cvdata::ShapeAppearance::TexCoord > &plist)
void parseTexture (XMLTag *texture, opentl::core::cvdata::ShapeAppearance::Material *m, std::string *filepath)
void parseTriangles (XMLTag *triangles, opentl::core::cvdata::ShapeAppearance *shape, int linkId)
void parseVertices (XMLTag *vertices, std::vector< math::Vector4 > &plist)
int readFile (opentl::core::cvdata::ShapeAppearance *shape, std::string filename, std::string filepath="", int linkId=0)
virtual ~COLLADAParser ()

Protected Attributes

opentl::core::cvdata::ShapeAppearancem_shape


Constructor & Destructor Documentation

opentl::core::parser::COLLADAParser::COLLADAParser (  ) 

constructor

virtual opentl::core::parser::COLLADAParser::~COLLADAParser (  )  [virtual]

deconstructor


Member Function Documentation

void opentl::core::parser::COLLADAParser::output ( std::vector< opentl::core::cvdata::ShapeAppearance::Face * >  faces  ) 

printf scanned model structure to screen

void opentl::core::parser::COLLADAParser::parseEffect ( XMLTag effect,
opentl::core::cvdata::ShapeAppearance::Material m,
std::string *  filepath 
)

parse effect of collada document

Parameters:
effect effect xml tag
m buffer to store result
filepath Full path of COLLADA document

void opentl::core::parser::COLLADAParser::parseGeometry ( XMLTag geometry,
opentl::core::cvdata::ShapeAppearance shape,
int  linkId 
)

parse geometry cvdata of a collada document

Parameters:
geometry xml tag including geometry cvdata
shape pointer to ShapeAppearance class to store data

void opentl::core::parser::COLLADAParser::parseLibrary_visual_scenes ( XMLTag library_visual_scenes,
std::string *  filepath,
int  linkId 
)

parse library visual scenes of a collada document

Parameters:
library_visual_scenes xml tag including a library_visual_scene
filepath Full path of COLLADA document

void opentl::core::parser::COLLADAParser::parseLines ( XMLTag lines,
opentl::core::cvdata::ShapeAppearance shape,
int  linkId 
)

Parse a mesh of line segments of a collada document and put them into a polygon Attention: This function expects that all line segments lie in a single plane!

Parameters:
lines xml tag including lines
shape cvdata class to store located triangles

void opentl::core::parser::COLLADAParser::parseMaterial ( XMLTag material,
opentl::core::cvdata::ShapeAppearance::Material m,
std::string *  filepath 
)

parse material

Parameters:
material material xml tag containing material data
m buffer for result

void opentl::core::parser::COLLADAParser::parseNode ( XMLTag node,
math::Transform  transform,
std::string *  filepath,
int  linkId 
)

parse nodes of a collada document

Parameters:
node xml tag including a node
transform matrix to translate, rotate and scale all the points of a node
filepath Full path of COLLADA document

void opentl::core::parser::COLLADAParser::parseNormal ( XMLTag source,
std::vector< math::Vector4 > &  plist 
)

parse normal vectors of a collada document

Parameters:
source xml tag including normals
plist cvdata structure to store located normal vectors

void opentl::core::parser::COLLADAParser::parsePolygons ( XMLTag polygons,
opentl::core::cvdata::ShapeAppearance shape,
int  linkdId 
)

parse a mesh of polygons of a collada document

Parameters:
polygons xml tag including polygons
shape cvdata class to store located polygons

void opentl::core::parser::COLLADAParser::parsePolylist ( XMLTag polylist,
opentl::core::cvdata::ShapeAppearance shape,
int  linkId,
int  cntFacepoints = -1 
)

parse a mesh of polygons of a collada document

Parameters:
polylist xml tag including polygons
shape cvdata class to store located polygons
cntFacepoints number of points for faces. If this number is specified dynamically in the COLLADA document set this value to -1

void opentl::core::parser::COLLADAParser::parseTex ( XMLTag source,
std::vector< opentl::core::cvdata::ShapeAppearance::TexCoord > &  plist 
)

parse texture s and t infos of a collada document

Parameters:
source xml tag including texture information
plist cvdata structure to store located textures

void opentl::core::parser::COLLADAParser::parseTexture ( XMLTag texture,
opentl::core::cvdata::ShapeAppearance::Material m,
std::string *  filepath 
)

parse texture points of a collada document

Parameters:
texture xml tag for texture
m material to store texture
filepath Full path of COLLADA document

void opentl::core::parser::COLLADAParser::parseTriangles ( XMLTag triangles,
opentl::core::cvdata::ShapeAppearance shape,
int  linkId 
)

parse a mesh of triangles of a collada document

Parameters:
triangles xml tag including triangles
shape cvdata class to store located triangles

void opentl::core::parser::COLLADAParser::parseVertices ( XMLTag vertices,
std::vector< math::Vector4 > &  plist 
)

parse vertices of a collada document

Parameters:
source xml tag including vertices
plist cvdata structure to store located vertices

int opentl::core::parser::COLLADAParser::readFile ( opentl::core::cvdata::ShapeAppearance shape,
std::string  filename,
std::string  filepath = "",
int  linkId = 0 
)

read a COLLADA document and convert cvdata into physical model structure

Parameters:
shape cvdata class to store shape and appearance information
filename Name of COLLADA document
filepath Full path of COLLADA document (defaults to "")
Returns:
OK = 1, ERROR = -1


Member Data Documentation

store pointer to class storing shape & appearance information


Generated on Thu Jun 10 21:08:09 2010 for OpenTL by  doxygen 1.5.8