OpenCOVER
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vrui::coSlider Class Reference

#include <coSlider.h>

Inheritance diagram for vrui::coSlider:
Inheritance graph
[legend]
Collaboration diagram for vrui::coSlider:
Collaboration graph
[legend]

Public Member Functions

 coSlider (coSliderActor *actor, bool showValue=true)
 
virtual ~coSlider ()
 
virtual int hit (vruiHit *hit)
 
virtual void miss ()
 
void joystickUp ()
 increment slidervalue More...
 
void joystickDown ()
 decrementslidervalue More...
 
void resetLastPressAction ()
 no last press action More...
 
void setValue (float val, bool generateEvent=false)
 
float getValue () const
 
float getLinearValue () const
 
void setMin (float mi)
 
float getMin () const
 
float getLinearMin () const
 
void setMax (float ma)
 
float getMax () const
 
float getLinearMax () const
 
void setNumTicks (float nt)
 
float getNumTicks () const
 
void setPrecision (int nt)
 
int getPrecision () const
 
void setInteger (bool on)
 
bool isInteger () const
 
void setLogarithmic (bool on)
 
bool isLogarithmic () const
 
float getDialSize () const
 
void setPos (float x, float y, float z=0.0f)
 
virtual void setHighlighted (bool highlighted)
 
virtual void setSize (float x, float y, float z)
 
virtual void setSize (float size)
 
virtual float getWidth () const
 Returns element width. More...
 
virtual float getHeight () const
 Returns element height. More...
 
virtual float getXpos () const
 Returns element x position. More...
 
virtual float getYpos () const
 Returns element y position. More...
 
virtual float getZpos () const
 
virtual void setActive (bool a)
 
virtual bool getActive ()
 
bool getShowValue () const
 
virtual const char * getClassName () const
 get the Element's classname More...
 
virtual bool isOfClassName (const char *) const
 check if the Element or any ancestor is this classname More...
 
- Public Member Functions inherited from vrui::coAction
 coAction ()
 Constructor. More...
 
virtual ~coAction ()
 Destructor. More...
 
virtual int hit (vruiHit *hit)=0
 
virtual void miss ()
 
void setFrame (unsigned int frame)
 INTERNAL set the framecounter (used to produce the miss call) More...
 
unsigned int getFrame () const
 INTERNAL get the framecounter (used to produce the miss call) More...
 
void setNode (vruiNode *)
 INTERNAL set the node this action belongs to. More...
 
void addChild (coAction *)
 INTERNAL add a child action. More...
 
virtual int hitAll (vruiHit *hit)
 INTERNAL same as miss/hit, but do it for all children as well. More...
 
virtual void missAll ()
 INTERNAL same as miss/hit, but do it for all children as well. More...
 
- Public Member Functions inherited from vrui::coUIElement
 coUIElement ()
 
virtual ~coUIElement ()
 
virtual void createGeometry ()
 
virtual void setParent (coUIContainer *)
 
virtual coUIContainergetParent ()
 
virtual void setEnabled (bool enabled)
 
virtual void setHighlighted (bool highlighted)
 
virtual void setVisible (bool visible)
 
virtual bool isEnabled () const
 
virtual bool isHighlighted () const
 
virtual bool isVisible () const
 
virtual float getWidth () const =0
 Returns element width. More...
 
virtual float getHeight () const =0
 Returns element height. More...
 
virtual float getDepth () const
 
virtual float getXpos () const =0
 Returns element x position. More...
 
virtual float getYpos () const =0
 Returns element y position. More...
 
virtual float getZpos () const
 
virtual void childResized (bool shrink=true)
 
virtual void resizeToParent (float, float, float, bool shrink=true)
 
virtual void shrinkToMin ()
 Set element location in space. More...
 
virtual void setPos (float, float, float)=0
 
virtual void setSize (float, float, float)
 
virtual void setSize (float)
 
virtual float getResizePref ()
 
virtual void setUserData (coUIUserData *)
 
virtual coUIUserDatagetUserData () const
 
virtual vruiTransformNodegetDCS ()
 
virtual vruiUIElementProvidergetUIElementProvider () const
 
virtual void setAttachment (int)
 sets the attachment border More...
 
virtual int getAttachment () const
 returns the attachment border More...
 
void setUniqueName (const char *)
 
const char * getUniqueName () const
 
virtual const char * getClassName () const
 get the Element's classname More...
 
virtual bool isOfClassName (const char *) const
 check if the Element or any ancestor is this classname More...
 
- Public Member Functions inherited from vrui::coUpdateable
 coUpdateable ()
 Constructor. More...
 
virtual ~coUpdateable ()
 Destructor. More...
 
virtual bool update ()=0
 

Static Public Member Functions

static void adjustSlider (float &mini, float &maxi, float &, float &step, int &digits)
 
- Static Public Member Functions inherited from vrui::coUIElement
static vruiMatrixgetMatrixFromPositionHprScale (float x, float y, float z, float h, float p, float r, float scale)
 

Protected Member Functions

void clamp () const
 
virtual bool update ()
 
- Protected Member Functions inherited from vrui::coUIElement
virtual void resizeGeometry ()
 
