Loading...
Searching...
No Matches
BALL::VIEW::Stage Class Reference
Visualisation » Kernel » Setup of the Stage, Camera and LightSources

`#include <BALL/VIEW/KERNEL/stage.h>`

## Classes

class | Material
class | RaytracingMaterial

## Public Member Functions

Constructors and Destructors
| Stage ()
| Stage (const Stage &stage)
| Copy constructor.
virtual | ~Stage ()
| Destructor.
virtual void | clear ()
| Explicit default initialization.
Accessors
virtual const std::list< LightSource > & | getLightSources () const
| Get the light sources (const).
virtual LightSource & | getLightSource (Position i)
| Get a reference to the i-th light source.
virtual void | addLightSource (const LightSource &light_source)
| Add a light source.
virtual void | removeLightSource (const LightSource &light_source)
| Remove a light source.
void | clearLightSources ()
virtual Camera & | getCamera ()
| Get the camera.
virtual const Camera & | getCamera () const
| Get the camera (const).
virtual void | setCamera (const Camera &camera)
virtual const ColorRGBA & | getBackgroundColor () const
| Get the background color.
virtual void | setBackgroundColor (const ColorRGBA &color)
| Set the background color.
virtual const ColorRGBA & | getInfoColor () const
| Get the background color.
virtual void | setInfoColor (const ColorRGBA &color)
| Set the background color.
void | showCoordinateSystem (bool state)
| Show coordinate system.
bool | coordinateSystemEnabled () const
| Shows coordinate system.
void | setEyeDistance (float value)
| Set the eye distance for the stereo view.
float | getEyeDistance () const
| Get the eye distance for the stereo view.
void | setFocalDistance (float value)
| Set the focal distance for the stereo view.
float | getFocalDistance () const
| Get the focal distance for the stereo view.
void | setSwapSideBySideStereo (bool state)
| Settings for side by side stereo side swapping.
bool | swapSideBySideStereo () const
| Get settings for side by side stereo side swapping.
float | getFogIntensity () const
void | setFogIntensity (float value)

## Predicates

ColorRGBA | background_color_
ColorRGBA | info_color_
std::list< LightSource > | light_sources_
Camera | camera_
bool | show_coordinate_system_
float | fog_intensity_
float | eye_distance_
float | focal_distance_
bool | swap_side_by_side_stereo_
Material | material_
bool | operator== (const Stage &stage) const
Vector3 | calculateRelativeCoordinates (Vector3 pos) const
Vector3 | calculateAbsoluteCoordinates (Vector3 pos) const
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
Material & | getMaterial ()
| Gives access to the default material parameters.
const Material & | getMaterial () const
| Gives access to the default material parameters, const version.

## Detailed Description

A Stage has a Camera, LightSources and a background color. It stores also the eye distance for the stereo view. Finally a flag can be set, so that a coordinate system will be shown.

Definition at line 238 of file stage.h.

## Constructor & Destructor Documentation

## Stage() [1/2]

BALL::VIEW::Stage::Stage | ( |  | ) |

Default Constructor

## Stage() [2/2]

BALL::VIEW::Stage::Stage | ( | const Stage & | stage | ) |

Copy constructor.

## ~Stage()

virtual BALL::VIEW::Stage::~Stage | ( |  | ) |

inline virtual

Destructor.

Definition at line 304 of file stage.h.

## Member Function Documentation

## addLightSource()

virtual void BALL::VIEW::Stage::addLightSource | ( | const LightSource & | light_source | ) |

virtual

Add a light source.

## calculateAbsoluteCoordinates()

Vector3 BALL::VIEW::Stage::calculateAbsoluteCoordinates | ( | Vector3 | pos | ) | const

Calculate absolute room coordinates from relative coordinates.

See also
  calculateRelativeCoordinates

## calculateRelativeCoordinates()

Vector3 BALL::VIEW::Stage::calculateRelativeCoordinates | ( | Vector3 | pos | ) | const

Calculate coordiantes relative to the position of the camera in units of right_vector, look_up_vector and view_vector. This is done by calculating the normals to three planes, spaned by these three vectors. This method is e.g. used to store the coordinates of the relative light sources in the INIFile, or in the LightSettings dialog.

Returns
  Vector3(times right_vector, times look_up_vector, times view_vector)

## clear()

virtual void BALL::VIEW::Stage::clear | ( |  | ) |

virtual

Explicit default initialization.

## clearLightSources()

void BALL::VIEW::Stage::clearLightSources | ( |  | ) |

## coordinateSystemEnabled()

bool BALL::VIEW::Stage::coordinateSystemEnabled | ( |  | ) | const

inline

Shows coordinate system.

Definition at line 380 of file stage.h.

## dump()

virtual void BALL::VIEW::Stage::dump | ( | std::ostream & | s = std::cout,
|  | Size | depth = 0 ) const

virtual

Internal value dump. Dump the current state of this instance to the output ostream s with dumping depth depth.

Parameters

  s | output stream
  depth | the dumping depth

## getBackgroundColor()

virtual const ColorRGBA & BALL::VIEW::Stage::getBackgroundColor | ( |  | ) | const

inline virtual

Get the background color.

Definition at line 360 of file stage.h.

## getCamera() [1/2]

