com.threerings.tudey.client.util
Class AreaElement

java.lang.Object
  extended by com.threerings.opengl.util.SimpleRenderable
      extended by com.threerings.opengl.util.SimpleTransformable
          extended by com.threerings.opengl.scene.SimpleSceneElement
              extended by com.threerings.tudey.client.util.AreaElement
All Implemented Interfaces:
Compositable, Enqueueable, SceneElement, SceneObject, Intersectable, Tickable

public class AreaElement
extends SimpleSceneElement

Displays a solid area.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.opengl.scene.SceneElement
SceneElement.TickPolicy
 
Constructor Summary
AreaElement(GlContext ctx)
          Creates a new area element.
 
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 setVertices(TudeySceneModel.Vertex[] vertices)
          Sets the vertices of the area.
 void setVisible(boolean visible)
          Update the visibility.
 
Methods inherited from class com.threerings.opengl.scene.SimpleSceneElement
getBounds, getTickPolicy, getUserObject, setInfluences, setTickPolicy, setTransform, setUserObject, tick, updateBounds, updateLastVisit, wasAdded, willBeRemoved
 
Methods inherited from class com.threerings.opengl.util.SimpleTransformable
enqueue, getTransform
 
Methods inherited from class com.threerings.opengl.util.SimpleRenderable
composite, getStates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.opengl.compositor.Compositable
composite
 

Constructor Detail

AreaElement

public AreaElement(GlContext ctx)
Creates a new area element.

Method Detail

setVertices

public void setVertices(TudeySceneModel.Vertex[] vertices)
Sets the vertices of the area.


getColor

public Color4f getColor()
Returns a reference to the outline color.


setVisible

public void setVisible(boolean visible)
Update the visibility.


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.