$search

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 ()
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

Detailed Description

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

Author:
Stefan Profanter

Definition at line 21 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:
numberOfEdges number of edges. Line: 2, Triangle: 3

Definition at line 69 of file DrawObject.java.


Member Function Documentation

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.

Parameters:
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]
Returns:
the appearance

Definition at line 147 of file DrawObject.java.

Vertex [] edu::tum::cs::vis::model::util::DrawObject::getPosition (  )  [inline]
Returns:
the position

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.

Parameters:
mat1 matrix 1
mat2 matrix 2
Returns:
the result of multiplication

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

Parameters:
factor The Scale factor

Definition at line 164 of file DrawObject.java.

void edu::tum::cs::vis::model::util::DrawObject::setAppearance ( Appearance  appearance  )  [inline]
Parameters:
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

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

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


Member Data Documentation

Color or texture of the object

Definition at line 61 of file DrawObject.java.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Tue Mar 5 12:15:34 2013