net.algart.model3d.common.movement.model
Enum GridItemSet.GridRangeStyle

java.lang.Object
  extended by java.lang.Enum<GridItemSet.GridRangeStyle>
      extended by net.algart.model3d.common.movement.model.GridItemSet.GridRangeStyle
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GridItemSet.GridRangeStyle>
Enclosing class:
GridItemSet

public static enum GridItemSet.GridRangeStyle
extends java.lang.Enum<GridItemSet.GridRangeStyle>

Method of calculating the grid bounds: which area of 3D space should be splitted into rectangular cells by GridItemSet.preprocess() method.


Enum Constant Summary
Enum Constant and Description
MINIMUM_AND_MAXIMUM_CENTERS
          The algorithm of building grid checks all items, which implement HavingInteractionRadius and have an interaction radius, different than Double.POSITIVE_INFINITY, and finds the minimal and maximal coordinates among the centers of all such items: xmin, xmax, ymin, ymax, zmin, zmax.
MINIMUM_AND_MAXIMUM_WALL_VERTICES
          The algorithm of building grid checks all items, which are BunkerWall instance, gets coordinates of all vertices of these walls and finds minimal and maximal coordinates among these vertices: xmin, xmax, ymin, ymax, zmin, zmax.
 
Method Summary
Modifier and Type Method and Description
static GridItemSet.GridRangeStyle valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GridItemSet.GridRangeStyle[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MINIMUM_AND_MAXIMUM_CENTERS

public static final GridItemSet.GridRangeStyle MINIMUM_AND_MAXIMUM_CENTERS
The algorithm of building grid checks all items, which implement HavingInteractionRadius and have an interaction radius, different than Double.POSITIVE_INFINITY, and finds the minimal and maximal coordinates among the centers of all such items: xmin, xmax, ymin, ymax, zmin, zmax. The grid is built by splitting the parallelepiped xminxxmax, yminyymax, zminzzmax into dimX * dimY * dimZ rectangular cells.


MINIMUM_AND_MAXIMUM_WALL_VERTICES

public static final GridItemSet.GridRangeStyle MINIMUM_AND_MAXIMUM_WALL_VERTICES
The algorithm of building grid checks all items, which are BunkerWall instance, gets coordinates of all vertices of these walls and finds minimal and maximal coordinates among these vertices: xmin, xmax, ymin, ymax, zmin, zmax. The grid is built by splitting the parallelepiped xminxxmax, yminyymax, zminzzmax into dimX * dimY * dimZ rectangular cells.

This method is good if there is some amount of spherical items with very large absolute coordinates (and, so, MINIMUM_AND_MAXIMUM_CENTERS method build too large and inefficient grid), but most of items lie inside a bunker, described by several bunker walls.

Method Detail

values

public static GridItemSet.GridRangeStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GridItemSet.GridRangeStyle c : GridItemSet.GridRangeStyle.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GridItemSet.GridRangeStyle valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null