vclip
Class PolyTree

java.lang.Object
  extended byvclip.PolyTree

public class PolyTree
extends java.lang.Object

A hierarchically organized collection of convex polyhedra and the primary class for invoking vclip. The convex decomposition of a non-convex polyhedron can be represented as a PolyTree.

A PolyTree is either atomic or compound. An atomic PolyTree is composed of a single convex polyhedron, which can be obtained using the getPolyhedron method. A compound PolyTree consists of one of more PolyTree components, plus a convex polyhedron which acts as a bounding hull for the components. For compound PolyTrees, getPolyhedron returns the bounding hull.

The number of components in a compound PolyTree is returned by numComponents. The number of nodes is the total number of PolyTrees in the hierarchy, and is returned by numNodes. The number of leaves is the total number of atomic PolyTrees in the hierarchy, and is returned by numLeaves.

Each PolyTree has a local coordinate frame with respect to which components are attached and polyhedron vertices are represented. All components within a PolyTree also share a common reference frame, with respect to which vclip is called. The transformation from the local frame to the reference frame call be obtained using the method getTransform, and can be changed using setTransform. When a PolyTree is added to another as a component (see addComponent), the component's reference frame is changed to that of the parent PolyTree.

The distance, and associated closest points and features, between a pair of PolyTrees is determined using vclip, which is based on Brian Mirtich's Vclip algorithm, published as ``V-Clip: Fast and Robust Polyhedral Collision Detection'', ACM Transactions on Graphics, July, 1997.

A PolyTree can be created by reading information in from a stream, specified either in a constructor or in a method such as scan. A whole collection of PolyTrees can be read into a Map using the scanLibrary method. An atomic PolyTree can also be constructed directly from a ConvexPolyhedron, and compound PolyTrees can be created explictly using the method addComponent and then calling buildBoundingHull. More information on PolyTree creation, and bounding hulls, can be found in the vclip package documentation.

Mass and volume properties are computed automatically for the polyhedron associated with a PolyTree, and can be obtained using the methods volume, firstMomentOfVolume, secondMomentOfVolume, productOfVolume, and radius. These quantities are computed using algorithms described in Brian Mirtich, ``Fast and Accurate Computation of Polyhedral Mass Properties'', Journal of Graphics Tools, Volume 1, Number 2, 1996. Assuming a uniform mass density, they can be used to determine the center-of-mass and the inertia tensor, which for a mass of unity, can be obtained using centerOfMass and inertiaTensor. All of these quantities are computed with respect to the PolyTree's local coordinate frame.

Author:
Brian Mirtich (original C++ version), Eddy Boxerman, John E. Lloyd (Java port)

Field Summary
static int CONVEX_HULL
          Bounding hull is a convex hull.
static int CUSTOM_HULL
          Bounding hull is a custom polyhedron, specified with setPolyhedron.
static int NO_HULL
          There is no bounding hull.
static int OBB_HULL
          Bounding hull is an oriented-bounding box.
 
Constructor Summary
PolyTree(java.lang.String name)
          Creates an empty PolyTree.
PolyTree(java.lang.String name, ConvexPolyhedron poly)
          Creates an atomic PolyTree from a convex polyhedron.
PolyTree(java.lang.String name, java.util.Map library, java.lang.String origName)
          Creates a PolyTree by copying one from a PolyTree library.
PolyTree(java.lang.String name, PolyTree ptree)
          Creates a PolyTree by copying another.
 
Method Summary
 void addComponent(java.lang.String name, PolyTree orig)
          Adds a component to this PolyTree.
 void addComponent(java.lang.String name, PolyTree orig, javax.vecmath.Matrix4d Xrl)
          Adds a component to this PolyTree.
 void buildAllBoundingHulls(int type)
          Recursively builds a bounding hull of a prescribed type for this PolyTree and every compound component PolyTree in the hierarchy.
 void buildBoundingHull()
          Builds a bounding hull for this PolyTree, using the default bounding hull type.
 void buildBoundingHull(int type)
          Builds a bounding hull of a prescribed type for this PolyTree.
 void centerOfMass(javax.vecmath.Vector3d com)
          Returns the center of mass of this PolyTree's polyhedron (assuming a uniform mass density), with respect to the local frame.
 void clearComponents()
          Clear all the components in this PolyTree, and set the bounding hull type to NO_HULL.
