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

List of all members.

Public Member Functions

void drawBoundingBox (PGraphics g)
void drawLines (PGraphics g, DrawSettings drawSettings)
void drawTriangles (PGraphics g, DrawSettings drawSettings)
void getAllTriangles (Collection< Triangle > triangles2)
float getDepth ()
float getHeight ()
void getIntersectedTriangles (final Point3f rayStart, final Point3f rayEnd, final ArrayList< IntersectedTriangle > intersectedTriangles)
ArrayList< LinegetLines ()
Float getMaxX ()
Float getMaxY ()
Float getMaxZ ()
Float getMinX ()
Float getMinY ()
Float getMinZ ()
String getTextureBasePath ()
List< TrianglegetTriangles ()
Set< VertexgetVertices ()
float getWidth ()
void resetMinMaxValues ()
void setLines (ArrayList< Line > lines)
void setTextureBasePath (String textureBasePath)
void setTriangles (ArrayList< Triangle > triangles)

Protected Attributes

Float maxX = null
Float maxY = null
Float maxZ = null
Float minX = null
Float minY = null
Float minZ = null

Private Member Functions

void setTextureImage ()

Private Attributes

ArrayList< Linelines = new ArrayList<Line>()
String textureBasePath
boolean texturesInitialized = false
ArrayList< Triangletriangles = new ArrayList<Triangle>()

Static Private Attributes

static final long serialVersionUID = -2761386921853967131L

Detailed Description

A Mesh contains list of Triangles and Lines which represent an Object.

See also:
Triangle
Line
Author:
Stefan Profanter

Definition at line 39 of file Mesh.java.


Member Function Documentation

void edu.tum.cs.vis.model.util.Mesh.drawBoundingBox ( PGraphics  g) [inline]

Draws the bounding box around the model with the current style

Parameters:
gGraphics context

Definition at line 96 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.drawLines ( PGraphics  g,
DrawSettings  drawSettings 
) [inline]

Draw the lines list to the applet

Parameters:
gApplet to draw on
drawSettingsoverride the draw color, texture (and other settings). Draw whole object in the given color if != null

Definition at line 118 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.drawTriangles ( PGraphics  g,
DrawSettings  drawSettings 
) [inline]

Draw the triangles list to the applet

Parameters:
gGraphics to draw on
drawSettingsoverride the draw color, texture (and other settings). Draw whole object in the given color if != null

Definition at line 134 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.getAllTriangles ( Collection< Triangle triangles2) [inline]

Add all triangles contained in this mesh to the provided collection.

Parameters:
triangles2Collection where all triangles of this mesh are added.

Definition at line 495 of file Mesh.java.

Returns the depth of the model by searching the biggest distance on the z-axis between the vectors.

Returns:
float as depth of the model

Definition at line 150 of file Mesh.java.

Returns the height of the model by searching the biggest distance on the y-axis between the vectors.

Returns:
float as height of the model

Definition at line 179 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.getIntersectedTriangles ( final Point3f  rayStart,
final Point3f  rayEnd,
final ArrayList< IntersectedTriangle intersectedTriangles 
) [inline]

Searches all triangles which intersect the given ray (rayStart, rayEnd) and adds them to intersectedTriangles. Not only the segment between rayStart and rayEnd is checked but the whole ray from -infinity to +infinity.

Parameters:
rayStartstart point of the ray.
rayEndend point of the ray.
intersectedTriangleslist where to add intersecting triangles

Definition at line 214 of file Mesh.java.

Get all lines of this mesh

Returns:
the lines

Definition at line 231 of file Mesh.java.

Set maximum x coordinate of this mesh. No coordinate of any of its children should be bigger than this value. Used for drawing a bounding box.

Returns:
maximum x

Definition at line 241 of file Mesh.java.

Set maximum y coordinate of this mesh. No coordinate of all its children should be bigger than this value. Used for drawing a bounding box.

Returns:
maximum y

Definition at line 253 of file Mesh.java.

Set maximum z coordinate of this mesh. No coordinate of all its children should be bigger than this value. Used for drawing a bounding box.

Returns:
maximum z

Definition at line 265 of file Mesh.java.

Set minimum x coordinate of this mesh. No coordinate of all its children should be smaller than this value. Used for drawing a bounding box.

Returns:
minimum x

Definition at line 277 of file Mesh.java.

Set minimum y coordinate of this mesh. No coordinate of all its children should be smaller than this value. Used for drawing a bounding box.

Returns:
minimum y

Definition at line 289 of file Mesh.java.

Set minimum z coordinate of this mesh. No coordinate of all its children should be smaller than this value. Used for drawing a bounding box.

Returns:
minimum z

Definition at line 301 of file Mesh.java.

Return base path for relative paths of texture images.

Returns:
the base path

Definition at line 312 of file Mesh.java.

Get all triangles of this mesh

Returns:
the triangles

Definition at line 321 of file Mesh.java.

Get all vertices of this mesh

Returns:
the vertices

Definition at line 330 of file Mesh.java.

Returns the width of the model by searching the biggest distance on the x-axis between the vectors.

Returns:
float as width of the model

Definition at line 343 of file Mesh.java.

Set minX,maxX, minY,maxY, minZ, maxZ to null to force recalculation when they are accessed next time

Definition at line 371 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.setLines ( ArrayList< Line lines) [inline]

Set lines array of this mesh.

Parameters:
linesthe lines to set

Definition at line 381 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.setTextureBasePath ( String  textureBasePath) [inline]

Set base path for relative paths of texture images.

Parameters:
textureBasePaththe base path

Definition at line 391 of file Mesh.java.

Only used for initialization! per definition is: textureProcessing x = textureSketchup x * picture.width textureProcessing y = picture.height - textureSketchup y * picture.height it also creates an PImage to each Triangle (if it contains any Texture)

Definition at line 400 of file Mesh.java.

void edu.tum.cs.vis.model.util.Mesh.setTriangles ( ArrayList< Triangle triangles) [inline]

Set triangles array of this mesh

Parameters:
trianglesthe triangles to set

Definition at line 485 of file Mesh.java.


Member Data Documentation

ArrayList<Line> edu.tum.cs.vis.model.util.Mesh.lines = new ArrayList<Line>() [private]

List of all lines parsed from file

Definition at line 88 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.maxX = null [protected]

Maximum x-position of model

Definition at line 53 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.maxY = null [protected]

Maximum y-position of model

Definition at line 61 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.maxZ = null [protected]

Maximum z-position of model

Definition at line 69 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.minX = null [protected]

Minimum x-position of model

Definition at line 49 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.minY = null [protected]

Minimum y-position of model

Definition at line 57 of file Mesh.java.

Float edu.tum.cs.vis.model.util.Mesh.minZ = null [protected]

Minimum z-position of model

Definition at line 65 of file Mesh.java.

final long edu.tum.cs.vis.model.util.Mesh.serialVersionUID = -2761386921853967131L [static, private]

auto generated

Definition at line 44 of file Mesh.java.

Base path for relative paths in texture filenames.

Definition at line 79 of file Mesh.java.

Is false until setTextureImage is called and the textures of all triangles are initialized.

Definition at line 74 of file Mesh.java.

ArrayList<Triangle> edu.tum.cs.vis.model.util.Mesh.triangles = new ArrayList<Triangle>() [private]

List of all triangles parsed from file

Definition at line 83 of file Mesh.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