virtual const vruiMatrixgetTransformMatrix ()
 

Protected Attributes

bool integer
 true = slider processes only integer values More...
 
bool logarithmic
 true = slider shows logarithm of value More...
 
bool showValue
 true = the slider value is displayed More...
 
coCombinedButtonInteractioninteractionA
 interaction for wheel More...
 
coCombinedButtonInteractioninteractionWheel [2]
 
bool unregister
 true if the interaction should be unregistered More...
 
float dialSize
 size of slider dial More...
 
coSliderActormyActor
 action listener for slider events More...
 
float myX
 slider element x position in object space [mm] More...
 
float myY
 slider element y position in object space [mm] More...
 
float myZ
 slider element z position in object space [mm] More...
 
float myWidth
 slider width [mm] More...
 
float myHeight
 slider height [mm] More...
 
float myDepth
 slider depth [mm] More...
 
float minVal
 minimum slider value More...
 
float maxVal
 maximum slider value More...
 
float value
 current slider value More...
 
float linearValue
 current linear slider value (=value or log(value)) More...
 
float numTicks
 number of tickmarks on slider dial More...
 
int precision
 precision of slider value display: number of decimals More...
 
bool valueChanged
 indicates a value change since last readout More...
 
bool active_
 flag if slider is active More...
 
long lastPressAction
 
- Protected Attributes inherited from vrui::coAction
std::string actionName
 
- Protected Attributes inherited from vrui::coUIElement
float xScaleFactor
 UI element x axis scale factor. More...
 
float yScaleFactor
 UI element y axis scale factor. More...
 
float zScaleFactor
 UI element z axis scale factor. More...
 
bool enabled
 true if UI element is enabled, false if UI element cannot be used More...
 
bool highlighted
 true if highlighted More...
 
bool visible
 true if UI element is visible, false if not visible but still present in scene tree More...
 
vruiUIElementProvideruiElementProvider
 

Additional Inherited Members

- Public Types inherited from vrui::coAction
enum  Result { ACTION_DONE = 0x00 , ACTION_CALL_ON_MISS = 0x01 , ACTION_UNDEF = 0x02 }
 
- Public Types inherited from vrui::coUIElement
enum  Material {
  RED = 0 , GREEN , BLUE , YELLOW ,
  GREY , WHITE , BLACK , DARK_YELLOW ,
  WHITE_NL , ITEM_BACKGROUND_NORMAL , ITEM_BACKGROUND_HIGHLIGHTED , ITEM_BACKGROUND_DISABLED ,
  HANDLE_BACKGROUND_NORMAL , HANDLE_BACKGROUND_HIGHLIGHTED , HANDLE_BACKGROUND_DISABLED , BACKGROUND ,
  NUM_MATERIALS
}
 Color definitions, to be used whenever a material is needed. More...
 
enum  {
  LEFT = 0 , TOP , RIGHT , BOTTOM ,
  REPLACE
}
 
- Public Attributes inherited from vrui::coUIElement
enum vrui::coUIElement:: { ... }  Attachments
 

Detailed Description

This class provides a basic 3D slider, which is based on a texture mapped tickmark field and a round slider position indicator.

Constructor & Destructor Documentation

◆ coSlider()

vrui::coSlider::coSlider ( coSliderActor actor,
bool  showValue = true 
)

◆ ~coSlider()

virtual vrui::coSlider::~coSlider ( )
virtual

Member Function Documentation

◆ adjustSlider()

static void vrui::coSlider::adjustSlider ( float &  mini,
float &  maxi,
float &  ,
float &  step,
int &  digits 
)
static

◆ clamp()

void vrui::coSlider::clamp ( ) const
protected

◆ getActive()

virtual bool vrui::coSlider::getActive ( )
inlinevirtual

◆ getClassName()

virtual const char * vrui::coSlider::getClassName ( ) const
virtual

get the Element's classname

Reimplemented from vrui::coUIElement.

◆ getDialSize()

float vrui::coSlider::getDialSize ( ) const

◆ getHeight()

virtual float vrui::coSlider::getHeight ( ) const
inlinevirtual

Returns element height.

Implements vrui::coUIElement.

◆ getLinearMax()

float vrui::coSlider::getLinearMax ( ) const

◆ getLinearMin()

float vrui::coSlider::getLinearMin ( ) const

◆ getLinearValue()

float vrui::coSlider::getLinearValue ( ) const

◆ getMax()

float vrui::coSlider::getMax ( ) const

◆ getMin()

float vrui::coSlider::getMin ( ) const

◆ getNumTicks()

float vrui::coSlider::getNumTicks ( ) const

◆ getPrecision()

int vrui::coSlider::getPrecision ( ) const

◆ getShowValue()

bool vrui::coSlider::getShowValue ( ) const

◆ getValue()

float vrui::coSlider::getValue ( ) const

◆ getWidth()

virtual float vrui::coSlider::getWidth ( ) const
inlinevirtual

Returns element width.

Implements vrui::coUIElement.

◆ getXpos()

virtual float vrui::coSlider::getXpos ( ) const
inlinevirtual

