org.xith3d.scenegraph.utils
Class ShapeUtils
java.lang.Object
org.xith3d.scenegraph.utils.ShapeUtils
public final class ShapeUtils
- extends java.lang.Object
Provides static Shape3D utility methods.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShapeUtils
public ShapeUtils()
setShapesTransparency
public static final void setShapesTransparency(Shape3D shape,
float transparency,
boolean allowNullTA)
- Sets a Shape3D's transparency.
- Parameters:
shape - the Shape3D to manipulatetransparency - <= 0 for not transparent, > 0, <= 1 for transparentallowNullTA - 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 totransparency - 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)