ch.dieseite.colladaloader.wrappers

## Class ColladaModel

- java.lang.Object
- - ch.dieseite.colladaloader.wrappers.ColladaModel

- All Implemented Interfaces:
    DataAssembler.LoadingListener, java.io.Serializable

      public class ColladaModel
      extends java.lang.Object
      implements DataAssembler.LoadingListener, java.io.Serializable

  This class holds all 3D data and supports transform functions

  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:
    3.1
  Author:
    Markus Zimmermann http://www.die-seite.ch
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private PApplet` | `applet`
    `private java.util.ArrayList<Line>` | `lines`
    `private java.util.ArrayList<Triangle>` | `triangles`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColladaModel(PApplet applet)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `draw()` Draws the model using Processing P3D renderer.
    `void` | `draw2D()` Draws collada using Processing default 2D renderer
    `java.util.ArrayList<Line>` | `getLines()` returns all parsed lines or grid structures from dae file
    `java.util.ArrayList<Triangle>` | `getTriangles()` returns all parsed triangles from dae file
    `void` | `linesParsed(java.util.ArrayList<Line> lines)` callback fired by any Class in asmbeans package
    `void` | `rotate(float radiant, char axis)` Rotates the model (not the view) in X,Y,or Z Axis
    `void` | `scale(float factor)` makes the model (not the view) smaller or bigger
    `void` | `shift(float len, char axis)` shifts the model (not the view) along the axis x,y or z
    `void` | `trianglesParsed(java.util.ArrayList<Triangle> triangles)` callback fired by any Class in asmbeans package

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### triangles

          private java.util.ArrayList<Triangle> triangles

    - #### lines

          private java.util.ArrayList<Line> lines

    - #### applet

          private PApplet applet

  - ### Constructor Detail

    - #### ColladaModel

          public ColladaModel(PApplet applet)

      Parameters:
        `current` - Processing sketch

  - ### Method Detail

    - #### getTriangles

          public java.util.ArrayList<Triangle> getTriangles()

      returns all parsed triangles from dae file
      Returns:

    - #### getLines

          public java.util.ArrayList<Line> getLines()

      returns all parsed lines or grid structures from dae file
      Returns:

    - #### trianglesParsed

          public void trianglesParsed(java.util.ArrayList<Triangle> triangles)

      callback fired by any Class in asmbeans package
      Specified by:
        `trianglesParsed` in interface `DataAssembler.LoadingListener`

    - #### linesParsed

          public void linesParsed(java.util.ArrayList<Line> lines)

      callback fired by any Class in asmbeans package
      Specified by:
        `linesParsed` in interface `DataAssembler.LoadingListener`

    - #### draw

          public void draw()

      Draws the model using Processing P3D renderer.

      The source code of this method can be used as drawing example if user want to customize

      .

      This is a untested part because software developers platform crashed on actual P3D/P2D version so he was forced to use the GLAdapter instead

    - #### draw2D

          public void draw2D()

      Draws collada using Processing default 2D renderer

    - #### scale

          public void scale(float factor)

      makes the model (not the view) smaller or bigger
      Parameters:
        `factor` - value < 1.0f = smaller, value > 1.0f = bigger

    - #### shift

          public void shift(float len,
                            char axis)

      shifts the model (not the view) along the axis x,y or z
      Parameters:
        `len` - (in pixels)
        `axis` - valid characters for the axis is: 'x','y' or 'z'

    - #### rotate

          public void rotate(float radiant,
                             char axis)

      Rotates the model (not the view) in X,Y,or Z Axis
      Parameters:
        `radiant` - from 0 to 2*PI
        `axis` - valid characters for the axis is: 'x','y' or 'z'