Back to bsyte

Zone Class Reference

Container-Klasse fuer alle Tiles die zu einer Zone gehoeren. More...

#include <Zone.h>

Collaboration diagram for Zone:

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

Zone::Zone ( )

Konstruktor.

Here is the call graph for this function:

Zone::Zone ( int  zoneID)

Konstruktor.

Parameters:
zoneIDUnique Identifier der Zone

Here is the call graph for this function:

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:
posXX-Komponente der Position des PointLight
posYY-Komponente der Position des PointLight
posZZ-Komponente der Position des PointLight
castShadowstrue--> Wirft potentiell Schatten, false --> keine Schatten
rangeParameter aus DeleD, wird aktuell nur mitgeschleift
intensityParameter aus DeleD, wird aktuell nur mitgeschleift
constantKonstanter Anteil fuer die PointLight-Formel
linearLinearer Anteil fuer die PointLight-Formel
quadraticQuadratischer Anteil fuer die PointLight-Formel
See also:
LightPoint::calc

Here is the caller graph for this function:

void Zone::addTile ( Tile tile)

Fuegt eine Tile hinzu. Die Zone erhaelt die Besitzrechte und darf die Tile spaeter auch loeschen!

Parameters:
tilePointer auf Tile
void Zone::dump ( void  )

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

Here is the caller graph for this function:

float Zone::getDirectionalMax ( )

Liefert den max. Wert (normiert auf 1.0) fuer direktes Licht fuer diese Zone.

Returns:
max directional Wert

Here is the caller graph for this function:

float Zone::getPointMax ( )

Liefert den max. Wert (normiert auf 1.0) fuer Punktlicht fuer diese Zone.

Returns:
max PointLight Wert

Here is the caller graph for this function:

int Zone::getZoneID ( )

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:
zoneIDUnique Identifier der Zone

Here is the call graph for this function:

Here is the caller graph for this function:

void Zone::load ( DataInputStream dataIn)

Liest das Zonen-Objekt aus dem Inputstream.

Parameters:
dataInDataInputStream

Here is the call graph for this function:

Here is the caller graph for this function:

void Zone::save ( DataOutputStream dataOut)

Serialisiert das Zonen-Objekt in den Outputstream.

Parameters:
dataOutDataOutputStream
Exceptions:
IOException

Here is the call graph for this function:

Here is the caller graph for this function:

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:
ambientMaxauf 1.0 normierter MaximalWert fuer das ambiente Licht
directionalMaxauf 1.0 normierter Maximalwert fuer direktes Licht
pointMaxauf 1.0 normierter Maximalwert fuer der Punktlichtanteil

Here is the caller graph for this function:

void Zone::setDirectionalLight ( float  dirX,
float  dirY,
float  dirZ 
)

Setzt die Richtung fuer das Directional Light.

Parameters:
dirXX-Komponente des Richtungsvektors fuer Directional Light
dirYY-Komponente des Richtungsvektors fuer Directional Light
dirZZ-Komponente des Richtungsvektors fuer Directional Light

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::vector<Tile*> Zone::m_tileList
float Zone::m_xmax [private]
float Zone::m_xmin [private]
float Zone::m_ymax [private]
float Zone::m_ymin [private]
float Zone::m_zmax [private]
float Zone::m_zmin [private]

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