The Vish Visualization Shell 0.3
Vish
Wizt::PickList Class Reference

The result of a pick action. More...

#include <ocean/Anemonia/VTouchable.hpp>

Inheritance diagram for Wizt::PickList:
MemCore::ReferenceBase< PickList >

Public Member Functions

RefPtr< TouchListcomputeTouchList () const
 Compute a TouchList from a PickList.
TouchIndex_t operator() (int x, int y) const
 Convenience function to return the touch index at the given coordinates (x,y).
 PickList (int X0, int Y0, int DX, int DY, int AlignmentBits=3)
 Constructor.
TouchIndex_t * TouchArea () const
 Return the touch indices as array.
 ~PickList ()
 Destructor.
Public Member Functions inherited from MemCore::ReferenceBase< PickList >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
bool isIdentical (const WeakPtr< PickList, PickList > &PossibleSelf) const noexcept
 Check if this object is identical to the one used by the given pointer.
void mkAutoDestructive ()
 Marks this object as being automatically destructed, e.g.
refcount_t refcount () const noexcept
 The strong reference count.
 ReferenceBase (PickList *that) noexcept
 Constructor, initializes reference counter to zero.
const auto & self () const
 Return weak pointer to the object self.
refcount_t wrefcount () const noexcept
 The weak reference count.

Public Attributes

const int AlignedHeight
 Height.
const int AlignedWidth
 Width.
const int Height
 Height.
RefPtr< Chunk< rgba_t > > PickedPixels
 The RGBA field of the given pixels.
TouchableObjects_t TouchableObjects
 The list of objects that are possibly contained and touched here, as given in a map giving the range of touch indices that is associated with each touchable object.
const int Width
 Width.

Additional Inherited Members

Public Types inherited from MemCore::ReferenceBase< PickList >
using reference_domain_t
 The type of the base class.
using SelfPtr_t
 Type for a pointer to this object itself.
Protected Member Functions inherited from MemCore::ReferenceBase< PickList >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
void suicide ()
 Delete this.
virtual ~ReferenceBase ()
 Virtual destructor.

Detailed Description

The result of a pick action.

Author
Werner Benger

Member Function Documentation

◆ operator()()

TouchIndex_t Wizt::PickList::operator() ( int x,
int y ) const
inline

Convenience function to return the touch index at the given coordinates (x,y).

It will return an invalid number (-1) if there is no picklist here.

Calling this function is inefficient because it performs a null pointer check for the picklist at each call. It is more efficient to call the TouchArea() function once and use its linear pointer instead.

References AlignedWidth, and TouchArea().