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 booleanaddConvexIntersections(double u0, int f0, double u1, int f1, boolean solid, Line line, int which, IntersectionList list, Intersection excludeStart, Intersection excludeEnd) intgetId()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 betweenaandb.voidsetId(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, waitMethods 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:VolumeSets a unique identifier for this volume.idhas to be non-negative, theids of all coexisting volumes should be consecutive numbers starting at zero. -
getId
public int getId()Description copied from interface:VolumeReturns 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:VolumeThis operator method creates the complement of this volume.- Specified by:
operator$comin interfaceVolume- Returns:
- the complement of this volume
- See Also:
-
operator$or
Description copied from interface:VolumeThis operator method creates the union of this volume andv.- Specified by:
operator$orin interfaceVolume- Parameters:
v- a volume- Returns:
- the union of this volume and
v - See Also:
-
operator$and
Description copied from interface:VolumeThis operator method creates the intersection of this volume andv.- Specified by:
operator$andin interfaceVolume- Parameters:
v- a volume- Returns:
- the intersection of
aandb - See Also:
-
operator$sub
Description copied from interface:VolumeThis operator method creates the difference betweenaandb.- Specified by:
operator$subin 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)
-