com.threerings.tudey.client.util
Class ShapeConfigElement
java.lang.Object
com.threerings.opengl.util.SimpleRenderable
com.threerings.opengl.util.SimpleTransformable
com.threerings.opengl.scene.SimpleSceneElement
com.threerings.tudey.client.util.ShapeConfigElement
- All Implemented Interfaces:
- Compositable, Enqueueable, SceneElement, SceneObject, Intersectable, Tickable
public class ShapeConfigElement
- extends SimpleSceneElement
Draws a shape from its config.
|
Method Summary |
Color4f |
getColor()
Returns a reference to the outline color. |
boolean |
getIntersection(Ray3D ray,
Vector3f result)
Finds the intersection of a ray with this object and places it in the supplied vector
(if it exists). |
void |
setConfig(ShapeConfig config,
boolean outline)
Sets the configuration of the shape to draw. |
| Methods inherited from class com.threerings.opengl.scene.SimpleSceneElement |
getBounds, getTickPolicy, getUserObject, setInfluences, setTickPolicy, setTransform, setUserObject, tick, updateBounds, updateLastVisit, wasAdded, willBeRemoved |
ShapeConfigElement
public ShapeConfigElement(GlContext ctx)
- Creates a new shape config element.
setConfig
public void setConfig(ShapeConfig config,
boolean outline)
- Sets the configuration of the shape to draw.
- Parameters:
outline - if true, draw the outline of the shape; if false, draw the solid form.
getColor
public Color4f getColor()
- Returns a reference to the outline color.
getIntersection
public boolean getIntersection(Ray3D ray,
Vector3f result)
- Description copied from interface:
Intersectable
- Finds the intersection of a ray with this object and places it in the supplied vector
(if it exists).
- Specified by:
getIntersection in interface Intersectable- Overrides:
getIntersection in class SimpleSceneElement
- Returns:
- true if the ray intersected the object (in which case the result will contain the
point of intersection), false otherwise.
Copyright © 2011. All Rights Reserved.