de.grogra.vecmath.geom
public class GridClonerUnion extends OctreeUnion
volumes| Constructor and Description |
|---|
GridClonerUnion(int xc,
double xd,
int yc,
double yd,
Matrix4d t) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
boxContainsBoundary(BoundingBox box,
Tuple3d center,
double radius,
Variables temp)
This implementation of
boxContainsBoundary returns
true iff at least one of the invocations of this method
on the CompoundVolume.volumes returns true. |
boolean |
computeIntersections(Line line,
int which,
IntersectionList list,
Intersection excludeStart,
Intersection excludeEnd)
Computes intersections between the boundary surface of this object
and the specified
line. |
boolean |
contains(Tuple3d point,
boolean open)
Determines if the given
point lies within this object. |
void |
getExtent(Tuple3d min,
Tuple3d max,
Variables temp)
Computes the extent of this volume, i.e., an axis-aligned
bounding box between
min and max. |
void |
initialize(int maxDepth,
int minObjects,
CellIterator iterator)
Initializes the octree.
|
addInfiniteVolume, getOctreecomputeNormal, computeTangents, computeUVaddConvexIntersections, getId, operator$and, operator$com, operator$or, operator$sub, setIdpublic GridClonerUnion(int xc,
double xd,
int yc,
double yd,
Matrix4d t)
public boolean boxContainsBoundary(BoundingBox box, Tuple3d center, double radius, Variables temp)
CompoundVolumeboxContainsBoundary returns
true iff at least one of the invocations of this method
on the CompoundVolume.volumes returns true.boxContainsBoundary in interface VolumeboxContainsBoundary in class CompoundVolumebox - bounding boxcenter - center coordinates of boxradius - radius of enclosing spheretemp - has to be provided by the invoker, may be used in implementationstrue if box contains (part of) the boundary of this volumepublic boolean computeIntersections(Line line, int which, IntersectionList list, Intersection excludeStart, Intersection excludeEnd)
Volumeline. The intersections are added
to list in ascending order of distance
(i.e., of Intersection.parameter), where the
parameter has to lie between line.start
and line.end.
Implementations of this method must not
clear or modify the existing intersections in list.
The parameter which has to be one of
Intersection.ALL, Intersection.CLOSEST,
Intersection.ANY. It determines if all intersections
have to be added to the list, only the closest (minimal
value of Intersection.parameter), or an arbitrary
of the set of all intersections. Only in case of ALL,
the return value of this method is precise.
If specific intersection points should be excluded from the list
of computed intersections, they have to be specified in
excludeStart and excludeEnd.
The intersection point of excludeStart has to be the
starting point of line, the intersection point of
excludeEnd has to be the end point of line.
The exclusion of intersections is a useful feature for
ray-tracing, e.g., when a ray is re-emitted at an intersection point
in another direction.
computeIntersections in interface VolumecomputeIntersections in class OctreeUnionline - a linewhich - one of Intersection.ALL,
Intersection.CLOSEST, Intersection.ANY, this
determines which intersections have to be added to listlist - the intersections are added to this listexcludeStart - intersection at start point which shall be excluded, or nullexcludeEnd - intersection at end point which shall be excluded, or nulltrue iff the beginning of the line lies
within the volume (i.e., if the line starts within the volume or
enters the volume at the starting point); however note that the returned
value is valid only if which == Intersection.ALLpublic boolean contains(Tuple3d point, boolean open)
Volumepoint lies within this object.
If open is true, the interior of the volume
is considered (the largest open set contained in the volume,
i.e., excluding the boundary), otherwise the closure of the volume.public void getExtent(Tuple3d min, Tuple3d max, Variables temp)
Volumemin and max.getExtent in interface VolumegetExtent in class OctreeUnionmin - minimum coordinates of bounding box are placed in heremax - maximum coordinates of bounding box are placed in heretemp - has to be provided by the invoker, may be used in implementationspublic void initialize(int maxDepth,
int minObjects,
CellIterator iterator)
OctreeUnioninitialize in class OctreeUnionmaxDepth - maximum allowed depth of octreeminObjects - minimum volumes per cell. Only cells having
more than minObjects volumes are checked for
subdivisioniterator - the cell iterator to use