org.xith3d.scenegraph.utils
Class ShapeUtils

java.lang.Object
  extended by org.xith3d.scenegraph.utils.ShapeUtils

public final class ShapeUtils
extends java.lang.Object

Provides static Shape3D utility methods.


Constructor Summary
ShapeUtils()
           
 
Method Summary
static float getShapesTransparency(Shape3D shape)
           
static Group mergeShapesITA(Shape3D... shapes)
           
static Group mergeShapesTA(Shape3D... shapes)
           
static void setShapesTransparency(Shape3D shape, float transparency, boolean allowNullTA, boolean allowUnblended)
          Sets a Shape3D's transparency.
static void setTransparency(Node node, float transparency)
          Sets the transparency of all Shape3Ds in the given Group, recursively or of this node if it's a Shape3D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeUtils

public ShapeUtils()
Method Detail

setShapesTransparency

public static final void setShapesTransparency(Shape3D shape,
                                               float transparency,
                                               boolean allowNullTA,
                                               boolean allowUnblended)
Sets a Shape3D's transparency.

Parameters:
shape - the Shape3D to manipulate
transparency - <= 0 for not transparent, > 0, <= 1 for transparent
allowNullTA - if true, then the TransparencyAttributes are set to null, if transparency is <= 0

getShapesTransparency

public static final float getShapesTransparency(Shape3D shape)
Parameters:
shape - the Shape3D, which's transparency is to be read
Returns:
a Shape3D's transparency.

setTransparency

public static void setTransparency(Node node,
                                   float transparency)
Sets the transparency of all Shape3Ds in the given Group, recursively or of this node if it's a Shape3D. If you call it on a Node, which isn't either a Shape3D or a NodeGroup, it will just do nothing.

Parameters:
node - The Shape3D/Group to set the Transparency to
transparency - A value in the range [0f-1f], 0f being completely opaque, and 1f completely transparent

mergeShapesTA

public static Group mergeShapesTA(Shape3D... shapes)

mergeShapesITA

public static Group mergeShapesITA(Shape3D... shapes)