Returns element x position.

Implements vrui::coUIElement.

◆ getYpos()

virtual float vrui::coSlider::getYpos ( ) const
inlinevirtual

Returns element y position.

Implements vrui::coUIElement.

◆ getZpos()

virtual float vrui::coSlider::getZpos ( ) const
inlinevirtual

Reimplemented from vrui::coUIElement.

◆ hit()

virtual int vrui::coSlider::hit ( vruiHit hit)
virtual

hit is called whenever the node, or any node underneath the node with this action is intersected return ACTION_CALL_ON_MISS if you want miss to be called otherwise return ACTION_DONE

Implements vrui::coAction.

◆ isInteger()

bool vrui::coSlider::isInteger ( ) const

◆ isLogarithmic()

bool vrui::coSlider::isLogarithmic ( ) const

◆ isOfClassName()

virtual bool vrui::coSlider::isOfClassName ( const char *  ) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coUIElement.

◆ joystickDown()

void vrui::coSlider::joystickDown ( )

decrementslidervalue

◆ joystickUp()

void vrui::coSlider::joystickUp ( )

increment slidervalue

◆ miss()

virtual void vrui::coSlider::miss ( )
virtual

miss is called once after a hit, if the node is not intersected anymore

Reimplemented from vrui::coAction.

◆ resetLastPressAction()

void vrui::coSlider::resetLastPressAction ( )

no last press action

◆ setActive()

virtual void vrui::coSlider::setActive ( bool  a)
virtual

◆ setHighlighted()

virtual void vrui::coSlider::setHighlighted ( bool  highlighted)
virtual

Reimplemented from vrui::coUIElement.

◆ setInteger()

void vrui::coSlider::setInteger ( bool  on)

◆ setLogarithmic()

void vrui::coSlider::setLogarithmic ( bool  on)

◆ setMax()

void vrui::coSlider::setMax ( float  ma)

◆ setMin()

void vrui::coSlider::setMin ( float  mi)

◆ setNumTicks()

void vrui::coSlider::setNumTicks ( float  nt)

◆ setPos()

void vrui::coSlider::setPos ( float  x,
float  y,
float  z = 0.0f 
)
virtual

Implements vrui::coUIElement.

◆ setPrecision()

void vrui::coSlider::setPrecision ( int  nt)

◆ setSize() [1/2]

virtual void vrui::coSlider::setSize ( float  size)
virtual

Reimplemented from vrui::coUIElement.

◆ setSize() [2/2]

virtual void vrui::coSlider::setSize ( float  x,
float  y,
float  z 
)
virtual

Reimplemented from vrui::coUIElement.

◆ setValue()

void vrui::coSlider::setValue ( float  val,
bool  generateEvent = false 
)

◆ update()

virtual bool vrui::coSlider::update ( )
protectedvirtual

this method is called once per frame as long as it returns true. as soon as it returns false, it is removed from the update manager and not called again. the update method is called prior to preFrame();

Implements vrui::coUpdateable.

Member Data Documentation

◆ active_

bool vrui::coSlider::active_
protected

flag if slider is active

◆ dialSize

float vrui::coSlider::dialSize
protected

size of slider dial

◆ integer

bool vrui::coSlider::integer
protected

true = slider processes only integer values

◆ interactionA

coCombinedButtonInteraction* vrui::coSlider::interactionA
protected

interaction for wheel

interaction for first button

◆ interactionWheel

coCombinedButtonInteraction* vrui::coSlider::interactionWheel[2]
protected

◆ lastPressAction

long vrui::coSlider::lastPressAction
protected

◆ linearValue

float vrui::coSlider::linearValue
mutableprotected

current linear slider value (=value or log(value))

◆ logarithmic

bool vrui::coSlider::logarithmic
protected

true = slider shows logarithm of value

◆ maxVal

float vrui::coSlider::maxVal
protected

maximum slider value

◆ minVal

float vrui::coSlider::minVal
protected

minimum slider value

◆ myActor

coSliderActor* vrui::coSlider::myActor
protected

action listener for slider events

◆ myDepth

float vrui::coSlider::myDepth
protected

slider depth [mm]

◆ myHeight

float vrui::coSlider::myHeight
protected

slider height [mm]

◆ myWidth

float vrui::coSlider::myWidth
protected

slider width [mm]

◆ myX

float vrui::coSlider::myX
protected

slider element x position in object space [mm]

◆ myY

float vrui::coSlider::myY
protected

slider element y position in object space [mm]

◆ myZ

float vrui::coSlider::myZ
protected

slider element z position in object space [mm]

◆ numTicks

float vrui::coSlider::numTicks
protected

number of tickmarks on slider dial

◆ precision

int vrui::coSlider::precision
protected

precision of slider value display: number of decimals

◆ showValue

bool vrui::coSlider::showValue
protected

true = the slider value is displayed

◆ unregister

bool vrui::coSlider::unregister
protected

true if the interaction should be unregistered

◆ value

float vrui::coSlider::value
mutableprotected

current slider value

◆ valueChanged

bool vrui::coSlider::valueChanged
protected

indicates a value change since last readout


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