Click or drag to resize
DigitalRuneGraphicsHelper Class
Provides helper methods for graphics-related tasks.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsGraphicsHelper

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static class GraphicsHelper

The GraphicsHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDrawFullScreenQuad
Draws a full-screen quad.
Public methodStatic memberDrawQuad(GraphicsDevice, Rectangle)
Draws a screen-aligned quad.
Public methodStatic memberDrawQuad(GraphicsDevice, VertexPositionTexture, VertexPositionTexture)
Draws a screen-aligned quad.
Public methodStatic memberDrawQuad(GraphicsDevice, Rectangle, Vector2F, Vector2F)
Draws a screen-aligned quad.
Public methodStatic memberGetAngularAttenuation
Computes the angular attenuation (spotlight falloff) for a given angle.
Public methodStatic memberGetCubeMapForwardDirection
Gets the camera forward direction for rendering into a cube map face.
Public methodStatic memberGetCubeMapUpDirection
Gets the camera up direction for rendering into a cube map face.
Public methodStatic memberGetDistanceAttenuation
Computes the light attenuation factor for a given distance.
Public methodStatic memberGetFrustumFarCorners(Projection, Vector3)
Gets the view space positions of the 4 far corners of the viewing frustum.
Public methodStatic memberGetFrustumFarCorners(Projection, Vector2F, Vector2F, Vector3)
Gets the view space positions of the 4 far corners of a quad at the far plane of the viewing frustum.
Public methodStatic memberGetLightContribution
Gets a factor that is an approximation of the perceived light contribution of the given light falling on an object at the given world space position.
Public methodStatic memberGetScissorRectangle(CameraNode, Viewport, IGeometricObject)
Gets a scissor rectangle that encloses the specified geometric object.
Public methodStatic memberGetScissorRectangle(CameraNode, Viewport, Vector3F, Single)
Gets a scissor rectangle that encloses the specified sphere.
Public methodStatic memberGetSpriteBatch
Gets a shared SpriteBatch instance.
Public methodStatic memberGetUniqueColor
Gets a unique color for an object.
Public methodStatic memberGetViewNormalizedDistance(Single, Matrix44F)
Converts the specified distance to a view-normalized distance ("LOD distance").
Public methodStatic memberGetViewNormalizedDistance(SceneNode, CameraNode)
Calculates the view-normalized distance ("LOD distance") of the specified scene node.
Public methodStatic memberProject(Viewport, Vector3F, Matrix44F)
Projects a position from world space into screen space.
Public methodStatic memberProject(Viewport, Vector3F, Matrix44F, Matrix44F)
Projects a position from world space into screen space.
Public methodStatic memberProject(Viewport, Vector3F, Matrix44F, Matrix44F, Matrix44F)
Projects a position from object space into screen space.
Public methodStatic memberResetTextures
Sets the textures of all samplers to .
Public methodStatic memberTakeScreenshot
Creates a texture containing the content of the current back buffer. (Only available in the HiDef profile.)
Public methodStatic memberUnproject(Viewport, Vector3F, Matrix44F)
Projects a position from screen space into view space.
Public methodStatic memberUnproject(Viewport, Vector3F, Matrix44F, Matrix44F)
Projects a position from screen space into world space.
Public methodStatic memberUnproject(Viewport, Vector3F, Matrix44F, Matrix44F, Matrix44F)
Projects a position from screen space into object space.
Top
Fields
  NameDescription
Public fieldStatic memberBlendStateAdd
A default state object for additive blending (colors and alpha values are accumulated).
Public fieldStatic memberBlendStateMultiply
A default state object for multiplicative blending (colors and alpha values are multiplied).
Public fieldStatic memberBlendStateNoColorWrite
A default state object for disabled color writes.
Public fieldStatic memberBlendStateWriteAlpha
A default state object for color writes in the alpha channel.
Public fieldStatic memberBlendStateWriteBlue
A default state object for color writes in the blue channel.
Public fieldStatic memberBlendStateWriteGreen
A default state object for color writes in the green channel.
Public fieldStatic memberBlendStateWriteRed
A default state object for color writes in the red channel.
Public fieldStatic memberDepthStencilStateAlways
A default state object for enabled depth buffer writes and a disabled depth buffer test.
Public fieldStatic memberDepthStencilStateNoWriteEqual
A default state object for disabled depth buffer writes and a depth buffer function of "Equal".
Public fieldStatic memberDepthStencilStateNoWriteGreater
A default state object for disabled depth buffer writes and a depth buffer function of "Greater".
Public fieldStatic memberDepthStencilStateNoWriteGreaterEqual
A default state object for disabled depth buffer writes and a depth buffer function of "GreaterEqual".
Public fieldStatic memberDepthStencilStateNoWriteLessEqual
A default state object for disabled depth buffer writes and a depth buffer function of "LessEqual".
Public fieldStatic memberLuminanceWeights
The weights for red, green and blue to convert a color to a luminance.
Public fieldStatic memberProjectorBiasMatrix
A bias matrix that converts a vector from clip space to texture space.
Public fieldStatic memberRasterizerStateCullClockwise
A rasterizer state object with settings for culling primitives with clockwise winding order.
Public fieldStatic memberRasterizerStateCullCounterClockwise
A rasterizer state object with settings for culling primitives with counter-clockwise winding order.
Public fieldStatic memberRasterizerStateCullNone
A rasterizer state object with settings for not culling primitives.
Public fieldStatic memberRasterizerStateWireFrame
A default state object for wire-frame rendering.
Public fieldStatic memberRGBToXYZ
A matrix which converts colors from the sRGB color space to the CIE XYZ color space.
Public fieldStatic memberXYZToRGB
A matrix which converts colors from the CIE XYZ color space to the sRGB color space.
Top
Remarks

This class provides several default render state objects (e.g. BlendStateAdd). These default render state objects are only created once per graphics device and are reused. This objects must not be modified.

See Also