Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.space
Class SpaceEntitySet  view SpaceEntitySet download SpaceEntitySet.java

java.lang.Object
  extended bycom.trapezium.space.SpaceEntitySet
All Implemented Interfaces:
SpaceCorrespondenceConstants
Direct Known Subclasses:
ColorsByIndex, ColorsByValue, Edges, Faces, NormalsByIndex, NormalsByValue, TexturesByIndex, TexturesByValue, Vertices

public class SpaceEntitySet
extends java.lang.Object
implements SpaceCorrespondenceConstants

The SpaceEntitySet is a data structure for keeping a list of floats or ints. The boundary is either fixed, every N entries, or -1 meaning that the "ilist" has -1 terminators.


Field Summary
(package private)  int correspondenceType
           
(package private)  float[] flist
           
static int Float
           
(package private)  SpaceEntitySet iiList
           
(package private)  int[] ilist
           
static int InitialSize
           
static int Int
           
(package private)  int listMax
           
(package private)  int listSize
           
(package private)  int type
           
(package private)  int unitSize
           
 
Fields inherited from interface com.trapezium.space.SpaceCorrespondenceConstants
ControlledByIndex, CorrespondsToF, CorrespondsToSpaceEntitySet, CorrespondsToV, StandAlone
 
Constructor Summary
SpaceEntitySet(int type, int boundary, int ctype)
          Class constructor
SpaceEntitySet(int type, int boundary, int ctype, float[] farray, int listSize, int listMax)
           
SpaceEntitySet(SpaceEntitySet source)
          Copy constructor
 
Method Summary
 void add(float f1)
          Add a value to the float array
 void add(int val)
          Add a value to the int array
 void add2f(float[] f)
          Add 2 floats to float array
 void add3f(float[] f)
          Add 3 floats to float array
 void adjustValues(float xToZero, float xFactor, float xShift, float yToZero, float yFactor, float yShift, float zToZero, float zFactor, float zShift)
          Adjust all the values in this set, assumes unitSize 3
 void clearFloats(float[] result)
          Clear a floats result before summing
(package private)  void ensureCapacity(int len)
          Make sure the int or float array can handle additional entries
 com.trapezium.vrml.node.space.BoundingBox getBoundingBox()
          Get the BoundingBox for this set
 void getConnectingIndex(int faceOffset, int value, int[] result)
          Get the index value before and after a particular index.
 int getCorrespondenceType()
          Get the correspondence type
 java.util.Enumeration getEnumeration()
          Create an enumeration for accessing ilist
 float[] getFloatList()
          Get the float value array
 int[] getIlist(int offset)
          Get a portion of the ilist
 int[] getIlistOffsets(int value)
          Get all the ilist offsets using a particular index value
 int[] getIntList()
          Get the int value array
 int getListMax()
          Get the size of the value array, either ilist or flist size
 int getListSize()
          Get the amount of the value array in use, either ilist or flist size
 void getLocation(int floatOffset, float[] result)
          Get the location of an element from the flist
 void getLocation(int startLocation, SpaceEntitySet iLocations, float[] result)
          Get the location of an element from an ilist
 int getNumberEntities()
          Get the number of entities in this set, does not work for SpaceEntitySets with the unitSize -1 (though maybe it should)
 int getOffsetOfValue(int value)
          Get the int offset of a particular value
 int getType()
          Get the type
 int getUnitSize()
          Get the unit size
 int getValueAt(int offset)
          Get the int value at a particular offset
 int getValueIncluding(int testValue)
          Get the value including a particular value, this assumes ilist is increasing, returns the offset of the last value that is less than or equal to the test value.
 void sumFloats(int floatOffset, float[] result)
          Sum floats at a specific offset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

correspondenceType

int correspondenceType

InitialSize

public static final int InitialSize
See Also:
Constant Field Values

Int

public static final int Int
See Also:
Constant Field Values

Float

public static final int Float
See Also:
Constant Field Values

type

int type

flist

float[] flist

ilist

int[] ilist

iiList

SpaceEntitySet iiList

unitSize

int unitSize

listMax

int listMax

listSize

int listSize
Constructor Detail

SpaceEntitySet

public SpaceEntitySet(int type,
                      int boundary,
                      int ctype)
Class constructor


SpaceEntitySet

public SpaceEntitySet(int type,
                      int boundary,
                      int ctype,
                      float[] farray,
                      int listSize,
                      int listMax)

SpaceEntitySet

public SpaceEntitySet(SpaceEntitySet source)
Copy constructor

Method Detail

getListSize

public int getListSize()
Get the amount of the value array in use, either ilist or flist size


getListMax

public int getListMax()
Get the size of the value array, either ilist or flist size


getType

public int getType()
Get the type


getCorrespondenceType

public int getCorrespondenceType()
Get the correspondence type


getUnitSize

public int getUnitSize()
Get the unit size


getNumberEntities

public int getNumberEntities()
Get the number of entities in this set, does not work for SpaceEntitySets with the unitSize -1 (though maybe it should)


getIntList

public int[] getIntList()
Get the int value array


getFloatList

public float[] getFloatList()
Get the float value array


add

public void add(float f1)
Add a value to the float array


add3f

public void add3f(float[] f)
Add 3 floats to float array


add2f

public void add2f(float[] f)
Add 2 floats to float array


add

public void add(int val)
Add a value to the int array


ensureCapacity

void ensureCapacity(int len)
Make sure the int or float array can handle additional entries


getEnumeration

public java.util.Enumeration getEnumeration()
Create an enumeration for accessing ilist


getLocation

public void getLocation(int startLocation,
                        SpaceEntitySet iLocations,
                        float[] result)
Get the location of an element from an ilist


getLocation

public void getLocation(int floatOffset,
                        float[] result)
Get the location of an element from the flist


clearFloats

public void clearFloats(float[] result)
Clear a floats result before summing


sumFloats

public void sumFloats(int floatOffset,
                      float[] result)
Sum floats at a specific offset


getOffsetOfValue

public int getOffsetOfValue(int value)
Get the int offset of a particular value


getValueAt

public int getValueAt(int offset)
Get the int value at a particular offset


getBoundingBox

public com.trapezium.vrml.node.space.BoundingBox getBoundingBox()
Get the BoundingBox for this set


adjustValues

public void adjustValues(float xToZero,
                         float xFactor,
                         float xShift,
                         float yToZero,
                         float yFactor,
                         float yShift,
                         float zToZero,
                         float zFactor,
                         float zShift)
Adjust all the values in this set, assumes unitSize 3


getIlist

public int[] getIlist(int offset)
Get a portion of the ilist


getIlistOffsets

public int[] getIlistOffsets(int value)
Get all the ilist offsets using a particular index value


getValueIncluding

public int getValueIncluding(int testValue)
Get the value including a particular value, this assumes ilist is increasing, returns the offset of the last value that is less than or equal to the test value.


getConnectingIndex

public void getConnectingIndex(int faceOffset,
                               int value,
                               int[] result)
Get the index value before and after a particular index.