FastUIDraw
Public Member Functions | List of all members
fastuidraw::PainterAttributeData Class Reference

PainterAttributeData represents the attribute and index data ready to be consumed by a Painter. Data is organized into individual chuncks that can be drawn seperately. More...

#include <painter_attribute_data.hpp>

Inheritance diagram for fastuidraw::PainterAttributeData:
Inheritance graph
[legend]

Public Member Functions

 PainterAttributeData (void)
 
c_array< const PainterAttributeattribute_data_chunk (unsigned int i) const
 
c_array< const c_array< const PainterAttribute > > attribute_data_chunks (void) const
 
int index_adjust_chunk (unsigned int i) const
 
c_array< const int > index_adjust_chunks (void) const
 
c_array< const PainterIndexindex_data_chunk (unsigned int i) const
 
c_array< const c_array< const PainterIndex > > index_data_chunks (void) const
 
unsigned int largest_attribute_chunk (void) const
 
unsigned int largest_index_chunk (void) const
 
c_array< const unsigned int > non_empty_index_data_chunks (void) const
 
void set_data (const PainterAttributeDataFiller &filler)
 
range_type< int > z_range (unsigned int i) const
 
c_array< const range_type< int > > z_ranges (void) const
 

Detailed Description

PainterAttributeData represents the attribute and index data ready to be consumed by a Painter. Data is organized into individual chuncks that can be drawn seperately.

Definition at line 39 of file painter_attribute_data.hpp.

Constructor & Destructor Documentation

◆ PainterAttributeData()

fastuidraw::PainterAttributeData::PainterAttributeData ( void  )

Ctor.

Member Function Documentation

◆ attribute_data_chunk()

c_array<const PainterAttribute> fastuidraw::PainterAttributeData::attribute_data_chunk ( unsigned int  i) const

Provided as an API conveniance to fetch the named chunk of attribute_data_chunks() or an empty chunk if the index is larger then attribute_data_chunks().size().

Parameters
iindex of attribute_data_chunks() to fetch

◆ attribute_data_chunks()

c_array<const c_array<const PainterAttribute> > fastuidraw::PainterAttributeData::attribute_data_chunks ( void  ) const

Returns the attribute data chunks. Usually, for each attribute data chunk, there is a matching index data chunk. Usually, one uses index_data_chunks()[i] to draw the contents of attribute_data_chunks()[i].

◆ index_adjust_chunk()

int fastuidraw::PainterAttributeData::index_adjust_chunk ( unsigned int  i) const

Provided as an API conveniance to fetch the index adjust for the named chunk.

Parameters
iindex of index_adjust_chunks() to fetch

◆ index_adjust_chunks()

c_array<const int> fastuidraw::PainterAttributeData::index_adjust_chunks ( void  ) const

Returns the index adjust value for all chunks. The index adjust value is by how much to adjust the indices of an index chunk.

◆ index_data_chunk()

c_array<const PainterIndex> fastuidraw::PainterAttributeData::index_data_chunk ( unsigned int  i) const

Provided as an API conveniance to fetch the named chunk of index_data_chunks() or an empty chunk if the index is larger then index_data_chunks().size().

Parameters
iindex of index_data_chunks() to fetch

◆ index_data_chunks()

c_array<const c_array<const PainterIndex> > fastuidraw::PainterAttributeData::index_data_chunks ( void  ) const

Returns the index data chunks. Usually, for each attribute data chunk, there is a matching index data chunk. Usually, one uses index_data_chunks()[i] to draw the contents of attribute_data_chunks()[i].

◆ largest_attribute_chunk()

unsigned int fastuidraw::PainterAttributeData::largest_attribute_chunk ( void  ) const

Returns the size of the largest attribute chunk.

◆ largest_index_chunk()

unsigned int fastuidraw::PainterAttributeData::largest_index_chunk ( void  ) const

Returns the size of the largest index chunk.

◆ non_empty_index_data_chunks()

c_array<const unsigned int> fastuidraw::PainterAttributeData::non_empty_index_data_chunks ( void  ) const

Returns an array that holds those value i for which index_data_chunk(i) is non-empty.

◆ set_data()

void fastuidraw::PainterAttributeData::set_data ( const PainterAttributeDataFiller filler)

Set the index, attribute, z-increment and chunk data of this PainterAttributeData using a PainterAttributeDataFiller.

Parameters
fillerobject that fills the data.

◆ z_range()

range_type<int> fastuidraw::PainterAttributeData::z_range ( unsigned int  i) const

Provided as an API conveniance to fetch the named z-range value of z_ranges() or range_type(0, 0) if the index is larger then z_ranges().size().

Parameters
iindex into z_ranges() to fetch

◆ z_ranges()

c_array<const range_type<int> > fastuidraw::PainterAttributeData::z_ranges ( void  ) const

Returns the z-range of the data in an chunk. Recall that the z-value is used by Painter to perform occluding. When an item is to self occlude, z_ranges()[C] holds the relative z-ranges of the z-value emitted by the item's vertex shader.


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