C# Class Reactor.Water

Drawable game component for water rendering. Renders the scene to reflection and refraction maps that are projected onto the water plane and are distorted based on two scrolling normal maps.
Afficher le fichier Open project: reisergames/reactor-v1 Class Usage Examples

Méthodes publiques

Méthode Description
Draw ( ) : void
Initialize ( ) : void
LoadContent ( ) : void
SetCamera ( Matrix viewProj, Vector3 pos ) : void

Set the ViewProjection matrix and position of the Camera.

Update ( ) : void
UpdateWaterMaps ( ) : void

Updates the reflection and refraction maps. Called on update.

Water ( ) : System

Private Methods

Méthode Description
GenTriGrid ( int numVertRows, int numVertCols, float dx, float dz, Vector3 center, Vector3 &verts, int &indices ) : void

Generates a grid of vertices to use for the water plane.

UpdateEffectParams ( ) : void

Updates effect parameters related to the water shader

Method Details

Draw() public méthode

public Draw ( ) : void
Résultat void

Initialize() public méthode

public Initialize ( ) : void
Résultat void

LoadContent() public méthode

public LoadContent ( ) : void
Résultat void

SetCamera() public méthode

Set the ViewProjection matrix and position of the Camera.
public SetCamera ( Matrix viewProj, Vector3 pos ) : void
viewProj Matrix
pos Vector3
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

UpdateWaterMaps() public méthode

Updates the reflection and refraction maps. Called on update.
public UpdateWaterMaps ( ) : void
Résultat void

Water() public méthode

public Water ( ) : System
Résultat System