java.lang.Object
de.grogra.vecmath.geom.VolumeBase
- All Implemented Interfaces:
Volume
- Direct Known Subclasses:
BoundingBox
,CompoundVolume
,CSGComplement
,EmptyVolume
,MeshVolume
,TransformableVolume
This abstract class implements the operator and id methods of the
interface
Volume
. It can be used as base class
for volumes.- Author:
- Ole Kniemeyer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addConvexIntersections
(double u0, int f0, double u1, int f1, boolean solid, Line line, int which, IntersectionList list, Intersection excludeStart, Intersection excludeEnd) int
getId()
Returns the id which has been set byVolume.setId(int)
.This operator method creates the intersection of this volume andv
.This operator method creates the complement of this volume.This operator method creates the union of this volume andv
.This operator method creates the difference betweena
andb
.void
setId
(int id) Sets a unique identifier for this volume.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.vecmath.geom.Volume
boxContainsBoundary, computeIntersections, computeNormal, computeTangents, computeUV, contains, getExtent
-
Constructor Details
-
VolumeBase
public VolumeBase()
-
-
Method Details
-
setId
public void setId(int id) Description copied from interface:Volume
Sets a unique identifier for this volume.id
has to be non-negative, theid
s of all coexisting volumes should be consecutive numbers starting at zero. -
getId
public int getId()Description copied from interface:Volume
Returns the id which has been set byVolume.setId(int)
. Identifiers are non-negative and should be consecutive starting at zero, so that they can be used as indices into arrays which associate additional information with the volumes. Small gaps in the set of used identifiers are tolerable. -
operator$com
Description copied from interface:Volume
This operator method creates the complement of this volume.- Specified by:
operator$com
in interfaceVolume
- Returns:
- the complement of this volume
- See Also:
-
operator$or
Description copied from interface:Volume
This operator method creates the union of this volume andv
.- Specified by:
operator$or
in interfaceVolume
- Parameters:
v
- a volume- Returns:
- the union of this volume and
v
- See Also:
-
operator$and
Description copied from interface:Volume
This operator method creates the intersection of this volume andv
.- Specified by:
operator$and
in interfaceVolume
- Parameters:
v
- a volume- Returns:
- the intersection of
a
andb
- See Also:
-
operator$sub
Description copied from interface:Volume
This operator method creates the difference betweena
andb
.- Specified by:
operator$sub
in interfaceVolume
- Parameters:
v
- the volume to be subtracted- Returns:
- the difference between this volume and
b
- See Also:
-
addConvexIntersections
protected boolean addConvexIntersections(double u0, int f0, double u1, int f1, boolean solid, Line line, int which, IntersectionList list, Intersection excludeStart, Intersection excludeEnd)
-