static PolyTree createBox(java.lang.String name, double wx, double wy, double wz)
           
static PolyTree createCone(java.lang.String name, double rtop, double rbot, double h, int nsides)
           
static PolyTree createCylinder(java.lang.String name, double r, double h, int nsides)
           
static PolyTree createPrism(java.lang.String name, double[] xy, double h)
           
static PolyTree createPrism(java.lang.String name, double[] xyTop, double[] xyBot, double h)
           
static PolyTree createRoundedCylinder(java.lang.String name, double r, double h, int nslices)
           
static PolyTree createSphere(java.lang.String name, double r, int nslices)
           
 javax.vecmath.Vector3d firstMomentOfVolume()
          Returns the first moment of volume for this PolyTree's polyhedron, with respect to the local frame.
 int getBoundingHullType()
          Gets the type of this PolyTree's bounding hull.
 java.util.Iterator getComponents()
          Returns the components associated with this PolyTree.
static int getDefaultBoundingHullType()
          Returns the default bounding hull type.
 java.lang.String getName()
          Gets the name of this PolyTree.
 ConvexPolyhedron getPolyhedron()
          Returns the polyhedron associated with this PolyTree.
 javax.vecmath.Matrix4d getTransform()
          Returns the transformation from this PolyTree's local frame to its reference frame.
 void inertiaTensor(javax.vecmath.Matrix3d J)
          Returns the inertia tensor of this PolyTree's polyhedron assuming a uniform mass density and a mass of 1.
 boolean isAtomic()
          Returns true if this PolyTree is atomic (i.e., is represented by only one polyhedron, and has no subcomponents).
 boolean isCompound()
          Returns true if this PolyTree is compound (i.e., is composed of one or more PolyTree subcomponents).
 int numComponents()
          Returns the number of PolyTree components which are direct children of this PolyTree.
 int numLeaves()
          Returns the total number of atomic PolyTrees located in the hierarchy under this PolyTree.
 int numNodes()
          Returns the total number of PolyTrees located in the hierarchy under this PolyTree.
 javax.vecmath.Vector3d productOfVolume()
          Returns the product of volume for this PolyTree's polyhedron, with respect to the local frame.
 double radius()
          Returns the ``radius'' of the PolyTree, relative to the center of volume.
 void scan(java.io.Reader reader, java.util.Map library, boolean updateLibrary, boolean namedFormat)
          Reads in a PolyTree from a Reader.
 void scan(java.io.StreamTokenizer stok, java.util.Map library, boolean updateLibrary, boolean namedFormat)
          Reads in a PolyTree from a StreamTokenizer.
static void scanLibrary(java.io.StreamTokenizer stok, java.util.Map library, boolean namedFormat)
          Reads a library of PolyTrees from a StreamTokenizer.
static void scanLibrary(java.lang.String fileName, java.util.Map library, boolean namedFormat)
          Reads a library of PolyTrees from a file.
 javax.vecmath.Vector3d secondMomentOfVolume()
          Returns the second moment of volume for this PolyTree's polyhedron, with respect to the local frame.
 void set(PolyTree ptree)
          Sets this PolyTree to a copy of another PolyTree.
static void setDefaultBoundingHullType(int type)
          Sets the default bounding hull type, which will be used when the bounding hull is created automatically (such as when a PolyTree is created using scan).
 void setName(java.lang.String name)
          Sets the name for this PolyTree.
 void setPolyhedron(ConvexPolyhedron poly)
          Sets the convex polyhedron associated with the PolyTree.
 void setTransform(javax.vecmath.Matrix4d Xlr)
          Sets the local-to-reference frame transform of this PolyTree.
 java.lang.String toString()
          Returns a string representation of this PolyTree.
 double vclip(DistanceReport rep, PolyTree ptree2, javax.vecmath.Matrix4d Xr2r1, double distLimit, ClosestFeaturesHT ht)
           
 double vclip(DistanceReport rep, PolyTree ptree2, javax.vecmath.Matrix4d Xr2r1, double distLimit, ClosestFeaturesHT ht, FeaturePair startFeatures)
          Computes the distance between this PolyTree and a second PolyTree.
 double volume()
          Returns the volume of this PolyTree's polyhedron.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_HULL

