Package com.ardor3d.renderer.state
Class WireframeState
java.lang.Object
com.ardor3d.renderer.state.RenderState
com.ardor3d.renderer.state.WireframeState
- All Implemented Interfaces:
Savable
WireframeState
maintains whether a node and its children should be drawn in wireframe or solid fill. By
default all nodes are rendered solid.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.state.RenderState
RenderState.StateStack, RenderState.StateType
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Default line styleprotected WireframeState.Face
Default wireframe of front and back.protected float
Default line width of 1 pixel.Fields inherited from class com.ardor3d.renderer.state.RenderState
_quickCompare
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFace()
Returns the face state of this wireframe state.float
Returns the current lineWidth.getType()
boolean
void
read
(InputCapsule capsule) void
setAntialiased
(boolean antialiased) Set whether this wireframe should use antialiasing when drawing lines.void
setFace
(WireframeState.Face face) setFace
sets which face will recieve the wireframe.void
setLineWidth
(float width) setLineWidth
sets the width of lines the wireframe is drawn in.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.renderer.state.RenderState
createState, extract, getClassTag, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
-
Field Details
-
_face
Default wireframe of front and back. -
_lineWidth
protected float _lineWidthDefault line width of 1 pixel. -
_antialiased
protected boolean _antialiasedDefault line style
-
-
Constructor Details
-
WireframeState
public WireframeState()
-
-
Method Details
-
getType
- Specified by:
getType
in classRenderState
- Returns:
- An statetype enum value for the subclass.
- See Also:
-
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 anIllegalArgumentException
.- Parameters:
width
- the line width, in pixels
-
getLineWidth
public float getLineWidth()Returns the current lineWidth.- Returns:
- the current LineWidth
-
setFace
setFace
sets which face will recieve the wireframe.- Parameters:
face
- which face will be rendered in wireframe.- Throws:
IllegalArgumentException
- if face is null
-
getFace
Returns the face state of this wireframe state.- Returns:
- The face state (one of WS_FRONT, WS_BACK, or WS_FRONT_AND_BACK)
-
setAntialiased
public void setAntialiased(boolean antialiased) Set whether this wireframe should use antialiasing when drawing lines. May decrease performance. If you want to enabled antialiasing, you should also use an alphastate with a source of SourceFunction.SourceAlpha and a destination of DB_ONE_MINUS_SRC_ALPHA or DB_ONE.- Parameters:
antialiased
- true for using smoothed antialiased lines.
-
isAntialiased
public boolean isAntialiased()- Returns:
- whether this wireframe uses antialiasing for drawing lines.
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classRenderState
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classRenderState
- Throws:
IOException
-
createStateRecord
- Specified by:
createStateRecord
in classRenderState
-