Module vecmath

Class VolumeBase

java.lang.Object
de.grogra.vecmath.geom.VolumeBase
All Implemented Interfaces:
Volume
Direct Known Subclasses:
BoundingBox, CompoundVolume, CSGComplement, EmptyVolume, MeshVolume, TransformableVolume

public abstract class VolumeBase extends Object implements Volume
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 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, the ids of all coexisting volumes should be consecutive numbers starting at zero.
      Specified by:
      setId in interface Volume
      Parameters:
      id - id for this volume
      See Also:
    • getId

      public int getId()
      Description copied from interface: Volume
      Returns the id which has been set by Volume.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.
      Specified by:
      getId in interface Volume
      Returns:
      id of this volume
    • operator$com

      public Volume operator$com()
      Description copied from interface: Volume
      This operator method creates the complement of this volume.
      Specified by:
      operator$com in interface Volume
      Returns:
      the complement of this volume
      See Also:
    • operator$or

      public Volume operator$or(Volume v)
      Description copied from interface: Volume
      This operator method creates the union of this volume and v.
      Specified by:
      operator$or in interface Volume
      Parameters:
      v - a volume
      Returns:
      the union of this volume and v
      See Also:
    • operator$and

      public Volume operator$and(Volume v)
      Description copied from interface: Volume
      This operator method creates the intersection of this volume and v.
      Specified by:
      operator$and in interface Volume
      Parameters:
      v - a volume
      Returns:
      the intersection of a and b
      See Also:
    • operator$sub

      public Volume operator$sub(Volume v)
      Description copied from interface: Volume
      This operator method creates the difference between a and b.
      Specified by:
      operator$sub in interface Volume
      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)