$search
Public Member Functions | |
DrawObject (final int numberOfEdges) | |
boolean | equals (Object o) |
Appearance | getAppearance () |
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, Color overrideColor) |
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 21 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 69 of file DrawObject.java.
void edu::tum::cs::vis::model::util::DrawObject::applyColor | ( | PGraphics | g, | |
Color | overrideColor | |||
) | [inline, protected] |
Apply the color of appearance member to the PApplet. Called before drawing a DrawObject.
g | Graphics to draw on | |
overrideColor | If != null this color is taken instead of the color from appearance |
Definition at line 81 of file DrawObject.java.
boolean edu::tum::cs::vis::model::util::DrawObject::equals | ( | Object | o | ) | [inline] |
Definition at line 122 of file DrawObject.java.
Appearance edu::tum::cs::vis::model::util::DrawObject::getAppearance | ( | ) | [inline] |
Definition at line 147 of file DrawObject.java.
Vertex [] edu::tum::cs::vis::model::util::DrawObject::getPosition | ( | ) | [inline] |
Definition at line 154 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 36 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 164 of file DrawObject.java.
void edu::tum::cs::vis::model::util::DrawObject::setAppearance | ( | Appearance | appearance | ) | [inline] |
appearance | the appearance to set |
Definition at line 177 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 187 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 198 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 217 of file DrawObject.java.
Color or texture of the object
Definition at line 61 of file DrawObject.java.
Vertex edu::tum::cs::vis::model::util::DrawObject::position[] [protected] |
the position points of the object
Definition at line 56 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::Line, and edu::tum::cs::vis::model::util::Triangle.
Definition at line 25 of file DrawObject.java.