ch.dieseite.colladaloader.asmbeans

## Class Sketchup

- java.lang.Object
- - ch.dieseite.colladaloader.asmbeans.Sketchup

-     public class Sketchup
      extends java.lang.Object

  The handler for proprietary issues. It contains static methods:

- they work for Blender only
- is defined in LinkingSchema.xml
- is invoked by DataAssembler
- doing small defined jobs
- do not change behavior to other methods but invoke order may be important

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Sketchup()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Color` | `createColor(java.util.ArrayList<DataAssembler.Param> p)` creates a Color if <color> exist converts float values from 0-1(Sketchup) to 0-255(processing)
    `static java.util.ArrayList<Triangle>` | `createTriangles(java.util.ArrayList<DataAssembler.Param> p)` creates Triangles based on this shape.
    `static void` | `iterate_geometry_symbol_Binds_and_Link(java.util.ArrayList<DataAssembler.Param> p)` iterates all material/symbol binds (defined in <visual_scene>) they belong to geometry id of current shape (triangle or line).
    `static Common.CoordData` | `parseCoordData(java.util.ArrayList<DataAssembler.Param> p)` parses raw coord data from xml (triangles/lines tag) to 'java readable' data
    `static void` | `sop(java.util.ArrayList<DataAssembler.Param> p)`

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

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

- - ### Constructor Detail

    - #### Sketchup

          public Sketchup()

  - ### Method Detail

    - #### sop

          public static void sop(java.util.ArrayList<DataAssembler.Param> p)

    - #### iterate_geometry_symbol_Binds_and_Link

          public static void iterate_geometry_symbol_Binds_and_Link(java.util.ArrayList<DataAssembler.Param> p)

      iterates all material/symbol binds (defined in <visual_scene>) they belong to geometry id of current shape (triangle or line). Because symbol id's are not unique this method picks up a set of symbol id's from binds which is mapped to a Geometry unique id from current shape. Then follows a equal check (i.e. triangle#material <-> instance_geometry#symbol) and link
      Parameters:
        `1.` - a current Shape from <geometry>
        `2.` - geometry_symbol_Binds from <visual_scene>
        `3.` - parent tag of shape (<geometry>)

    - #### parseCoordData

          public static Common.CoordData parseCoordData(java.util.ArrayList<DataAssembler.Param> p)

      parses raw coord data from xml (triangles/lines tag) to 'java readable' data
      Parameters:
        `a` - triangles/lines tag (entry)
        `arg1` - = path to input tag semantic vertex
        `arg2` - = path to input tag semantic texture coords
        `arg3` - = path to float_array tag with vertex coords
        `arg4` - = path to float_array tag with texture coords
        `arg5` - = path to p tag
      Returns:
        coord raw data

    - #### createTriangles

          public static java.util.ArrayList<Triangle> createTriangles(java.util.ArrayList<DataAssembler.Param> p)

      creates Triangles based on this shape. The coordinates is converted from Sketchup to Processing as follows:

      textureProcessing x = textureSketchup x * picture.width

      textureProcessing y = picture.height - textureSketchup y * picture.height

      processing x = Sketchup x

      processing y = Sketchup -z

      processing z = Sketchup -y

      Parameters:
        `1.` - Raw coords (vertex+texture)
        `2.` - a Texture image
        `3.` - a Color (converted to processing)
        `4.` - the Collada interface
      Returns:
        a sublist for this polylist

    - #### createColor

          public static Color createColor(java.util.ArrayList<DataAssembler.Param> p)

      creates a Color if <color> exist converts float values from 0-1(Sketchup) to 0-255(processing)
      Parameters:
        `a` - <lines/triangles> tag from geometry with colorargs
      Returns:
        a color. if no valid colorargs then a dummy color is generated