Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.vecmath.geom
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 java.lang.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 Summary
`VolumeBase()`

Method Summary
`protected 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 by `Volume.setId(int)`.
`Volume` | `operator$and(Volume v)` This operator method creates the intersection of this volume and `v`.
`Volume` | `operator$com()` This operator method creates the complement of this volume.
`Volume` | `operator$or(Volume v)` This operator method creates the union of this volume and `v`.
`Volume` | `operator$sub(Volume v)` This operator method creates the difference between `a` and `b`.
`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 Detail

### VolumeBase

    public VolumeBase()

Method Detail

### addConvexIntersections

    protected boolean addConvexIntersections(double u0,
                                             int f0,
                                             double u1,
                                             int f1,
                                             boolean solid,
                                             Line line,
                                             int which,
                                             IntersectionList list,
                                             Intersection excludeStart,
                                             Intersection excludeEnd)

### 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$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:
    `CSGIntersection`

### 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:
    `CSGComplement`

### 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:
    `CSGUnion`

### 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:
    `CSGDifference`

### 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 `id`s 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:
    `Volume.getId()`

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD