Geogram  Version 1.9.1
A programming library of geometric algorithms
GEO::MeshGfx::Filter Struct Reference

Filters primitives based on their id and on an attribute. More...

#include <geogram_gfx/mesh/mesh_gfx.h>

Public Member Functions

bool begin (AttributesManager &attributes_manager, bool hw_primitive_filtering=true)
 Begins rendering with primitive filtering. More...
 
void end ()
 Needs to be called after rendering.
 
void deallocate ()
 Deallocates GPU objects.
 
bool test (index_t primitive_id) const
 Tests an individual primitive. More...
 

Public Attributes

std::string attribute_name
 
Attribute< Numeric::uint8attribute
 
GLuint VBO
 
GLuint texture
 
bool dirty
 

Detailed Description

Filters primitives based on their id and on an attribute.

Definition at line 946 of file mesh_gfx.h.

Member Function Documentation

◆ begin()

bool GEO::MeshGfx::Filter::begin ( AttributesManager attributes_manager,
bool  hw_primitive_filtering = true 
)

Begins rendering with primitive filtering.

Parameters
[in]attributes_managera reference to the attributes manager where the property is stored
[in]hw_primitive_filteringif set, uses hardware primitive fitering (GLUP_PRIMITIVES_FILTERING), else one may use the function test() instead.
Return values
trueif attribute filtering is active, that is, if attribute name is not the empty string and if an the attribute exists
falseotherwise

◆ test()

bool GEO::MeshGfx::Filter::test ( index_t  primitive_id) const
inline

Tests an individual primitive.

Return values
trueif the primitive should be displayed
falseotherwise

Definition at line 984 of file mesh_gfx.h.


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