public class Blender
extends java.lang.Object
The handler for proprietary issues. It contains static methods:
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
| Modifier and Type | Class and Description |
|---|---|
private static class |
Blender.CoordData
wrapper for parsed vertex/texcoord data
|
| Constructor and Description |
|---|
Blender() |
| 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(Blender) to 0-255(processing)
Note that blender put no material attribute to <lines> (stupid impl) so a dummy color is generated
|
static java.util.ArrayList<Triangle> |
createTriangles(java.util.ArrayList<DataAssembler.Param> p)
creates Triangles based on this polylist.
|
static Blender.CoordData |
parseCoordData(java.util.ArrayList<DataAssembler.Param> p)
parses raw coord data from xml (polylist tag) to 'java readable' data
|
static void |
sop(java.util.ArrayList<DataAssembler.Param> p) |
private static Point3D |
transform(Point3D vertex,
float[] matrix4x4)
Transforms a 3D Point with a 4x4 Matrix.
|
static void |
transformShapes(java.util.ArrayList<DataAssembler.Param> p)
Transforms all Vertex Coords of Lines and/or Triangles (a stupid idea of blender)
|
public static void sop(java.util.ArrayList<DataAssembler.Param> p)
public static Blender.CoordData parseCoordData(java.util.ArrayList<DataAssembler.Param> p)
aPolyList - tag (entry)arg1 - = path to input tag semantic vertexarg2 - = path to input tag semantic texture coordsarg3 - = path to float_array tag with vertex coordsarg4 - = path to float_array tag with texture coordsarg5 - = path to vcount tagarg6 - = path to p tagarg7 - = path to matrix tagpublic static java.util.ArrayList<Triangle> createTriangles(java.util.ArrayList<DataAssembler.Param> p)
creates Triangles based on this polylist. The coordinates is converted from Blender to Processing as follows: Note: convert is NOT COMPLETE: Vertex results must go through a 4x4 Matrix later
textureProcessing x = textureBlender x * picture.width
textureProcessing y = picture.height - textureBlender y * picture.height
processing x = Blender x
processing y = Blender -z
processing z = Blender -y
1. - Raw coords (vertex+texture)2. - a Texture image3. - a Color (converted to processing)4. - the Collada interfacepublic static Color createColor(java.util.ArrayList<DataAssembler.Param> p)
a - <PolyList> tag from geometry with colorargs and transparencyArgspublic static void transformShapes(java.util.ArrayList<DataAssembler.Param> p)
1: - ArrayList2: - ArrayList3: - CoordData