Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Ogre::ShadowVolumeExtrudeProgram Class Reference

Static class containing source for vertex programs for extruding shadow volumes. More...

#include <OgreShadowVolumeExtrudeProgram.h>

List of all members.

Public Types

enum  Programs {
  POINT_LIGHT = 0, POINT_LIGHT_DEBUG = 1, DIRECTIONAL_LIGHT = 2, DIRECTIONAL_LIGHT_DEBUG = 3,
  POINT_LIGHT_FINITE = 4, POINT_LIGHT_FINITE_DEBUG = 5, DIRECTIONAL_LIGHT_FINITE = 6, DIRECTIONAL_LIGHT_FINITE_DEBUG = 7
}

Static Public Member Functions

void initialise (void)
 Initialise the creation of these vertex programs.

void shutdown (void)
 Shutdown & destroy the vertex programs.

const StringgetPointLightExtruderArbvp1 (void)
 Get extruder program source for point lights, compatible with arbvp1.

const StringgetPointLightExtruderVs_1_1 (void)
 Get extruder program source for point lights, compatible with vs_1_1.

const StringgetDirectionalLightExtruderArbvp1 (void)
 Get extruder program source for directional lights, compatible with arbvp1.

const StringgetDirectionalLightExtruderVs_1_1 (void)
 Get extruder program source for directional lights, compatible with vs_1_1.

const StringgetPointLightExtruderArbvp1Debug (void)
 Get extruder program source for debug point lights, compatible with arbvp1.

const StringgetPointLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1.

const StringgetDirectionalLightExtruderArbvp1Debug (void)
 Get extruder program source for debug directional lights, compatible with arbvp1.

const StringgetDirectionalLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug directional lights, compatible with vs_1_1.

const StringgetProgramSource (Light::LightTypes lightType, const String syntax, bool finite, bool debug)
 General purpose method to get any of the program sources.

const StringgetProgramName (Light::LightTypes lightType, bool finite, bool debug)
const StringgetPointLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for point lights, compatible with arbvp1.

const StringgetPointLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for point lights, compatible with vs_1_1.

const StringgetDirectionalLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with arbvp1.

const StringgetDirectionalLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with vs_1_1.

const StringgetPointLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug point lights, compatible with arbvp1.

const StringgetPointLightExtruderVs_1_1FiniteDebug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1.

const StringgetDirectionalLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with arbvp1.

const StringgetDirectionalLightExtruderVs_1_1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.


Static Public Attributes

const String programNames [OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS]

Static Private Attributes

String mPointArbvp1
String mPointVs_1_1
String mDirArbvp1
String mDirVs_1_1
String mPointArbvp1Debug
String mPointVs_1_1Debug
String mDirArbvp1Debug
String mDirVs_1_1Debug
String mPointArbvp1Finite
String mPointVs_1_1Finite
String mDirArbvp1Finite
String mDirVs_1_1Finite
String mPointArbvp1FiniteDebug
String mPointVs_1_1FiniteDebug
String mDirArbvp1FiniteDebug
String mDirVs_1_1FiniteDebug
bool mInitialised


Detailed Description

Static class containing source for vertex programs for extruding shadow volumes.

Remarks:
This exists so we don't have to be dependent on an external media files. Assembler is used so we don't have to rely on particular plugins. The assembler contents of this file were generated from the following Cg:
// Point light shadow volume extrude void shadowVolumeExtrudePointLight_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos // homogenous, object space ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float4 newpos = (wcoord.xxxx * lightPos) + float4(position.xyz - lightPos.xyz, 0); oPosition = mul(worldViewProjMatrix, newpos); } // Directional light extrude void shadowVolumeExtrudeDirLight_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos // homogenous, object space ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float4 newpos = (wcoord.xxxx * (position + lightPos)) - lightPos; oPosition = mul(worldViewProjMatrix, newpos); } // Point light shadow volume extrude - FINITE void shadowVolumeExtrudePointLightFinite_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos, // homogenous, object space uniform float extrusionDistance // how far to extrude ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 float3 extrusionDir = position.xyz - lightPos.xyz; extrusionDir = normalize(extrusionDir); float4 newpos = float4(position.xyz + ((1 - wcoord.x) * extrusionDistance * extrusionDir), 1); oPosition = mul(worldViewProjMatrix, newpos); } // Directional light extrude - FINITE void shadowVolumeExtrudeDirLightFinite_vp ( float4 position : POSITION, float wcoord : TEXCOORD0, out float4 oPosition : POSITION, uniform float4x4 worldViewProjMatrix, uniform float4 lightPos, // homogenous, object space uniform float extrusionDistance // how far to extrude ) { // extrusion in object space // vertex unmodified if w==1, extruded if w==0 // -ve lightPos is direction float4 newpos = float4(position.xyz - (wcoord.x * extrusionDistance * lightPos.xyz), 1); oPosition = mul(worldViewProjMatrix, newpos); }

Definition at line 126 of file OgreShadowVolumeExtrudeProgram.h.


Member Enumeration Documentation

