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

List of all members.

Public Member Functions

void addChild (Group g)
void addTriangle (Triangle t)
void draw (PGraphics g, DrawSettings drawSettings)
void drawBoundingBox (PGraphics gr, boolean recursive)
void getAllTriangles (final Collection< Triangle > triangles)
ArrayList< GroupgetChildren ()
void getIntersectedTriangles (final Point3f rayStart, final Point3f rayEnd, final ArrayList< IntersectedTriangle > intersectedTriangles)
Float getMaxX ()
Float getMaxY ()
Float getMaxZ ()
Mesh getMesh ()
Float getMinX ()
Float getMinY ()
Float getMinZ ()
Model getModel ()
String getName ()
float getTotalDepth ()
float getTotalHeight ()
float getTotalWidth ()
 Group (Model parent)
void initialize (String textureBasePath)
boolean removeTriangle (Triangle t)
void removeTriangle (Collection< Triangle > t)
void resetMinMaxValues ()
void setChildren (ArrayList< Group > children)
void setMesh (Mesh mesh)
void setName (String name)

Protected Attributes

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

Private Member Functions

void initialize (String textureBasePath, boolean isRoot)

Private Attributes

ArrayList< Groupchildren = new ArrayList<Group>()
Mesh mesh = new Mesh()
final Model model
String name

Static Private Attributes

static final long serialVersionUID = -3347910663268579041L

Detailed Description

Represents a Mesh-Group with a Name. A group can multiple child groups so it will present a mesh hierarchy.

Author:
Stefan Profanter

Definition at line 27 of file Group.java.


Constructor & Destructor Documentation

Constructor for group.

Parameters:
parentParent model of this group.

Definition at line 84 of file Group.java.


Member Function Documentation

Add a child to this group

Parameters:
ggroup to add as a child of this

Definition at line 94 of file Group.java.

Add triangle to the mesh of this group and also to parent model.

Parameters:
ttriangle to add.

Definition at line 174 of file Group.java.

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

Draw method to draw the model on the applet.

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

Definition at line 107 of file Group.java.

void edu.tum.cs.vis.model.util.Group.drawBoundingBox ( PGraphics  gr,
boolean  recursive 
) [inline]

Draws the bounding box around the model with the current style

Parameters:
grgraphics context
recursiveDraw also Bounding-Box of children

Definition at line 159 of file Group.java.

void edu.tum.cs.vis.model.util.Group.getAllTriangles ( final Collection< Triangle triangles) [inline]

Add all triangles enclosed by this group and all child groups to the triangles collection.

Parameters:
trianglescollection where all the triangles are added.

Definition at line 221 of file Group.java.

Get all direct child groups

Returns:
list with all child groups

Definition at line 188 of file Group.java.

void edu.tum.cs.vis.model.util.Group.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 204 of file Group.java.

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

Returns:
maximum x

Definition at line 235 of file Group.java.

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

Returns:
maximum y

Definition at line 247 of file Group.java.

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

Returns:
maximum z

Definition at line 259 of file Group.java.

Get the mesh containing triangles and lines

Returns:
the mesh

Definition at line 270 of file Group.java.

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

Returns:
minimum x

Definition at line 280 of file Group.java.

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

Returns:
minimum y

Definition at line 292 of file Group.java.

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

Returns:
minimum z

Definition at line 304 of file Group.java.

Get parent model.

Returns:
the model

Definition at line 315 of file Group.java.

String edu.tum.cs.vis.model.util.Group.getName ( void  ) [inline]

Get name of this group (normally parsed from model file)

Returns:
the name

Definition at line 324 of file Group.java.

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

Returns:
float as depth of the group

Definition at line 334 of file Group.java.

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

Returns:
float as height of the group

Definition at line 354 of file Group.java.

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

Returns:
float as width of the group

Definition at line 374 of file Group.java.

void edu.tum.cs.vis.model.util.Group.initialize ( String  textureBasePath) [inline]

Call this function only in the root group! It will center the whole Group with its children to the Point (0,0,0) which means the volumetric center will then be at point 0.

Parameters:
textureBasePathBase path for relative file names

Definition at line 396 of file Group.java.

void edu.tum.cs.vis.model.util.Group.initialize ( String  textureBasePath,
boolean  isRoot 
) [inline, private]

Call this function only in the root group! It will center the whole Group with its children to the Point (0,0,0) which means the volumetric center will then be at point 0.

Parameters:
textureBasePathbase path for a relative file path of texture images.
isRootthis should only be true for the root group.

Definition at line 409 of file Group.java.

Remove triangle from group or child group.

Parameters:
ttriangle to remove.
Returns:
true if triangle is found and removed.

Definition at line 122 of file Group.java.

void edu.tum.cs.vis.model.util.Group.removeTriangle ( Collection< Triangle t) [inline]

Remove all triangles from group or child group.

Parameters:
ttriangles to remove.

Definition at line 141 of file Group.java.

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

Definition at line 433 of file Group.java.

void edu.tum.cs.vis.model.util.Group.setChildren ( ArrayList< Group children) [inline]

Set child groups of this group. Used to create a hierarchy

Parameters:
childrenlist of children

Definition at line 449 of file Group.java.

Set the mesh containing triangles and lines

Parameters:
meshthe mesh

Definition at line 459 of file Group.java.

void edu.tum.cs.vis.model.util.Group.setName ( String  name) [inline]

Set name of this group (normally parsed from model file)

Parameters:
nameto set

Definition at line 469 of file Group.java.


Member Data Documentation

ArrayList<Group> edu.tum.cs.vis.model.util.Group.children = new ArrayList<Group>() [private]

Child groups

Definition at line 76 of file Group.java.

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

Maximum x-position of group

Definition at line 45 of file Group.java.

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

Maximum x-position of group

Definition at line 53 of file Group.java.

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

Maximum x-position of group

Definition at line 61 of file Group.java.

Holds the Mesh for this group

Definition at line 66 of file Group.java.

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

Minimum x-position of group

Definition at line 41 of file Group.java.

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

Minimum x-position of group

Definition at line 49 of file Group.java.

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

Minimum x-position of group

Definition at line 57 of file Group.java.

parent model of this group

Definition at line 32 of file Group.java.

Name of this group

Definition at line 71 of file Group.java.

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

Auto generated

Definition at line 37 of file Group.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