C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Draw() публичный Метод

public Draw ( ) : void
Результат void

Initialize() публичный Метод

public Initialize ( ) : void
Результат void

LoadContent() публичный Метод

public LoadContent ( ) : void
Результат void

SetCamera() публичный Метод

Set the ViewProjection matrix and position of the Camera.
public SetCamera ( Matrix viewProj, Vector3 pos ) : void
viewProj Matrix
pos Vector3
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void

UpdateWaterMaps() публичный Метод

Updates the reflection and refraction maps. Called on update.
public UpdateWaterMaps ( ) : void
Результат void

Water() публичный Метод

public Water ( ) : System
Результат System