public static final int NO_HULL
There is no bounding hull. This will be the case for atomic PolyTrees, or compound PolyTrees for which a bounding hull has not yet been created.

See Also:
Constant Field Values

OBB_HULL

public static final int OBB_HULL
Bounding hull is an oriented-bounding box.

See Also:
Constant Field Values

CONVEX_HULL

public static final int CONVEX_HULL
Bounding hull is a convex hull.

See Also:
Constant Field Values

CUSTOM_HULL

public static final int CUSTOM_HULL
Bounding hull is a custom polyhedron, specified with setPolyhedron.

See Also:
Constant Field Values
Constructor Detail

PolyTree

public PolyTree(java.lang.String name)
Creates an empty PolyTree.

Parameters:
name - name of the PolyTree (optional; can be set to null).

PolyTree

public PolyTree(java.lang.String name,
                PolyTree ptree)
Creates a PolyTree by copying another.

Parameters:
name - name for the new PolyTree (optional; can be set to null).
ptree - the PolyTree to be copied

PolyTree

public PolyTree(java.lang.String name,
                ConvexPolyhedron poly)
Creates an atomic PolyTree from a convex polyhedron. Note that the polyhedron is not copied.

Parameters:
name - name of the PolyTree (optional; can be set to null).
poly - the polyhedron

PolyTree

public PolyTree(java.lang.String name,
                java.util.Map library,
                java.lang.String origName)
         throws java.lang.IllegalArgumentException
Creates a PolyTree by copying one from a PolyTree library.

Parameters:
name - name of the PolyTree (optional; can be set to null).
library - PolyTree library (a map of string names to PolyTrees).
origName - name of the original PolyTree in the libary
Throws:
java.lang.IllegalArgumentException - if the original PolyTree is not found in the library.
Method Detail

setDefaultBoundingHullType

public static void setDefaultBoundingHullType(int type)
Sets the default bounding hull type, which will be used when the bounding hull is created automatically (such as when a PolyTree is created using scan).

Parameters:
type - default bounding hull type. Must be either OBB_HULL or CONVEX_HULL
Throws:
java.lang.IllegalArgumentException - if an illegal type is specified
See Also:
getDefaultBoundingHullType()

getDefaultBoundingHullType

public static int getDefaultBoundingHullType()
Returns the default bounding hull type.

Returns:
default bounding hull type
See Also:
setDefaultBoundingHullType(int)

getBoundingHullType

public int getBoundingHullType()
Gets the type of this PolyTree's bounding hull.

Returns:
bounding hull type (one of NO_HULL, OBB_HULL, CONVEX_HULL, or CUSTOM_HULL)

buildBoundingHull

public void buildBoundingHull()
Builds a bounding hull for this PolyTree, using the default bounding hull type. This method is called recursively on any component PolyTrees that do not have a bounding hull. For atomic PolyTrees, this routine does nothing.

See Also:
getDefaultBoundingHullType(), buildBoundingHull(int)

buildBoundingHull

public void buildBoundingHull(int type)
Builds a bounding hull of a prescribed type for this PolyTree. This method is called recursively on any component PolyTrees that do not have a bounding hull. For atomic PolyTrees, this routine does nothing.

Parameters:
type - type of bounding hull to build. Must be either OBB_HULL or CONVEX_HULL
See Also:
getBoundingHullType()

buildAllBoundingHulls

public void buildAllBoundingHulls(int type)
Recursively builds a bounding hull of a prescribed type for this PolyTree and every compound component PolyTree in the hierarchy. For atomic PolyTrees, this routine does nothing.

Parameters:
type - type of bounding hull to build. Must be either OBB_HULL or CONVEX_HULL
See Also:
getBoundingHullType()

setPolyhedron

public void setPolyhedron(ConvexPolyhedron poly)
Sets the convex polyhedron associated with the PolyTree. For a compound PolyTree, this polyhedron will define the bounding hull (of type CUSTOM_HULL). Note that the polyhedron is not copied.

Parameters:
poly - convex polyhedron

setName

public void setName(java.lang.String name)
Sets the name for this PolyTree.

Parameters:
name - for this PolyTree

getName

public java.lang.String getName()
Gets the name of this PolyTree.

Returns:
name of this PolyTree

isCompound

public boolean isCompound()
Returns true if this PolyTree is compound (i.e., is composed of one or more PolyTree subcomponents).

