FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Public Attributes | List of all members
GL::ElementRenderer Struct Reference

Base class to draw a selection of elements as OpenGL points. More...

#include <PartialElementRenderer.hpp>

Inheritance diagram for GL::ElementRenderer:
Wizt::VBO::Renderer MemCore::ReferenceBase< Renderer > MemCore::Ageable Wizt::SplatRenderObject::Renderer

Public Types

typedef MemCore::RefPtr< Wizt::IndexBufferObjectIBO_t
 An index buffer object.
 
typedef Fiber::MemArray< 3, IBO_tViewBufferArray_t
 Type to be used for storing index arrays for view-dependent rendering via depth-sorting.
 
- Public Types inherited from MemCore::ReferenceBase< Renderer >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 

Public Member Functions

IBO_t sortByDepth (Wizt::VRenderContext &Context, const MemCore::RefPtr< Fiber::CreativeArrayBase > &VertexCoordinates, unsigned Discretization=2)
 
 ElementRenderer (const MemCore::RefPtr< Fiber::MemBase > &FieldCoordinates, const MemCore::RefPtr< Fiber::FragmentSelector > &FS)
 Construct a partial element renderer by giving an array of coordinates and a fragment selector.
 
 ~ElementRenderer ()
 Destructor, does nothing particular.
 
bool draw () override
 The actual draw function.
 
- Public Member Functions inherited from Wizt::VBO::Renderer
virtual void postfix ()
 
virtual void prefix ()
 
- Public Member Functions inherited from MemCore::ReferenceBase< Renderer >
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 
- Public Member Functions inherited from MemCore::Ageable
constexpr Ageable (age_t t) noexcept
 
constexpr Ageable (const Ageable &A) noexcept
 
 Ageable (const volatile Ageable &A) noexcept
 
constexpr const AgeablegetAge () const
 
bool isNewerThan (const Ageable &a) const noexcept
 
bool isOlderThan (const Ageable &a) const noexcept
 
bool isYoungerThan (const Ageable &a) const noexcept
 
bool operator!= (const Ageable &a) const noexcept
 
bool operator< (const Ageable &a) const noexcept
 
bool operator<= (const Ageable &a) const noexcept
 
bool operator<= (const volatile Ageable &a) const volatile noexcept
 
bool operator== (const Ageable &a) const noexcept
 
bool operator> (const Ageable &a) const noexcept
 
bool operator> (const volatile Ageable &a) const volatile
 
bool operator>= (const Ageable &a) const noexcept
 
bool operator>= (const volatile Ageable &a) const volatile noexcept
 
constexpr void resetAge () noexcept
 
void setInfinitelyNew () noexcept
 
age_t time_value () const noexcept
 
age_t time_value () const volatile noexcept
 
Ageabletouch () noexcept
 
age_t update (age_t age) noexcept
 
age_t update (const Ageable &Other) noexcept
 
age_t update (const volatile Ageable &Other) volatile noexcept
 

Public Attributes

MemCore::RefPtr< ViewBufferArray_tSortedIndices
 Storage of view-dependent index arrays.
 
IBO_t CurrentIBO
 Index Buffer Object that is supposed to be used.
 
MemCore::RefPtr< ElementSorterMyElementSorter
 
GLenum draw_mode
 
GLsizei offset
 
GLsizei npoints
 
GLsizei count
 

Additional Inherited Members

- Static Public Member Functions inherited from MemCore::Ageable
static const AgeableInfinitelyNew () noexcept
 
static constexpr const AgeableInfinitelyOld () noexcept
 
static age_t now () noexcept
 
- Protected Member Functions inherited from MemCore::ReferenceBase< Renderer >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 

Detailed Description

Base class to draw a selection of elements as OpenGL points.

Makes use of DrawElements();

Examples
CrystalSurface.cpp, EvolutionSurface.cpp, TransparentColoredSurface.cpp, and TransparentSurface.cpp.

Constructor & Destructor Documentation

◆ ElementRenderer()

GL::ElementRenderer::ElementRenderer ( const MemCore::RefPtr< Fiber::MemBase > &  FieldCoordinates,
const MemCore::RefPtr< Fiber::FragmentSelector > &  FS 
)

Construct a partial element renderer by giving an array of coordinates and a fragment selector.

If the fragment selector is given, it will create a set of indices here. This is a possibly slow operation.

Member Function Documentation

◆ draw()

bool GL::ElementRenderer::draw ( )
overridevirtual

The actual draw function.

If a CurrentIBO is set, it will use this one, otherwise will draw all elements.

Implements Wizt::VBO::Renderer.

Reimplemented in Wizt::SplatRenderObject::Renderer.

References CurrentIBO.

Referenced by Wizt::SplatRenderObject::Renderer::draw().

◆ sortByDepth()

ElementRenderer::IBO_t GL::ElementRenderer::sortByDepth ( Wizt::VRenderContext Context,
const MemCore::RefPtr< Fiber::CreativeArrayBase > &  VertexCoordinates,
unsigned  Discretization = 2 
)