Public Member Functions | |
DrawObject (final int numberOfEdges) | |
boolean | equals (Object o) |
Appearance | getAppearance () |
Vector3f[] | getEdges () |
Vertex[] | getPosition () |
void | scale (float factor) |
void | setAppearance (Appearance appearance) |
void | setPosition (Vertex[] position) |
void | transform (float[][] matrix) |
void | updateCentroid () |
Static Public Member Functions | |
static float[][] | MatrixMultiply (float mat1[][], float mat2[][]) |
Protected Member Functions | |
void | applyColor (PGraphics g, DrawSettings drawSettings) |
Protected Attributes | |
Appearance | appearance |
Vertex | position [] |
Static Private Attributes | |
static final long | serialVersionUID = -1917773602783043823L |
Base class for all drawable model parts (Line / Triangle)
Definition at line 22 of file DrawObject.java.
edu.tum.cs.vis.model.util.DrawObject.DrawObject | ( | final int | numberOfEdges | ) | [inline] |
Constructor which initializes position array to numberOfEdges
items.
Definition at line 70 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.applyColor | ( | PGraphics | g, |
DrawSettings | drawSettings | ||
) | [inline, protected] |
Apply the color of appearance member to the PApplet. Called before drawing a DrawObject.
g | Graphics to draw on |
drawSettings | If != null this draw settings are used instead of the color from appearance |
Definition at line 82 of file DrawObject.java.
boolean edu.tum.cs.vis.model.util.DrawObject.equals | ( | Object | o | ) | [inline] |
Definition at line 154 of file DrawObject.java.
Definition at line 179 of file DrawObject.java.
Vector3f [] edu.tum.cs.vis.model.util.DrawObject.getEdges | ( | ) | [inline] |
Get edge vectors. Each vector points from one edge point to the next one. For a triangle you will get 3 edges representing the outer line.
Definition at line 261 of file DrawObject.java.
Vertex [] edu.tum.cs.vis.model.util.DrawObject.getPosition | ( | ) | [inline] |
Definition at line 186 of file DrawObject.java.
static float [][] edu.tum.cs.vis.model.util.DrawObject.MatrixMultiply | ( | float | mat1[][], |
float | mat2[][] | ||
) | [inline, static] |
Multiplies the two given matrix. Must have correct size for multiplying.
mat1 | matrix 1 |
mat2 | matrix 2 |
Definition at line 37 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.scale | ( | float | factor | ) | [inline] |
Scales all coordinates of the position points by the given factor
factor | The Scale factor |
Definition at line 196 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.setAppearance | ( | Appearance | appearance | ) | [inline] |
appearance | the appearance to set |
Definition at line 209 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.setPosition | ( | Vertex[] | position | ) | [inline] |
Sets the position array of this object and calls updateNormalVector
position | new position of this object. |
Definition at line 219 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.transform | ( | float | matrix[][] | ) | [inline] |
Apply 4x4 transformation matrix to the position vectors of this object
matrix | the transformation matrix |
Definition at line 230 of file DrawObject.java.
void edu.tum.cs.vis.model.util.DrawObject.updateCentroid | ( | ) | [inline] |
Recalculates the and centroid. Called automatically when calling setPosition
. If you modify the position array directly, call this afterwards.
Reimplemented in edu.tum.cs.vis.model.util.Triangle.
Definition at line 249 of file DrawObject.java.
Color or texture of the object
Definition at line 62 of file DrawObject.java.
Vertex edu.tum.cs.vis.model.util.DrawObject.position[] [protected] |
the position points of the object
Definition at line 57 of file DrawObject.java.
final long edu.tum.cs.vis.model.util.DrawObject.serialVersionUID = -1917773602783043823L [static, private] |
auto generated
Reimplemented in edu.tum.cs.vis.model.util.Triangle, and edu.tum.cs.vis.model.util.Line.
Definition at line 26 of file DrawObject.java.