colladaLoader
Class ColladaLoader

java.lang.Object
  extended by colladaLoader.ColladaLoader

public class ColladaLoader
extends java.lang.Object

Lucerne University of Applied Sciences and Arts http://www.hslu.ch

This source is free; you can redistribute it and/or modify it under the terms of the GNU General Public License and by nameing of the originally author

Version:
1.1
Author:
Markus Zimmermann http://www.die-seite.ch

Field Summary
private  processing.core.PApplet applet
           
private  Line[] lines
           
private static ColladaLoader loader
           
private  Triangle[] triangles
           
 
Constructor Summary
private ColladaLoader(java.lang.String filename, processing.core.PApplet applet)
          is a private constructor...please use getInstance()
 
Method Summary
 void draw()
           
static ColladaLoader getInstance(java.lang.String filename, processing.core.PApplet applet)
          This Methode instantiates the Collada-Loader and prepares the triangles and lines for further use
 Line[] getLines()
           
 Triangle[] getTriangles()
           
 void rotate(float radiant, char axis)
          Rotates the Model in X,Y,or Z Axis
 void scale(float factor)
          makes the model smaller or bigger
 void shift(float len, char axis)
          shifts the model along the axis x,y or z
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loader

private static ColladaLoader loader

triangles

private Triangle[] triangles

lines

private Line[] lines

applet

private processing.core.PApplet applet
Constructor Detail

ColladaLoader

private ColladaLoader(java.lang.String filename,
                      processing.core.PApplet applet)
is a private constructor...please use getInstance()

Parameters:
the - Filename (either 'foo.dae' or 'foo.kmz')
the - main applet of processing (if you'r shure that your file contains no texture and you won't use the draw-methode then leave it null)
Method Detail

getInstance

public static ColladaLoader getInstance(java.lang.String filename,
                                        processing.core.PApplet applet)
This Methode instantiates the Collada-Loader and prepares the triangles and lines for further use

Parameters:
the - Filename (either 'foo.dae' or 'foo.kmz'
the - main applet of processing (if you'r shure that your file contains no texture and you won't use the draw-methode then leave it null)
Returns:
a ColladaLoader

draw

public void draw()

scale

public void scale(float factor)
makes the model smaller or bigger

Parameters:
factor - < 1.0f = smaller, factor > 1.0f = bigger

shift

public void shift(float len,
                  char axis)
shifts the model along the axis x,y or z

Parameters:
length - in pixels
valid - charcters for the axis are: 'x','y','z'

rotate

public void rotate(float radiant,
                   char axis)
Rotates the Model in X,Y,or Z Axis

Parameters:
radiant - from 0 to 2*PI
valid - charcters for the axis are: 'x','y','z'

getLines

public Line[] getLines()

getTriangles

public Triangle[] getTriangles()