The Vish Visualization Shell 0.3
Vish
Wizt::Touchable Class Referenceabstract

Abstract base class for objects that can be touched. More...

#include <ocean/Anemonia/VTouchable.hpp>

Public Member Functions

virtual TouchIndex_t feedback_render (VRenderContext &Context, TouchIndex_t StartIndex) const =0
 Virtual function to perform feedback rendering, i.e.
virtual bool pickAction (TouchIndex_t localIndex) const
 A virtual function that implements some action if the given index item is picked by the TouchList::pickAction() function.

Protected Member Functions

 Touchable ()
 constructor, does nothing.
virtual ~Touchable ()=0
 virtual destructor

Protected Attributes

TypedSlot< bool > Touchability
 Object touchability.

Detailed Description

Abstract base class for objects that can be touched.

Member Function Documentation

◆ feedback_render()

virtual TouchIndex_t Wizt::Touchable::feedback_render ( VRenderContext & Context,
TouchIndex_t StartIndex ) const
pure virtual

Virtual function to perform feedback rendering, i.e.

render each touchable item of this object with a unique 32-bit RGBA encoding, starting with the StartIndex value.

Returns
The highest number used by this object. This number will be the start index of the next object.

References pickAction().

◆ pickAction()

bool Wizt::Touchable::pickAction ( TouchIndex_t localIndex) const
virtual

A virtual function that implements some action if the given index item is picked by the TouchList::pickAction() function.

Note that the localIndex is the item relative to this object, i.e. starting at zero.

Todo
Maybe pass Context/ValuePool as parameter here

Referenced by feedback_render().