com.jme.scene.state
Class WireframeState

java.lang.Object
  extended bycom.jme.scene.state.RenderState
      extended bycom.jme.scene.state.WireframeState
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LWJGLWireframeState

public abstract class WireframeState
extends RenderState

WireframeState maintains whether a node and it's children should be drawn in wireframe or solid fill. By default all nodes are rendered solid.

Version:
$Id: WireframeState.java,v 1.6 2004/08/03 06:26:41 cep21 Exp $
Author:
Mark Powell
See Also:
Serialized Form

Field Summary
protected  int face
          Default wireframe of front and back.
protected  float lineWidth
          Default line width of 1 pixel.
static int WS_BACK
          The back will be wireframed, but the front will be solid.
static int WS_FRONT
          The front will be wireframed, but the back will be solid.
static int WS_FRONT_AND_BACK
          Both sides of the model are wireframed.
 
Fields inherited from class com.jme.scene.state.RenderState
RS_ALPHA, RS_ATTRIBUTE, RS_CULL, RS_DITHER, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER
 
Constructor Summary
WireframeState()
           
 
Method Summary
 int getFace()
          Returns the face state of this wireframe state.
 float getLineWidth()
          Returns the current lineWidth.
 int getType()
          getType returns the type of render state this is.
 void setFace(int face)
          setFace sets which face will recieve the wireframe.
 void setLineWidth(float width)
          setLineWidth sets the width of lines the wireframe is drawn in.
 
Methods inherited from class com.jme.scene.state.RenderState
apply, extract, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WS_FRONT_AND_BACK

public static final int WS_FRONT_AND_BACK
Both sides of the model are wireframed.

See Also:
Constant Field Values

WS_FRONT

public static final int WS_FRONT
The front will be wireframed, but the back will be solid.

See Also:
Constant Field Values

WS_BACK

public static final int WS_BACK
The back will be wireframed, but the front will be solid.

See Also:
Constant Field Values

face

protected int face
Default wireframe of front and back.


lineWidth

protected float lineWidth
Default line width of 1 pixel.

Constructor Detail

WireframeState

public WireframeState()
Method Detail

getType

public int getType()
getType returns the type of render state this is. (RS_WIREFRAME).

Specified by:
getType in class RenderState
Returns:
An int identifying this render state.
See Also:
RenderState.getType()

setLineWidth

public void setLineWidth(float width)
setLineWidth sets the width of lines the wireframe is drawn in. Attempting to set a line width smaller than 0.0 throws an IllegalArgumentException.

Parameters:
width - the line width, in pixels

getLineWidth

public float getLineWidth()
Returns the current lineWidth.

Returns:
the current LineWidth

setFace

public void setFace(int face)
setFace sets which face will recieve the wireframe. One of WS_FRONT_AND_BACK, WS_FRONT, or WS_BACK

Parameters:
face - The flag signaling which face will recieve the wireframe.

getFace

public int getFace()
Returns the face state of this wireframe state.

Returns:
The face state (one of WS_FRONT, WS_BACK, or WS_FRONT_AND_BACK)