Returns:
true if this PolyTree is compound

isAtomic

public boolean isAtomic()
Returns true if this PolyTree is atomic (i.e., is represented by only one polyhedron, and has no subcomponents).

Returns:
true if this PolyTree is atomic

set

public void set(PolyTree ptree)
Sets this PolyTree to a copy of another PolyTree. All aspects of the PolyTree are copied, including the name.

Parameters:
ptree - the other PolyTree

addComponent

public void addComponent(java.lang.String name,
                         PolyTree orig)
Adds a component to this PolyTree. The component is made by copying the supplied PolyTree and giving the copy the supplied name. The reference frame of the original PolyTree is assumed to correspond to the local frame of this PolyTree.

Adding a component will automically turn this PolyTree into a compound PolyTree, and any polyhedron presently associated with this PolyTree will become (by default) the bounding hull polyhedron.

Parameters:
name - optional name for the component PolyTree
orig - PolyTree that is copied to form the component

addComponent

public void addComponent(java.lang.String name,
                         PolyTree orig,
                         javax.vecmath.Matrix4d Xrl)
Adds a component to this PolyTree. The component is made by copying the supplied PolyTree and giving the copy the supplied name. The reference frame of the original PolyTree is related to the local frame of this PolyTree by the transform Xrl.

Adding a component will automically turn this PolyTree into a compound PolyTree, and any polyhedron presently associated with this PolyTree will become (by default) the bounding hull polyhedron.

Parameters:
name - optional name for the component PolyTree
orig - PolyTree that is copied to form the component
Xrl - transform from the reference frame of the original PolyTree to the local frame of this PolyTree

clearComponents

public void clearComponents()
Clear all the components in this PolyTree, and set the bounding hull type to NO_HULL. Any existing polyhedron will not be changed.


getComponents

public java.util.Iterator getComponents()
Returns the components associated with this PolyTree.

Returns:
iterator for the components

setTransform

public final void setTransform(javax.vecmath.Matrix4d Xlr)
Sets the local-to-reference frame transform of this PolyTree. This will also cause all the components of the PolyTree to ``move'' relative to the reference frame.

Parameters:
Xlr - new local-to-reference frame transformation

getTransform

public final javax.vecmath.Matrix4d getTransform()
Returns the transformation from this PolyTree's local frame to its reference frame.

Returns:
transfrom from local frame to reference frame

getPolyhedron

public final ConvexPolyhedron getPolyhedron()
Returns the polyhedron associated with this PolyTree. For compound PolyTrees, this will be the bounding polyhedron.

The vertex coordinates of this polyhedron are defined with respect to the PolyTree's local frame.

Returns:
this PolyTree's polyhedron

numComponents

public final int numComponents()
Returns the number of PolyTree components which are direct children of this PolyTree.

Returns:
the number of PolyTree components

numNodes

public final int numNodes()
Returns the total number of PolyTrees located in the hierarchy under this PolyTree.

Returns:
total number of PolyTrees in the hierarchy

numLeaves

public final int numLeaves()
Returns the total number of atomic PolyTrees located in the hierarchy under this PolyTree.

Returns:
number of atomic PolyTrees under this PolyTree

toString

public final java.lang.String toString()
Returns a string representation of this PolyTree.

Returns:
string representation

volume

public final double volume()
Returns the volume of this PolyTree's polyhedron.

Returns:
polyhedron volume

firstMomentOfVolume

public final javax.vecmath.Vector3d firstMomentOfVolume()
Returns the first moment of volume for this PolyTree's polyhedron, with respect to the local frame. When divided by the volume of the polyhedron, this quantity yields the center of volume.

Returns:
first moment of volume

secondMomentOfVolume

public final javax.vecmath.Vector3d secondMomentOfVolume()
Returns the second moment of volume for this PolyTree's polyhedron, with respect to the local frame. This quantity is used in computing the diagonal elements of the inertia tensor.

Returns:
second moment of volume

productOfVolume

public final javax.vecmath.Vector3d productOfVolume()
Returns the product of volume for this PolyTree's polyhedron, with respect to the local frame. This quantity is used in computing the off-diagonal elements of the inertia tensor.

Returns:
product of volume

radius

public final double radius()
Returns the ``radius'' of the PolyTree, relative to the center of volume.