virtual Camera & BALL::VIEW::Stage::getCamera | ( |  | ) |

inline virtual

Get the camera.

Definition at line 347 of file stage.h.

## getCamera() [2/2]

virtual const Camera & BALL::VIEW::Stage::getCamera | ( |  | ) | const

inline virtual

Get the camera (const).

Definition at line 351 of file stage.h.

## getEyeDistance()

float BALL::VIEW::Stage::getEyeDistance | ( |  | ) | const

inline

Get the eye distance for the stereo view.

Definition at line 388 of file stage.h.

## getFocalDistance()

float BALL::VIEW::Stage::getFocalDistance | ( |  | ) | const

inline

Get the focal distance for the stereo view.

Definition at line 396 of file stage.h.

## getFogIntensity()

float BALL::VIEW::Stage::getFogIntensity | ( |  | ) | const

inline

Definition at line 408 of file stage.h.

## getInfoColor()

virtual const ColorRGBA & BALL::VIEW::Stage::getInfoColor | ( |  | ) | const

inline virtual

Get the background color.

Definition at line 368 of file stage.h.

## getLightSource()

virtual LightSource & BALL::VIEW::Stage::getLightSource | ( | Position | i | ) |

inline virtual

Get a reference to the i-th light source.

Definition at line 319 of file stage.h.

## getLightSources()

virtual const std::list< LightSource > & BALL::VIEW::Stage::getLightSources | ( |  | ) | const

inline virtual

Get the light sources (const).

Definition at line 315 of file stage.h.

## getMaterial() [1/2]

Material & BALL::VIEW::Stage::getMaterial | ( |  | ) |

inline

Gives access to the default material parameters.

Definition at line 448 of file stage.h.

## getMaterial() [2/2]

const Material & BALL::VIEW::Stage::getMaterial | ( |  | ) | const

inline

Gives access to the default material parameters, const version.

Definition at line 451 of file stage.h.

## operator==()

bool BALL::VIEW::Stage::operator== | ( | const Stage & | stage | ) | const

## removeLightSource()

virtual void BALL::VIEW::Stage::removeLightSource | ( | const LightSource & | light_source | ) |

virtual

Remove a light source.

## setBackgroundColor()

virtual void BALL::VIEW::Stage::setBackgroundColor | ( | const ColorRGBA & | color | ) |

inline virtual

Set the background color.

Definition at line 364 of file stage.h.

## setCamera()

virtual void BALL::VIEW::Stage::setCamera | ( | const Camera & | camera | ) |

inline virtual

Set the camera of the stage

Definition at line 356 of file stage.h.

## setEyeDistance()

void BALL::VIEW::Stage::setEyeDistance | ( | float | value | ) |

inline

Set the eye distance for the stereo view.

Definition at line 384 of file stage.h.

## setFocalDistance()

void BALL::VIEW::Stage::setFocalDistance | ( | float | value | ) |

inline

Set the focal distance for the stereo view.

Definition at line 392 of file stage.h.

## setFogIntensity()

void BALL::VIEW::Stage::setFogIntensity | ( | float | value | ) |

inline

Definition at line 412 of file stage.h.

## setInfoColor()

virtual void BALL::VIEW::Stage::setInfoColor | ( | const ColorRGBA & | color | ) |

inline virtual

Set the background color.

Definition at line 372 of file stage.h.

## setSwapSideBySideStereo()

void BALL::VIEW::Stage::setSwapSideBySideStereo | ( | bool | state | ) |

inline

Settings for side by side stereo side swapping.

Definition at line 400 of file stage.h.

## showCoordinateSystem()

void BALL::VIEW::Stage::showCoordinateSystem | ( | bool | state | ) |

inline

Show coordinate system.

Definition at line 376 of file stage.h.

## swapSideBySideStereo()

bool BALL::VIEW::Stage::swapSideBySideStereo | ( |  | ) | const

inline

Get settings for side by side stereo side swapping.

Definition at line 404 of file stage.h.

## Member Data Documentation

## background_color_

ColorRGBA BALL::VIEW::Stage::background_color_

protected

Definition at line 456 of file stage.h.

## camera_

Camera BALL::VIEW::Stage::camera_

protected

Definition at line 465 of file stage.h.

## eye_distance_

float BALL::VIEW::Stage::eye_distance_

protected

Definition at line 474 of file stage.h.

## focal_distance_

float BALL::VIEW::Stage::focal_distance_

protected

Definition at line 477 of file stage.h.

## fog_intensity_

float BALL::VIEW::Stage::fog_intensity_

protected

Definition at line 471 of file stage.h.

## info_color_

ColorRGBA BALL::VIEW::Stage::info_color_

protected

Definition at line 459 of file stage.h.

## light_sources_

std::list<LightSource> BALL::VIEW::Stage::light_sources_

protected

Definition at line 462 of file stage.h.

## material_

Material BALL::VIEW::Stage::material_

protected

Definition at line 483 of file stage.h.

## show_coordinate_system_

bool BALL::VIEW::Stage::show_coordinate_system_

protected

Definition at line 468 of file stage.h.

## swap_side_by_side_stereo_

bool BALL::VIEW::Stage::swap_side_by_side_stereo_

protected

Definition at line 480 of file stage.h.