$search
Protected Member Functions | |
boolean | loadModel (String filename) |
Private Member Functions | |
void | parseNode (Node node, Group currGroup, ArrayList< BaseXform > transformations, Collada collada) |
Static Private Member Functions | |
static Appearance | getAppearance (Material mat, Collada collada) |
static String | getDaeLocation (String tmpPath) |
static String | getNodeValue (NodeList nList, LinkedList< String > nodeNames) |
static ArrayList< Vertex > | getVerticesOfMesh (Mesh m, List< Input > inputs, String type) |
static void | parseGeometry (Geometry g, Group currGroup, HashMap< String, String > instanceMaterial, ArrayList< BaseXform > transformations, Collada collada) |
static void | parseGeometryLine (Lines l, Group currGroup, HashMap< String, String > instanceMaterial, Collada collada, ArrayList< Vertex > vertices) |
static void | parseGeometryTriangle (Triangles t, Group currGroup, HashMap< String, String > instanceMaterial, Collada collada, ArrayList< Vertex > vertices, Mesh m) |
static float[][] | SourceToFloat (Source s) |
static void | useTransformation (Vertex vertex, ArrayList< BaseXform > transformations, boolean withTranslate) |
Private Attributes | |
String | textureBasePath = "" |
Connection between dae4j library and processing applet. Used to parse COLLADA (.dae) files and draw them on the processing applet. Also .kmz files are supported. These are exctracted to tmp dir and the dae file init will be loaded.
Definition at line 70 of file ColladaParser.java.
static Appearance edu::tum::cs::vis::model::parser::ColladaParser::getAppearance | ( | Material | mat, | |
Collada | collada | |||
) | [inline, static, private] |
Returns the instantiated Apperance by reading the material information from mat.
mat | Collada Material which holds information about the appearance | |
collada | Collada structure |
Definition at line 81 of file ColladaParser.java.
static String edu::tum::cs::vis::model::parser::ColladaParser::getDaeLocation | ( | String | tmpPath | ) | [inline, static, private] |
Tries to determine the location of the .dae file when a .kmz file was extracted. The path to the .dae file is stored in the doc.kml file withing the zipped kmz.
tmpPath | Path to the extracted .kmz file |
Definition at line 163 of file ColladaParser.java.
static String edu::tum::cs::vis::model::parser::ColladaParser::getNodeValue | ( | NodeList | nList, | |
LinkedList< String > | nodeNames | |||
) | [inline, static, private] |
Searches in the given nList nodes tree for the node represented by nodeNames and returns the inner value of this node.
nList | the list of all nodes (returned by getElementsByTagName) | |
nodeNames | A linked list with the structure to search. The first name is the name of the root, the next name is the name of the child to search in the root and so on. |
Definition at line 224 of file ColladaParser.java.
static ArrayList<Vertex> edu::tum::cs::vis::model::parser::ColladaParser::getVerticesOfMesh | ( | Mesh | m, | |
List< Input > | inputs, | |||
String | type | |||
) | [inline, static, private] |
Get all vertices of mesh object m
in an array.
m | the mesh object | |
inputs | list of all vertices | |
type | type of vertices |
Definition at line 275 of file ColladaParser.java.
boolean edu::tum::cs::vis::model::parser::ColladaParser::loadModel | ( | String | filename | ) | [inline, protected, virtual] |
This function will be called from parseModel if the model isn't in the Buffer
filename | Physical file of model to parse |
Implements edu::tum::cs::vis::model::parser::ModelParser.
Definition at line 578 of file ColladaParser.java.
static void edu::tum::cs::vis::model::parser::ColladaParser::parseGeometry | ( | Geometry | g, | |
Group | currGroup, | |||
HashMap< String, String > | instanceMaterial, | |||
ArrayList< BaseXform > | transformations, | |||
Collada | collada | |||
) | [inline, static, private] |
Parse a geometry object from the collada structure
g | Geometry object to parse | |
instanceMaterial | List of all known materials which may be referred by the geometry object | |
transformations | List of all parent transformations which should be applied to this and it's subsequent geometries | |
collada | the collada Structure |
Definition at line 310 of file ColladaParser.java.
static void edu::tum::cs::vis::model::parser::ColladaParser::parseGeometryLine | ( | Lines | l, | |
Group | currGroup, | |||
HashMap< String, String > | instanceMaterial, | |||
Collada | collada, | |||
ArrayList< Vertex > | vertices | |||
) | [inline, static, private] |
Parse a line from a geometry object from the collada structure.
l | the line object to parse | |
m | parent mesh for the line | |
instanceMaterial | List of all known materials which may be referred by the geometry object | |
transformations | List of all parent transformations which should be applied to this and it's subsequent geometries | |
collada | the collada Structure |
Definition at line 355 of file ColladaParser.java.
static void edu::tum::cs::vis::model::parser::ColladaParser::parseGeometryTriangle | ( | Triangles | t, | |
Group | currGroup, | |||
HashMap< String, String > | instanceMaterial, | |||
Collada | collada, | |||
ArrayList< Vertex > | vertices, | |||
Mesh | m | |||
) | [inline, static, private] |
Parse a triangle from a geometry object from the collada structure.
t | the line object to parse | |
m | parent mesh for the line | |
instanceMaterial | List of all known materials which may be referred by the geometry object | |
transformations | List of all parent transformations which should be applied to this and it's subsequent geometries | |
collada | the collada Structure |
Definition at line 422 of file ColladaParser.java.
void edu::tum::cs::vis::model::parser::ColladaParser::parseNode | ( | Node | node, | |
Group | currGroup, | |||
ArrayList< BaseXform > | transformations, | |||
Collada | collada | |||
) | [inline, private] |
Parses a node from the collada structure and stores the triangles and lines information.
node | Node to parse (may have other sub-Nodes => called recursively) | |
transformations | List of all parent transformations which should be applied to this and it's subsequent nodes | |
collada | the collada Structure |
Definition at line 658 of file ColladaParser.java.
static float [][] edu::tum::cs::vis::model::parser::ColladaParser::SourceToFloat | ( | Source | s | ) | [inline, static, private] |
Convert a collada source item to the corresponding float array
the | collada source |
Definition at line 526 of file ColladaParser.java.
static void edu::tum::cs::vis::model::parser::ColladaParser::useTransformation | ( | Vertex | vertex, | |
ArrayList< BaseXform > | transformations, | |||
boolean | withTranslate | |||
) | [inline, static, private] |
Applies the list of transformations in the correct order to the vertex
vertex | vertex to apply the transformation onto | |
transformations | list of transformations to apply |
Definition at line 543 of file ColladaParser.java.
String edu::tum::cs::vis::model::parser::ColladaParser::textureBasePath = "" [private] |
Base path of the texture files. In the dae file are only relative paths. So we need a base. If kmz is parsed, this will be set automatically
Definition at line 575 of file ColladaParser.java.