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< Group > | getChildren () |
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< Group > | children = new ArrayList<Group>() |
Mesh | mesh = new Mesh() |
final Model | model |
String | name |
Static Private Attributes | |
static final long | serialVersionUID = -3347910663268579041L |
Represents a Mesh-Group with a Name. A group can multiple child groups so it will present a mesh hierarchy.
Definition at line 27 of file Group.java.
edu.tum.cs.vis.model.util.Group.Group | ( | Model | parent | ) | [inline] |
Constructor for group.
parent | Parent model of this group. |
Definition at line 84 of file Group.java.
void edu.tum.cs.vis.model.util.Group.addChild | ( | Group | g | ) | [inline] |
Add a child to this group
g | group to add as a child of this |
Definition at line 94 of file Group.java.
void edu.tum.cs.vis.model.util.Group.addTriangle | ( | Triangle | t | ) | [inline] |
Add triangle to the mesh of this group and also to parent model.
t | triangle 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.
g | The applet to draw on. |
drawSettings | override 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
gr | graphics context |
recursive | Draw 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.
triangles | collection where all the triangles are added. |
Definition at line 221 of file Group.java.
ArrayList<Group> edu.tum.cs.vis.model.util.Group.getChildren | ( | ) | [inline] |
Get all direct 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.
rayStart | start point of the ray. |
rayEnd | end point of the ray. |
intersectedTriangles | list where to add intersecting triangles |
Definition at line 204 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMaxX | ( | ) | [inline] |
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.
Definition at line 235 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMaxY | ( | ) | [inline] |
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.
Definition at line 247 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMaxZ | ( | ) | [inline] |
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.
Definition at line 259 of file Group.java.
Mesh edu.tum.cs.vis.model.util.Group.getMesh | ( | ) | [inline] |
Get the mesh containing triangles and lines
Definition at line 270 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMinX | ( | ) | [inline] |
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.
Definition at line 280 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMinY | ( | ) | [inline] |
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.
Definition at line 292 of file Group.java.
Float edu.tum.cs.vis.model.util.Group.getMinZ | ( | ) | [inline] |
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.
Definition at line 304 of file Group.java.
Model edu.tum.cs.vis.model.util.Group.getModel | ( | ) | [inline] |
String edu.tum.cs.vis.model.util.Group.getName | ( | void | ) | [inline] |
Get name of this group (normally parsed from model file)
Definition at line 324 of file Group.java.
float edu.tum.cs.vis.model.util.Group.getTotalDepth | ( | ) | [inline] |
Returns the total depth of the group by searching the biggest distance on the z-axis between the vectors.
Definition at line 334 of file Group.java.
float edu.tum.cs.vis.model.util.Group.getTotalHeight | ( | ) | [inline] |
Returns the total height of the group by searching the biggest distance on the y-axis between the vectors.
Definition at line 354 of file Group.java.
float edu.tum.cs.vis.model.util.Group.getTotalWidth | ( | ) | [inline] |
Returns the total width of the group by searching the biggest distance on the x-axis between the vectors.
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.
textureBasePath | Base 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.
textureBasePath | base path for a relative file path of texture images. |
isRoot | this should only be true for the root group. |
Definition at line 409 of file Group.java.
boolean edu.tum.cs.vis.model.util.Group.removeTriangle | ( | Triangle | t | ) | [inline] |
Remove triangle from group or child group.
t | triangle to remove. |
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.
t | triangles to remove. |
Definition at line 141 of file Group.java.
void edu.tum.cs.vis.model.util.Group.resetMinMaxValues | ( | ) | [inline] |
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
children | list of children |
Definition at line 449 of file Group.java.
void edu.tum.cs.vis.model.util.Group.setMesh | ( | Mesh | mesh | ) | [inline] |
Set the mesh containing triangles and lines
mesh | the 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)
name | to set |
Definition at line 469 of file Group.java.
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.
Mesh edu.tum.cs.vis.model.util.Group.mesh = new Mesh() [private] |
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.
final Model edu.tum.cs.vis.model.util.Group.model [private] |
parent model of this group
Definition at line 32 of file Group.java.
String edu.tum.cs.vis.model.util.Group.name [private] |
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.