Returns:
radius of the PolyTree

centerOfMass

public final void centerOfMass(javax.vecmath.Vector3d com)
Returns the center of mass of this PolyTree's polyhedron (assuming a uniform mass density), with respect to the local frame.

Parameters:
com - returns the center of mass

inertiaTensor

public final void inertiaTensor(javax.vecmath.Matrix3d J)
Returns the inertia tensor of this PolyTree's polyhedron assuming a uniform mass density and a mass of 1. The tensor is computed with respect to a frame that has the same orientation as the PolyTree's local frame, but is centered at the center of mass.

Parameters:
J - returns the inertia tensor

vclip

public final double vclip(DistanceReport rep,
                          PolyTree ptree2,
                          javax.vecmath.Matrix4d Xr2r1,
                          double distLimit,
                          ClosestFeaturesHT ht)

vclip

public final double vclip(DistanceReport rep,
                          PolyTree ptree2,
                          javax.vecmath.Matrix4d Xr2r1,
                          double distLimit,
                          ClosestFeaturesHT ht,
                          FeaturePair startFeatures)
Computes the distance between this PolyTree and a second PolyTree. This is done by recursively computing the distance between all pairs of component PolyTrees and returning the minimum.

In particular, this minimum distance in generally the minimum distance over all pairs of convex polyhedra associated with the two PolyTrees. However, if the argument distLimit is non-negative, and the bounding hull for a compound component A is determined to be at least distLimit away from another component B, then the bounding hull distance is used instead as the distance between A and B and the components of A are not examined. This speeds up computations for PolyTrees which are more than a certain distance from each other, but also means that the real distance between two PolyTrees may in fact be larger than the returned value.

If there is a collision between the two PolyTrees, then a non-positive distance value is returned.

The closest points and features associated with the minimum distance are returned in an optional DistanceReport object. If distLimit is active, then these points and features may belong to the bounding hull of a compound component, rather than the polyhedron of an atomic PolyTree. In case of a collision, the associated closest points and features may not be that meaningfull.

The distance report may also return the closest point pairs between atomic PolyTrees that are within a certain maximum distance. See the DistanceReport documentation for details.

vclip computations are often much faster if the closest features between pairs of PolyTrees are stored and then used as an initial guess in subsequent computations. The optional argument ht supplies a ClosestFeaturesHT for storing such information.

Parameters:
rep - (optional) returns information about the closest pairs of points and features between the two PolyTrees.
ptree2 - the second PolyTree
Xr2r1 - transformation from the reference frame of the second PolyTree to the reference frame of the first
distLimit - if non-negative, tells vclip to not consider distances to a PolyTree's components if the distance to its bounding hull equals or exceeds distLimit
ht - (optional) record of the most recent feature pairs computed between different PolyTrees
Returns:
distance beteen the PolyTrees. A non-positive value indicates a collision.
See Also:
DistanceReport

scan

public void scan(java.io.Reader reader,
                 java.util.Map library,
                 boolean updateLibrary,
                 boolean namedFormat)
          throws java.io.IOException
Reads in a PolyTree from a Reader. The format is specified below. The input may refer to other named PolyTrees. If it does, then a reference to each named PolyTree should appear in the supplied library. An atomic PolyTree is specified according to the format
 atomic name polyhedron
 
where name is an identifier naming the PolyTree, and polyhedron is a specification for a polyhedron (which should take the form specified in either ConvexPolyhedron.scanNamedFormat(Reader) or ConvexPolyhedron.scan(Reader), depending on whether nameFormat is true). A compound PolyTree is specified by giving a list of its component PolyTrees between square brackets, as in
 compound name
  [  transform PolyTree
     transform PolyTree
         ...
  ]
 
name is an identifier naming the PolyTree.

transform specifies a transformation from the reference frame of the component to this PolyTree's local frame, and PolyTree is either a specification for a PolyTree (as described here), or a string identifier naming a PolyTree that can copied from the supplied library.

A transform specification consists of a series of translation and rotation terms listed between square brackets, as in:

 [ trans 1 2 3  rotx 30 roty 20 ],
 
which describes a translation along (1,2,3), followed by a rotation of 30 degrees about the x axis, followed by a rotation of 20 degrees about the y axis.

Succesive translations and rotations are accumulated from left to right. The terms that can be specified are:

