Microsoft.Xna.Framework.Graphics
Class RasterizerState

java.lang.Object
  extended by Microsoft.Xna.Framework.Graphics.GraphicsResource
      extended by Microsoft.Xna.Framework.Graphics.RasterizerState
All Implemented Interfaces:
IDisposable

public class RasterizerState
extends GraphicsResource

Contains Rasterizer State, which determines how to convert vector data (shapes) into raster data (pixels).

Author:
Halofreak1990

Field Summary
static RasterizerState CullClockwise
          A built-in state object with settings for culling primitives with clockwise winding order.
static RasterizerState CullCounterClockwise
          A built-in state object with settings for culling primitives with counter-clockwise winding order.
static RasterizerState CullNone
          A built-in state object with settings for not culling any primitives.
 
Fields inherited from class Microsoft.Xna.Framework.Graphics.GraphicsResource
_parent, Disposing, Name, Tag
 
Method Summary
 CullMode getCullMode()
           
 float getDepthBias()
          Retrieves the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth.
 FillMode getFillMode()
           
 boolean getMultiSampleAntiAlias()
           
 boolean getScissorTestEnable()
           
 float getSlopeScaleDepthBias()
          Gets a bias value that takes into account the slope of a polygon.
 void setCullMode(CullMode value)
          Specifies the conditions for culling or removing triangles.
 void setDepthBias(float value)
          Sets the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth.
 void setFillMode(FillMode value)
          The fill mode, which defines how a triangle is filled during rendering.
 void setMultiSampleAntiAlias(boolean value)
          Enables or disables multisample antialiasing.
 void setScissorTestEnable(boolean value)
          Enables or disables scissor testing.
 void setSlopeScaleDepthBias(float value)
          Sets a bias value that takes into account the slope of a polygon.
 
Methods inherited from class Microsoft.Xna.Framework.Graphics.GraphicsResource
Dispose, Dispose, finalize, GraphicsDevice, IsDisposed, raise_disposing, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CullClockwise

public static final RasterizerState CullClockwise
A built-in state object with settings for culling primitives with clockwise winding order.


CullCounterClockwise

public static final RasterizerState CullCounterClockwise
A built-in state object with settings for culling primitives with counter-clockwise winding order.


CullNone

public static final RasterizerState CullNone
A built-in state object with settings for not culling any primitives.

Method Detail

getCullMode

public CullMode getCullMode()

setCullMode

public void setCullMode(CullMode value)
Specifies the conditions for culling or removing triangles. The default value is CullMode.CounterClockwise.

Parameters:
value -

getDepthBias

public float getDepthBias()
Retrieves the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth.


setDepthBias

public void setDepthBias(float value)
Sets the depth bias for polygons, which is the amount of bias to apply to the depth of a primitive to alleviate depth testing problems for primitives of similar depth. The default value is 0.


getFillMode

public FillMode getFillMode()

setFillMode

public void setFillMode(FillMode value)
The fill mode, which defines how a triangle is filled during rendering. The default is FillMode.Solid.


getMultiSampleAntiAlias

public boolean getMultiSampleAntiAlias()

setMultiSampleAntiAlias

public void setMultiSampleAntiAlias(boolean value)
Enables or disables multisample antialiasing. The default is true.


getScissorTestEnable

public boolean getScissorTestEnable()

setScissorTestEnable

public void setScissorTestEnable(boolean value)
Enables or disables scissor testing. The default is false.


getSlopeScaleDepthBias

public float getSlopeScaleDepthBias()
Gets a bias value that takes into account the slope of a polygon. This bias value is applied to coplanar primitives to reduce aliasing and other rendering artifacts caused by z-fighting.


setSlopeScaleDepthBias

public void setSlopeScaleDepthBias(float value)
Sets a bias value that takes into account the slope of a polygon. This bias value is applied to coplanar primitives to reduce aliasing and other rendering artifacts caused by z-fighting. The default is 0.