enum Ogre::ShadowVolumeExtrudeProgram::Programs
 

Enumeration values:
POINT_LIGHT 
POINT_LIGHT_DEBUG 
DIRECTIONAL_LIGHT 
DIRECTIONAL_LIGHT_DEBUG 
POINT_LIGHT_FINITE 
POINT_LIGHT_FINITE_DEBUG 
DIRECTIONAL_LIGHT_FINITE 
DIRECTIONAL_LIGHT_FINITE_DEBUG 

Definition at line 153 of file OgreShadowVolumeExtrudeProgram.h.


Member Function Documentation

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1 void   )  [static]
 

Get extruder program source for directional lights, compatible with arbvp1.

Definition at line 184 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Debug void   )  [static]
 

Get extruder program source for debug directional lights, compatible with arbvp1.

Definition at line 193 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Finite void   )  [static]
 

Get FINITE extruder program source for directional lights, compatible with arbvp1.

Definition at line 211 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1FiniteDebug void   )  [static]
 

Get FINITE extruder program source for debug directional lights, compatible with arbvp1.

Definition at line 220 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1 void   )  [static]
 

Get extruder program source for directional lights, compatible with vs_1_1.

Definition at line 186 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Debug void   )  [static]
 

Get extruder program source for debug directional lights, compatible with vs_1_1.

Definition at line 195 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Finite void   )  [static]
 

Get FINITE extruder program source for directional lights, compatible with vs_1_1.

Definition at line 213 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1FiniteDebug void   )  [static]
 

Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.

Definition at line 222 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1 void   )  [static]
 

Get extruder program source for point lights, compatible with arbvp1.

Definition at line 180 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Debug void   )  [static]
 

Get extruder program source for debug point lights, compatible with arbvp1.

Definition at line 189 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Finite void   )  [static]
 

Get FINITE extruder program source for point lights, compatible with arbvp1.

Definition at line 207 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1FiniteDebug void   )  [static]
 

Get FINITE extruder program source for debug point lights, compatible with arbvp1.

Definition at line 216 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1 void   )  [static]
 

Get extruder program source for point lights, compatible with vs_1_1.

Definition at line 182 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Debug void   )  [static]
 

Get extruder program source for debug point lights, compatible with vs_1_1.

Definition at line 191 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Finite void   )  [static]
 

Get FINITE extruder program source for point lights, compatible with vs_1_1.

Definition at line 209 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1FiniteDebug void   )  [static]
 

Get extruder program source for debug point lights, compatible with vs_1_1.

Definition at line 218 of file OgreShadowVolumeExtrudeProgram.h.

References Ogre::String.

const String& Ogre::ShadowVolumeExtrudeProgram::getProgramName Light::LightTypes  lightType,
bool  finite,
bool  debug
[static]
 

const String& Ogre::ShadowVolumeExtrudeProgram::getProgramSource Light::LightTypes  lightType,
const String  syntax,
bool  finite,
bool  debug
[static]
 

General purpose method to get any of the program sources.

void Ogre::ShadowVolumeExtrudeProgram::initialise void   )  [static]
 

Initialise the creation of these vertex programs.

void Ogre::ShadowVolumeExtrudeProgram::shutdown void   )  [static]
 

Shutdown & destroy the vertex programs.


Member Data Documentation

String Ogre::ShadowVolumeExtrudeProgram::mDirArbvp1 [static, private]
 

Definition at line 131 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirArbvp1Debug [static, private]
 

Definition at line 136 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirArbvp1Finite [static, private]
 

Definition at line 141 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirArbvp1FiniteDebug [static, private]
 

Definition at line 146 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirVs_1_1 [static, private]
 

Definition at line 132 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirVs_1_1Debug [static, private]
 

Definition at line 137 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirVs_1_1Finite [static, private]
 

Definition at line 142 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mDirVs_1_1FiniteDebug [static, private]
 

Definition at line 147 of file OgreShadowVolumeExtrudeProgram.h.

bool Ogre::ShadowVolumeExtrudeProgram::mInitialised [static, private]
 

Definition at line 149 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointArbvp1 [static, private]
 

Definition at line 129 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointArbvp1Debug [static, private]
 

Definition at line 134 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointArbvp1Finite [static, private]
 

Definition at line 139 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointArbvp1FiniteDebug [static, private]
 

Definition at line 144 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointVs_1_1 [static, private]
 

Definition at line 130 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointVs_1_1Debug [static, private]
 

Definition at line 135 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointVs_1_1Finite [static, private]
 

Definition at line 140 of file OgreShadowVolumeExtrudeProgram.h.

String Ogre::ShadowVolumeExtrudeProgram::mPointVs_1_1FiniteDebug [static, private]
 

Definition at line 145 of file OgreShadowVolumeExtrudeProgram.h.

const String Ogre::ShadowVolumeExtrudeProgram::programNames[OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS] [static]
 

Definition at line 173 of file OgreShadowVolumeExtrudeProgram.h.


The documentation for this class was generated from the following file:

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:44:09 2006