The Vish Visualization Shell 0.3
Vish
Classes | Public Member Functions | Public Attributes | List of all members
Wizt::Anemone::Tentacle Class Referenceabstract

Base class for components that need to be attached to an Anemone to make it visible. More...

#include <ocean/Anemonia/Anemone.hpp>

Inheritance diagram for Wizt::Anemone::Tentacle:
MemCore::ReferenceBase< Tentacle > Wizt::Anemone::SpecializedTentacle< Anemone::DisplayLists > Wizt::Anemone::SpecializedTentacle< Anemone::Elements > Wizt::Anemone::SpecializedTentacle< Anemone::Painter - 256 > Wizt::Anemone::SpecializedTentacle< Anemone::Variables > Wizt::Anemone::SpecializedTentacle< Anemone::Painter > Wizt::Anemone::SpecializedTentacle< Anemone::Program > Wizt::Anemone::SpecializedTentacle< Anemone::Timer > Wizt::Anemone::SpecializedTentacle< Anemone::Texture > Wizt::Anemone::SpecializedTentacle< Anemone::Arraybuffer > MyTentacle Wizt::Anemone::SpecializedTentacle< TentacleOrder >

Classes

class  Activator
 Helper class for Tentacles, allows exception-save enabling and disabling of Tentacles. More...
 

Public Member Functions

virtual bool activate (const Anemone &)=0
 Activate this tentacle.
 
virtual bool deactivate (const Anemone &)=0
 Deactivate this tentacle.
 
virtual const char * getSamplerType () const
 If this tentacle refers to some texture sampler in a shader, then hereby return the type of this sampler is it occurs in the code.
 
virtual int getTextureUnit () const
 Get the texture unit number which was specified during construction, if positive then it refers to some texture unit that is used in an associated shader.
 
virtual size_t memsize () const
 Return the memory occupied by this buffer if it occupies memory at all. Otherwise, returns 0 (default).
 
virtual size_t NumberOfElements () const
 Returns the number of elements provided and used by this object, if it refers to countable elements.
 
virtual bool updateValue (VRenderContext &Context)
 Possibly update a tentacle from settings in a context.
 
- Public Member Functions inherited from MemCore::ReferenceBase< Tentacle >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
 
bool isIdentical (const WeakPtr< Tentacle, Tentacle > &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 (Tentacle *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

Activity_t Activity
 A bit mask telling whether this tentacle should participate in the waving of an Anemone.
 

Additional Inherited Members

- Public Types inherited from MemCore::ReferenceBase< Tentacle >
using reference_domain_t = Tentacle
 The type of the base class.
 
using SelfPtr_t = WeakPtr< Tentacle, Tentacle >
 Type for a pointer to this object itself.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< Tentacle >
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

Base class for components that need to be attached to an Anemone to make it visible.

In OpenGL terminology, it is a "buffer" (for instance).

Note that one Tentacle can be in multiple Anemones. Only when the Tentacle is activated or deactivated it gets informed which Anemone has been waving it.

Member Function Documentation

◆ NumberOfElements()

size_t Wizt::Anemone::Tentacle::NumberOfElements ( ) const
virtual

Returns the number of elements provided and used by this object, if it refers to countable elements.

Otherwise, returns 0 (default).

Reimplemented in Wizt::BufferArray, Wizt::UniformVertexAttribute, Wizt::StorageBufferTentacle, Wizt::VertexBuffer, and Wizt::ElementBuffer.

◆ updateValue()

bool Wizt::Anemone::Tentacle::updateValue ( VRenderContext Context)
virtual

Possibly update a tentacle from settings in a context.

Returns
true if it was successful, false if it could not be done and the tentacle might need to be re-created.

Reimplemented in Wizt::RenderBasin::UniformParameter, Wizt::RenderBasin::RenderParameter, Wizt::TypedUniformBuffer< T >, Wizt::TypedVectorUniformBuffer< T >, Wizt::StorageBufferTentacle, Wizt::VertexBuffer, and Wizt::ElementBuffer.