trans x y z
A translation along the vector (x, y, z).
rotx deg
A rotation of deg degrees about the x axis.
roty deg
A rotation of deg degrees about the y axis.
rotz deg
A rotation of deg degrees about the z axis.
rot ux uy uz deg
A rotation of deg degress about the vector (ux, uy, uz).

A simple example of a compound PolyTree specification is

 compound two-cubes
 [
	[trans -1 0 0] unit-cube
	[trans +1 0 0] unit-cube
 ]
 
which creates a compound PolyTree named two-cubes, with two components, each a copy of a PolyTree named unit-cube, translated by -1 and 1 (respectively) along the x axis.

Parameters:
reader - the Reader which supplies the input
library - an optional library from which to look up referenced PolyTrees. The library is simply a map of string names onto PolyTree objects.
updateLibrary - if true, then the input PolyTree will be inserted into the supplied library (assuming library is not null)
namedFormat - if true, then polyhedra will be read in using the named format used by ConvexPolyhedron.scanNamedFormat. Otherwise, the .obj format of ConvexPolyhedron.scan will be used
Throws:
java.io.IOException - if an I/O or format error occurs
See Also:
scan(StreamTokenizer,Map,boolean,boolean)

scan

public void scan(java.io.StreamTokenizer stok,
                 java.util.Map library,
                 boolean updateLibrary,
                 boolean namedFormat)
          throws java.io.IOException
Reads in a PolyTree from a StreamTokenizer. Otherwise identical to scan(Reader,Map,boolean,boolean).

Parameters:
stok - StreamTokenizer which supplies the input
library - an optional library from which to look up referenced PolyTrees.
updateLibrary - if true, then the input PolyTree will be inserted into the supplied library
namedFormat - if true, then polyhedra will be read in using the named format used by ConvexPolyhedron.scanNamedFormat. Otherwise, the .obj format of ConvexPolyhedron.scan will be used
Throws:
java.io.IOException - if an I/O or format error occurs
See Also:
scan(Reader,Map,boolean,boolean)

scanLibrary

public static void scanLibrary(java.lang.String fileName,
                               java.util.Map library,
                               boolean namedFormat)
                        throws java.io.IOException
Reads a library of PolyTrees from a file.

Parameters:
fileName - name of the file
library - library into which the PolyTrees read from the file will be placed. The library is simply a map of names onto PolyTree objects.
namedFormat - if true, then polyhedra will be read in using the named format used by ConvexPolyhedron.scanNamedFormat. Otherwise, the .obj format of ConvexPolyhedron.scan will be used
Throws:
java.io.IOException - if an I/O or format error occurs
See Also:
scanLibrary(StreamTokenizer,Map,boolean)

scanLibrary

public static void scanLibrary(java.io.StreamTokenizer stok,
                               java.util.Map library,
                               boolean namedFormat)
                        throws java.io.IOException
Reads a library of PolyTrees from a StreamTokenizer.

Parameters:
stok - tokenizer from which to read library
library - library into which the PolyTrees read from the file will be placed. The library is simply a map of names onto PolyTree objects.
namedFormat - if true, then polyhedra will be read in using the named format used by ConvexPolyhedron.scanNamedFormat. Otherwise, the .obj format of ConvexPolyhedron.scan will be used
Throws:
java.io.IOException - if an I/O or format error occurs
See Also:
scanLibrary(String,Map,boolean)

createBox

public static PolyTree createBox(java.lang.String name,
                                 double wx,
                                 double wy,
                                 double wz)

createCylinder

public static PolyTree createCylinder(java.lang.String name,
                                      double r,
                                      double h,
                                      int nsides)

createSphere

public static PolyTree createSphere(java.lang.String name,
                                    double r,
                                    int nslices)

createRoundedCylinder

public static PolyTree createRoundedCylinder(java.lang.String name,
                                             double r,
                                             double h,
                                             int nslices)

createCone

public static PolyTree createCone(java.lang.String name,
                                  double rtop,
                                  double rbot,
                                  double h,
                                  int nsides)

createPrism

public static PolyTree createPrism(java.lang.String name,
                                   double[] xyTop,
                                   double[] xyBot,
                                   double h)

createPrism

public static PolyTree createPrism(java.lang.String name,
                                   double[] xy,
                                   double h)