Container-Klasse fuer alle Tiles die zu einer Zone gehoeren.
More...
#include <Zone.h>
List of all members.
Public Member Functions |
| | Zone () |
| | Konstruktor.
|
| | Zone (int zoneID) |
| | Konstruktor.
|
| virtual | ~Zone () |
| | Destruktor. Loescht alle zugehoerigen Tiles und Lights.
|
| void | addTile (Tile *tile) |
| | Fuegt eine Tile hinzu. Die Zone erhaelt die Besitzrechte und darf die Tile spaeter auch loeschen!
|
| void | load (DataInputStream &dataIn) |
| | Liest das Zonen-Objekt aus dem Inputstream.
|
| void | save (DataOutputStream &dataOut) |
| | Serialisiert das Zonen-Objekt in den Outputstream.
|
| void | set (float ambient, float directionalMax, float pointMax) |
| | Setter fuer die Intensitaet der Beleuchungskomponenten Ambient, Directional und Pointlights. Die Summe darf 1.0 nicht uebersteigen.
|
| void | setDirectionalLight (float dirX, float dirY, float dirZ) |
| | Setzt die Richtung fuer das Directional Light.
|
| void | addPointLight (float posX, float posY, float posZ, bool castShadows, float range, float intensity, float constant, float linear, float quadratic) |
| | Fuegt ein PointLight hinzu.
|
| int | getZoneID () |
| | Getter fuer die ZoneID.
|
| float | getAmbient () |
| | liefert den max. Wert (normiert auf 1.0) fuer ambientes Licht fuer diese Zone
|
| float | getDirectionalMax () |
| | Liefert den max. Wert (normiert auf 1.0) fuer direktes Licht fuer diese Zone.
|
| float | getPointMax () |
| | Liefert den max. Wert (normiert auf 1.0) fuer Punktlicht fuer diese Zone.
|
| bool | hasPointLights () |
| | Liefert Info, ob es in dieser Zone Pointlights gibt UND der prozentuale Anteil fuer Pointlights > 0.1 ist.
|
| void | dump () |
| | Dump-Methode fuer Debugging.
|
Public Attributes |
| int | m_zoneID |
| Vec | m_dir |
| std::vector< LightPoint * > | lightPointList |
| std::vector< Tile * > | m_tileList |
| bool | m_hasSkyBox |
| float | m_ambientMax |
| float | m_directionalMax |
| float | m_pointMax |
Private Member Functions |
| void | init (int zoneID) |
| | Initialisiert das Zonen-Objekt.
|
Private Attributes |
| float | m_xmin |
| float | m_xmax |
| float | m_ymin |
| float | m_ymax |
| float | m_zmin |
| float | m_zmax |
Detailed Description
Container-Klasse fuer alle Tiles die zu einer Zone gehoeren.
Constructor & Destructor Documentation
Konstruktor.
- Parameters:
-
| zoneID | Unique Identifier der Zone |
| Zone::~Zone |
( |
| ) |
[virtual] |
Destruktor. Loescht alle zugehoerigen Tiles und Lights.
Member Function Documentation
| void Zone::addPointLight |
( |
float |
posX, |
|
|
float |
posY, |
|
|
float |
posZ, |
|
|
bool |
castShadows, |
|
|
float |
range, |
|
|
float |
intensity, |
|
|
float |
constant, |
|
|
float |
linear, |
|
|
float |
quadratic |
|
) |
| |
Fuegt ein PointLight hinzu.
- Parameters:
-
| posX | X-Komponente der Position des PointLight |
| posY | Y-Komponente der Position des PointLight |
| posZ | Z-Komponente der Position des PointLight |
| castShadows | true--> Wirft potentiell Schatten, false --> keine Schatten |
| range | Parameter aus DeleD, wird aktuell nur mitgeschleift |
| intensity | Parameter aus DeleD, wird aktuell nur mitgeschleift |
| constant | Konstanter Anteil fuer die PointLight-Formel |
| linear | Linearer Anteil fuer die PointLight-Formel |
| quadratic | Quadratischer Anteil fuer die PointLight-Formel |
- See also:
- LightPoint::calc
| void Zone::addTile |
( |
Tile * |
tile | ) |
|
Fuegt eine Tile hinzu. Die Zone erhaelt die Besitzrechte und darf die Tile spaeter auch loeschen!
- Parameters:
-
Dump-Methode fuer Debugging.
| float Zone::getAmbient |
( |
| ) |
|
liefert den max. Wert (normiert auf 1.0) fuer ambientes Licht fuer diese Zone
- Returns:
- max ambient Wert
| float Zone::getDirectionalMax |
( |
| ) |
|
Liefert den max. Wert (normiert auf 1.0) fuer direktes Licht fuer diese Zone.
- Returns:
- max directional Wert
| float Zone::getPointMax |
( |
| ) |
|
Liefert den max. Wert (normiert auf 1.0) fuer Punktlicht fuer diese Zone.
- Returns:
- max PointLight Wert
Getter fuer die ZoneID.
- Returns:
- zoneID die ZoneNr
| bool Zone::hasPointLights |
( |
| ) |
|
Liefert Info, ob es in dieser Zone Pointlights gibt UND der prozentuale Anteil fuer Pointlights > 0.1 ist.
- Returns:
- true --> PointLights muessen berechnet werden, false --> Keine PointLights
| void Zone::init |
( |
int |
zoneID | ) |
[private] |
Initialisiert das Zonen-Objekt.
- Parameters:
-
| zoneID | Unique Identifier der Zone |
Liest das Zonen-Objekt aus dem Inputstream.
- Parameters:
-
Serialisiert das Zonen-Objekt in den Outputstream.
- Parameters:
-
- Exceptions:
-
| void Zone::set |
( |
float |
ambientMax, |
|
|
float |
directionalMax, |
|
|
float |
pointMax |
|
) |
| |
Setter fuer die Intensitaet der Beleuchungskomponenten Ambient, Directional und Pointlights. Die Summe darf 1.0 nicht uebersteigen.
- Parameters:
-
| ambientMax | auf 1.0 normierter MaximalWert fuer das ambiente Licht |
| directionalMax | auf 1.0 normierter Maximalwert fuer direktes Licht |
| pointMax | auf 1.0 normierter Maximalwert fuer der Punktlichtanteil |
| void Zone::setDirectionalLight |
( |
float |
dirX, |
|
|
float |
dirY, |
|
|
float |
dirZ |
|
) |
| |
Setzt die Richtung fuer das Directional Light.
- Parameters:
-
| dirX | X-Komponente des Richtungsvektors fuer Directional Light |
| dirY | Y-Komponente des Richtungsvektors fuer Directional Light |
| dirZ | Z-Komponente des Richtungsvektors fuer Directional Light |
Member Data Documentation
The documentation for this class was generated from the following files:
- E:/project/engine3d/cplusplus/src/engine/Zone.h
- E:/project/engine3d/cplusplus/src/engine/Zone.cpp