version 3.3

VRS::OverlayImageGL Class Reference

Provides an overlay mechanism for VRS. The overlay may consist of text and images (e.g. logos). More...

#include <vrs/opengl/overlayimagegl.h>

Inheritance diagram for VRS::OverlayImageGL:

VRS::SceneThing VRS::SceneThing VRS::SceneNode VRS::SceneNode VRS::SharedObj VRS::SharedObj VRS::Visitable VRS::Visitable

List of all members.

Public Member Functions

 OverlayImageGL ()
 OverlayImageGL (SO< SceneThing > parentThing)
virtual ~OverlayImageGL ()
int addImage (SO< Image > overlayImage, const Vector &minPosition, const Vector &maxPosition, bool showHide=true)
bool removeOverlayItem (int i)
int getSize () const
SO< ImagegetImageAt (int i) const
Vector getMinPosition (int i) const
Vector getMaxPosition (int i) const
SO< ColorAttributegetColorAttribute (int i) const
bool hideOverlayItem (int i)
 Sets the alpha value of the corresponding overlay item to 0.0 - so it becomes transparent.
bool showOverlayItem (int i)
 Sets the alpha value of the corresponding overlay item to 1.0 - so it becomes opaque.
 VRS_TYPEINFO (OverlayImageGL, SceneThing)
 VRS_SERIALIZABLE (OverlayImageGL)
 OverlayImageGL ()
 OverlayImageGL (SceneThing *parentThing)
virtual ~OverlayImageGL ()
int addImage (Image *overlayImage, Vector &minPosition, Vector &maxPosition, bool showHide=true)
int addText (Font *font, const std::string &text, Vector &minPosition=Vector(0, 0, 0), Vector &maxPosition=Vector(0, 0, 0), Text::AlignmentH alignmentH=Text::LEFT, Text::AlignmentV alignmentV=Text::BOTTOM, Color textColor=Color(0, 0, 0, 1))
bool removeOverlayItem (int i)
int getSize ()
ImagegetImageAt (int i)
TextgetTextAt (int i)
Vector getMinPosition (int i)
Vector getMaxPosition (int i)
ColorAttributegetColorAttribute (int i)
bool hideOverlayItem (int i)
bool showOverlayItem (int i)
 VRS_TYPEINFO (OverlayImageGL, SceneThing)


Detailed Description

Provides an overlay mechanism for VRS. The overlay may consist of text and images (e.g. logos).

Enables 2D overlays over a 3d scene. Could be used for navigation symbols or TV-like logo or title overlays. Overlay items can later be accessed via their corresponding index. The ColorAttribute of each item can be used to change the color or alpha values of the items These ColorAttributes can also be used to smoothly fade in /out the items using the VRS::ColorLinearEffect class

Enables 2D overlays over a 3d scene. Could be used for navigation symbols or TV-like logo or title overlays.


Constructor & Destructor Documentation

VRS::OverlayImageGL::OverlayImageGL (  ) 

VRS::OverlayImageGL::OverlayImageGL ( SO< SceneThing parentThing  ) 

virtual VRS::OverlayImageGL::~OverlayImageGL (  )  [virtual]

VRS::OverlayImageGL::OverlayImageGL (  ) 

VRS::OverlayImageGL::OverlayImageGL ( SceneThing parentThing  ) 

virtual VRS::OverlayImageGL::~OverlayImageGL (  )  [virtual]


Member Function Documentation

int VRS::OverlayImageGL::addImage ( SO< Image overlayImage,
const Vector minPosition,
const Vector maxPosition,
bool  showHide = true 
)

Parameters:
overlayImage An image to be added to the overlay.
minPosition The lower left corner position of the image relative to the screen in screen coordinates ([0.0 ... 1.0])
maxPosition The upper right corner position of the image relative to the screen in screen coordinates ([0.0 ... 1.0])
showHide Determines whether the image will be visible when included into the overlay.Set to false if you want to fade in the text later (e.g. using ColorLinearEffect)
Returns:
The index of the image in the overlay.Needed to access the image later

bool VRS::OverlayImageGL::removeOverlayItem ( int  i  ) 

int VRS::OverlayImageGL::getSize (  )  const

SO<Image> VRS::OverlayImageGL::getImageAt ( int  i  )  const

Vector VRS::OverlayImageGL::getMinPosition ( int  i  )  const

Vector VRS::OverlayImageGL::getMaxPosition ( int  i  )  const

SO<ColorAttribute> VRS::OverlayImageGL::getColorAttribute ( int  i  )  const

Returns:
The ColorAttribute can be used to manipulate the color or alpha of an overlay item.Used e.g. as a parameter to VRS::ColorLinearEffect to fade in/out overlay items

bool VRS::OverlayImageGL::hideOverlayItem ( int  i  ) 

Sets the alpha value of the corresponding overlay item to 0.0 - so it becomes transparent.

bool VRS::OverlayImageGL::showOverlayItem ( int  i  ) 

Sets the alpha value of the corresponding overlay item to 1.0 - so it becomes opaque.

VRS::OverlayImageGL::VRS_TYPEINFO ( OverlayImageGL  ,
SceneThing   
)

VRS::OverlayImageGL::VRS_SERIALIZABLE ( OverlayImageGL   ) 

int VRS::OverlayImageGL::addImage ( Image overlayImage,
Vector minPosition,
Vector maxPosition,
bool  showHide = true 
)

int VRS::OverlayImageGL::addText ( Font font,
const std::string &  text,
Vector minPosition = Vector(0, 0, 0),
Vector maxPosition = Vector(0, 0, 0),
Text::AlignmentH  alignmentH = Text::LEFT,
Text::AlignmentV  alignmentV = Text::BOTTOM,
Color  textColor = Color(0, 0, 0, 1) 
)

bool VRS::OverlayImageGL::removeOverlayItem ( int  i  ) 

int VRS::OverlayImageGL::getSize (  ) 

Image* VRS::OverlayImageGL::getImageAt ( int  i  ) 

Text* VRS::OverlayImageGL::getTextAt ( int  i  ) 

Vector VRS::OverlayImageGL::getMinPosition ( int  i  ) 

Vector VRS::OverlayImageGL::getMaxPosition ( int  i  ) 

ColorAttribute* VRS::OverlayImageGL::getColorAttribute ( int  i  ) 

bool VRS::OverlayImageGL::hideOverlayItem ( int  i  ) 

bool VRS::OverlayImageGL::showOverlayItem ( int  i  ) 

VRS::OverlayImageGL::VRS_TYPEINFO ( OverlayImageGL  ,
SceneThing   
)


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

Generated on Tue May 22 06:00:24 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact