Overview | All Modules | Tutorial | User's Guide | Programming Guide
Previous

COVISE Online Documentation

Next

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vrui::OSGVruiTextureRectBackground Class Reference

This class provides background for GUI elements. More...

#include <OSGVruiTextureRectBackground.h>

Inheritance diagram for vrui::OSGVruiTextureRectBackground:
vrui::OSGVruiUIContainer vrui::OSGVruiUIElement vrui::vruiUIElementProvider

Public Member Functions

 OSGVruiTextureRectBackground (coTextureRectBackground *background)
 Constructor. More...
 
virtual ~OSGVruiTextureRectBackground ()
 Destructor. More...
 
virtual void createGeometry ()
 create the geometry More...
 
virtual void resizeGeometry ()
 
virtual void update ()
 
virtual void setEnabled (bool en)
 Set activation state of this background and all its children. More...
 
virtual void setHighlighted (bool hl)
 
- Public Member Functions inherited from vrui::OSGVruiUIContainer
 OSGVruiUIContainer (coUIContainer *container)
 
virtual ~OSGVruiUIContainer ()
 
- Public Member Functions inherited from vrui::OSGVruiUIElement
 OSGVruiUIElement (coUIElement *element)
 
virtual ~OSGVruiUIElement ()
 
vruiTransformNodegetDCS ()
 
- Public Member Functions inherited from vrui::vruiUIElementProvider
 vruiUIElementProvider (coUIElement *element)
 
virtual ~vruiUIElementProvider ()
 
virtual void createGeometry ()=0
 
virtual vruiTransformNodegetDCS ()=0
 
virtual void resizeGeometry ()=0
 
virtual void setEnabled (bool)
 
virtual void setHighlighted (bool)
 
virtual void update ()
 
virtual float getWidth () const
 
virtual float getHeight () const
 
virtual float getDepth () const
 

Protected Member Functions

void createSharedLists ()
 create geometry elements shared by all OSGVruiTextureRectBackgrounds More...
 
void rescaleTexture ()
 
void createTexturesFromFiles ()
 create texture from files More...
 
void createTexturesFromArrays (uint *normalImage, int comp, int ns, int nt, int nr)
 create texture from arrays More...
 

Protected Attributes

coTextureRectBackgroundbackground
 
coTextureRectBackground::TextureSettex
 
- Protected Attributes inherited from vrui::OSGVruiUIContainer
coUIContainercontainer
 
- Protected Attributes inherited from vrui::OSGVruiUIElement
OSGVruiTransformNodemyDCS
 main DCS of this UI Element More...
 
- Protected Attributes inherited from vrui::vruiUIElementProvider
coUIElementelement
 

Detailed Description

This class provides background for GUI elements.

This class is specifically made for rectangular (non-power of 2) textures, which may me procedurraly updated. It is hardwired to osg::TextureRectangle, no abstraction!

Constructor & Destructor Documentation

◆ OSGVruiTextureRectBackground()

vrui::OSGVruiTextureRectBackground::OSGVruiTextureRectBackground ( coTextureRectBackground background)

Constructor.

Parameters
backgroundMaterialnormal color
highlightMaterialhighlighted color
disableMaterialdisabled color
See also
coUIElement for color definition

◆ ~OSGVruiTextureRectBackground()

vrui::OSGVruiTextureRectBackground::~OSGVruiTextureRectBackground ( )
virtual

Destructor.

Member Function Documentation

◆ createGeometry()

void vrui::OSGVruiTextureRectBackground::createGeometry ( )
virtual

create the geometry

Implements vrui::vruiUIElementProvider.

◆ createSharedLists()

void vrui::OSGVruiTextureRectBackground::createSharedLists ( )
protected

create geometry elements shared by all OSGVruiTextureRectBackgrounds

◆ createTexturesFromArrays()

void vrui::OSGVruiTextureRectBackground::createTexturesFromArrays ( uint *  normalImage,
int  comp,
int  ns,
int  nt,
int  nr 
)
protected

create texture from arrays

◆ createTexturesFromFiles()

void vrui::OSGVruiTextureRectBackground::createTexturesFromFiles ( )
protected

create texture from files

◆ rescaleTexture()

void vrui::OSGVruiTextureRectBackground::rescaleTexture ( )
protected

rescales the texture; Texture coordinates are non-normalized, therefore they are set to ( 0, w, h, 0 ) see http://www.opengl.org/registry/specs/ARB/texture_rectangle.txt

◆ resizeGeometry()

void vrui::OSGVruiTextureRectBackground::resizeGeometry ( )
virtual

◆ setEnabled()

void vrui::OSGVruiTextureRectBackground::setEnabled ( bool  en)
virtual

Set activation state of this background and all its children.

if this background is disabled, the color is always the disabled color, regardless of the highlighted state

Parameters
entrue = elements enabled

Reimplemented from vrui::vruiUIElementProvider.

◆ setHighlighted()

void vrui::OSGVruiTextureRectBackground::setHighlighted ( bool  hl)
virtual

Reimplemented from vrui::vruiUIElementProvider.

◆ update()

void vrui::OSGVruiTextureRectBackground::update ( )
virtual

removed REPEAT, since rectangular textures do not support repeat!

Reimplemented from vrui::vruiUIElementProvider.

Member Data Documentation

◆ background

coTextureRectBackground* vrui::OSGVruiTextureRectBackground::background
protected

◆ tex

coTextureRectBackground::TextureSet* vrui::OSGVruiTextureRectBackground::tex
protected

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

Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner
Copyright © 1993-2009 HLRS, 2004-2009 RRZK, 2005-2009 Visenso
COVISE Version 6.5 Academic