com.quinncurtis.chart3djava
Class ObjectPolygonList

java.lang.Object
  extended by com.quinncurtis.chart3djava.ObjectPolygonList

public class ObjectPolygonList
extends java.lang.Object

A list of PolygonList objects.


Constructor Summary
ObjectPolygonList()
          The default constructor.
ObjectPolygonList(ObjectPolygonList source)
          Constructor initializes the ObjectPolygonList object as a copy of a another ObjectPolygonList object.
 
Method Summary
 int addPolygonObject(PolygonList newpolygonlist)
          Add the a PolygonList object to the he polygonObjectArray.
 int addPolygonObjectList(ObjectPolygonList newpolygonlist)
          Add the objects in the source ObjectPolygonList object to the polygonObjectArray.
 void clampObjectPolygonListToCoordinateLimits()
          Clamp the polygon vertex values to the coordinate systems limits.
 java.lang.Object clone()
          Returns an object that is a clone of this object.
 void copy(ObjectPolygonList source)
          Copies the source object.
 int count()
          Returns the count of the polygonArray.
 PolygonList getElement(int index)
          This accessor is the indexer for the class and get/sets the value of an individual PolygonList object in the polygonObjectArray list.
 PolygonList getObjectAtTestPoint(double x, double y)
          Get the index of the polygon with the smallest z-axis value in the polygonObjectArray object at the test point (x,y).
 PolygonList getObjectAtTestPointX(double x, double y)
          Get the index of the polygon with the smallest z-axis value in the polygonObjectArray object at the test point (x,y).
 int getPolygonAtTestPoint(double x, double y, int poly)
          Get the index of the polygon with the smallest z-axis value in the PolygonList object at the test point (x,y).
 PolygonList getPolygonObject(int index)
          Returns a specific PolygonList in the array of PolygonList objects.
 PolygonList[] getPolygonObjects()
          Returns an array of the PolygonList objects in the polygonObjectArray array.
 boolean getSortPolygonsByZDepth()
          Returns True if the polygons are sorted by z-depth.
 void markPolygonIndices(int datapoint, int group)
          Mark all of the PolygonList in the polygonObjectArray with data point and group indices.
 void reset()
          Resets the ObjectPolygonList object back to it's default (empty) state.
 void setElement(int index, PolygonList value)
          This accessor is the indexer for the class and get/sets the value of an individual PolygonList object in the polygonObjectArray list.
 void setEnableCullRearFacing(boolean value)
          Set to true to enable the culling of rear facing polygons
 void setSortPolygonsByZDepth(boolean value)
          Set to True and the polygons are sorted by z-depth.
 void sort()
          Sort the ObjectPolygonList objects in the ObjectPolygonList.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPolygonList

public ObjectPolygonList()
The default constructor.


ObjectPolygonList

public ObjectPolygonList(ObjectPolygonList source)
Constructor initializes the ObjectPolygonList object as a copy of a another ObjectPolygonList object.

Parameters:
source - The source ObjectPolygonList object.
Method Detail

reset

public void reset()
Resets the ObjectPolygonList object back to it's default (empty) state.


sort

public void sort()
Sort the ObjectPolygonList objects in the ObjectPolygonList.


copy

public void copy(ObjectPolygonList source)
Copies the source object.

Parameters:
source - The source object.

clone

public java.lang.Object clone()
Returns an object that is a clone of this object.

Overrides:
clone in class java.lang.Object
Returns:
Returns a clone of this object.

addPolygonObject

public int addPolygonObject(PolygonList newpolygonlist)
Add the a PolygonList object to the he polygonObjectArray.

Parameters:
newpolygonlist - Add this object to the polygonObjectArray.
Returns:
Returns current length of the polygonObjectArray.

addPolygonObjectList

public int addPolygonObjectList(ObjectPolygonList newpolygonlist)
Add the objects in the source ObjectPolygonList object to the polygonObjectArray.

Parameters:
newpolygonlist - Add this object to the polygonObjectArray.
Returns:
Returns current length of the polygonObjectArray.

getPolygonObjects

public PolygonList[] getPolygonObjects()
Returns an array of the PolygonList objects in the polygonObjectArray array.

Returns:
Returns an array of the PolygonList objects in the polygonObjectArray array.

getPolygonObject

public PolygonList getPolygonObject(int index)
Returns a specific PolygonList in the array of PolygonList objects.

Parameters:
index - The index of the PolygonList in the polygonObjectArray.
Returns:
Returns the PolygonList object.

markPolygonIndices

public void markPolygonIndices(int datapoint,
                               int group)
Mark all of the PolygonList in the polygonObjectArray with data point and group indices.

Parameters:
datapoint - The data point index of the polygon.
group - The group index of the polygon.

getPolygonAtTestPoint

public int getPolygonAtTestPoint(double x,
                                 double y,
                                 int poly)
Get the index of the polygon with the smallest z-axis value in the PolygonList object at the test point (x,y).

Parameters:
x - The x-value of the test point.
y - The y-value of the test point.
poly - The PolygonList object in the polygonObjectArray to test.
Returns:
Returns the index.

getObjectAtTestPoint

public PolygonList getObjectAtTestPoint(double x,
                                        double y)
Get the index of the polygon with the smallest z-axis value in the polygonObjectArray object at the test point (x,y).

Parameters:
x - The x-value of the test point.
y - The y-value of the test point.
Returns:
Returns the PolygonList object at the test point.

getObjectAtTestPointX

public PolygonList getObjectAtTestPointX(double x,
                                         double y)
Get the index of the polygon with the smallest z-axis value in the polygonObjectArray object at the test point (x,y).

Parameters:
x - The x-value of the test point.
y - The y-value of the test point.
Returns:
Returns the PolygonList object at the test point.

clampObjectPolygonListToCoordinateLimits

public void clampObjectPolygonListToCoordinateLimits()
Clamp the polygon vertex values to the coordinate systems limits.


getElement

public PolygonList getElement(int index)
This accessor is the indexer for the class and get/sets the value of an individual PolygonList object in the polygonObjectArray list.

Parameters:
index - Get the PolygonList element at index.
Returns:
Returns the PolygonList element at index.

setElement

public void setElement(int index,
                       PolygonList value)
This accessor is the indexer for the class and get/sets the value of an individual PolygonList object in the polygonObjectArray list.

Parameters:
index - Set the PolygonList element at index.
value - Value for PolygonList element index.

count

public int count()
Returns the count of the polygonArray.

Returns:
Returns the count of the polygonArray.

getSortPolygonsByZDepth

public boolean getSortPolygonsByZDepth()
Returns True if the polygons are sorted by z-depth.

Returns:
Returns True if the polygons are sorted by z-depth.

setSortPolygonsByZDepth

public void setSortPolygonsByZDepth(boolean value)
Set to True and the polygons are sorted by z-depth.

Parameters:
value - Set to True and the polygons are sorted by z-depth.

setEnableCullRearFacing

public void setEnableCullRearFacing(boolean value)
Set to true to enable the culling of rear facing polygons

Parameters:
value - Set to True and rear-facing polygons are culled.