Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes
edu.tum.cs.vis.model.util.DrawObject Class Reference
Inheritance diagram for edu.tum.cs.vis.model.util.DrawObject:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Base class for all drawable model parts (Line / Triangle)

Author:
Stefan Profanter

Definition at line 22 of file DrawObject.java.


Constructor & Destructor Documentation

edu.tum.cs.vis.model.util.DrawObject.DrawObject ( final int  numberOfEdges) [inline]

Constructor which initializes position array to numberOfEdges items.

Parameters:
numberOfEdgesnumber of edges. Line: 2, Triangle: 3

Definition at line 70 of file DrawObject.java.


Member Function Documentation

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.

Parameters:
gGraphics to draw on
drawSettingsIf != 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.

Returns:
the appearance

Definition at line 179 of file DrawObject.java.

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.

Returns:
List of edges

Definition at line 261 of file DrawObject.java.

Returns:
the position

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.

Parameters:
mat1matrix 1
mat2matrix 2
Returns:
the result of multiplication

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

Parameters:
factorThe Scale factor

Definition at line 196 of file DrawObject.java.

Parameters:
appearancethe appearance to set

Definition at line 209 of file DrawObject.java.

Sets the position array of this object and calls updateNormalVector

Parameters:
positionnew 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

Parameters:
matrixthe transformation matrix

Definition at line 230 of file DrawObject.java.

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.


Member Data Documentation

Color or texture of the object

Definition at line 62 of file DrawObject.java.

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.


The documentation for this class was generated from the following file:


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Sat Dec 28 2013 17:09:45