Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::REveRenderData::Entry Class Reference

Definition at line 79 of file REveRenderData.hxx.

Public Member Functions

 Entry ()=default
 
 Entry (std::string_view tag, EType type, int item_size)
 
size_t AlignedBytes () const
 Bytes this entry takes in the blob: Bytes() rounded up to kAlign.
 
template<typename T >
std::span< T > Alloc (size_t n_items)
 Resize to n items of the item size each, and return them for a bulk fill.
 
Entry & AsTexture (ETexFormat f, int texels_per_item=1)
 Hold this entry in a texture of format f: picks w x h with CalcTextureSize(), the width a multiple of texels_per_item so that an item does not wrap a row, and zero-pads the data to w * h texels.
 
size_t Bytes () const
 Bytes of data, padding to the texture size included.
 
size_t Count () const
 
template<typename T >
T * DataAs ()
 
int GetItemSize () const
 
EPrim GetPrim () const
 
ERole GetRole () const
 
ETexFormat GetTexFormat () const
 
int GetTexH () const
 
int GetTexW () const
 
EType GetType () const
 
bool InBlob () const
 Takes the entry in the blob; empty entries are neither described nor written.
 
size_t NElements () const
 
Entry & Prim (EPrim p)
 
Entry & Push (const REveVectorF &v)
 
template<typename T >
Entry & Push (const T *v, size_t n)
 Append n elements, not items.
 
template<typename T , typename = std::enable_if_t<std::is_arithmetic_v<T>>>
Entry & Push (T v)
 Append one element; T must be the entry's type.
 
template<typename T , typename... Ts, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
Entry & Push (T v, Ts... vs)
 
Entry & PushRGBA (UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
 
Entry & Range (UInt_t start, UInt_t count)
 Add a draw range of count items from start.
 
const std::byte * RawData () const
 
const std::vector< std::pair< UInt_t, UInt_t > > & RefRanges () const
 
Entry & Reserve (size_t n_items)
 Reserve storage for n_items items of the item size.
 
Entry & ResizeElements (size_t n)
 Resize to n elements, not items. New elements are zero.
 
Entry & Role (ERole r)
 
const std::string & Tag () const
 
template<class Json >
void WriteJson (Json &j, size_t offset) const
 Metadata for render_data.entries[tag]; offset is block-relative.
 
template<class Json >
void WriteJson (Json &j, size_t offset) const
 Write the entry's metadata into j. offset is block-relative.
 

Private Member Functions

void CheckAppend () const
 
void CheckType (EType t) const
 
std::byte * Grow (size_t n_bytes)
 Append n_bytes of storage and return where they start.
 

Private Attributes

std::vector< std::byte > fData
 
int fItemSize {1}
 Elements per item: 3 for xyz, 1 for an index, 4 for RGBA; Count() is NElements() / fItemSize.
 
size_t fNElements {0}
 elements pushed; fData can be longer after AsTexture() pads it
 
EPrim fPrim {EPrim::kNone}
 
std::vector< std::pair< UInt_t, UInt_t > > fRanges
 
ERole fRole {ERole::kVertex}
 
std::string fTag
 
ETexFormat fTexFormat {ETexFormat::kNone}
 
int fTexH {0}
 
int fTexW {0}
 
EType fType {EType::kF32}
 

Friends

class REveRenderData
 

#include <ROOT/REveRenderData.hxx>

Constructor & Destructor Documentation

◆ Entry() [1/2]

ROOT::Experimental::REveRenderData::Entry::Entry ( )
default

◆ Entry() [2/2]

ROOT::Experimental::REveRenderData::Entry::Entry ( std::string_view tag,
EType type,
int item_size )
inline

Definition at line 100 of file REveRenderData.hxx.

Member Function Documentation

◆ AlignedBytes()

size_t ROOT::Experimental::REveRenderData::Entry::AlignedBytes ( ) const
inline

Bytes this entry takes in the blob: Bytes() rounded up to kAlign.

Definition at line 176 of file REveRenderData.hxx.

◆ Alloc()

template<typename T >
std::span< T > ROOT::Experimental::REveRenderData::Entry::Alloc ( size_t n_items)
inline

Resize to n items of the item size each, and return them for a bulk fill.

New elements are zero.

Definition at line 144 of file REveRenderData.hxx.

◆ AsTexture()

REveRenderData::Entry & REveRenderData::Entry::AsTexture ( ETexFormat f,
int texels_per_item = 1 )

Hold this entry in a texture of format f: picks w x h with CalcTextureSize(), the width a multiple of texels_per_item so that an item does not wrap a row, and zero-pads the data to w * h texels.

Hold the entry in a texture of format f.

The role becomes kInstance. Call it once the data is complete; nothing can be appended after it.

The texture is w x h texels from CalcTextureSize(), the width a multiple of texels_per_item, and the data is zero-padded to fill it. The role becomes kInstance.

Definition at line 209 of file REveRenderData.cxx.

◆ Bytes()

size_t ROOT::Experimental::REveRenderData::Entry::Bytes ( ) const
inline

Bytes of data, padding to the texture size included.

Definition at line 174 of file REveRenderData.hxx.

◆ CheckAppend()

void REveRenderData::Entry::CheckAppend ( ) const
private

Definition at line 157 of file REveRenderData.cxx.

◆ CheckType()

void REveRenderData::Entry::CheckType ( EType t) const
private

Definition at line 151 of file REveRenderData.cxx.

◆ Count()

size_t ROOT::Experimental::REveRenderData::Entry::Count ( ) const
inline

Definition at line 172 of file REveRenderData.hxx.

◆ DataAs()

template<typename T >
T * ROOT::Experimental::REveRenderData::Entry::DataAs ( )
inline

Definition at line 182 of file REveRenderData.hxx.

◆ GetItemSize()

int ROOT::Experimental::REveRenderData::Entry::GetItemSize ( ) const
inline

Definition at line 165 of file REveRenderData.hxx.

◆ GetPrim()

EPrim ROOT::Experimental::REveRenderData::Entry::GetPrim ( ) const
inline

Definition at line 164 of file REveRenderData.hxx.

◆ GetRole()

ERole ROOT::Experimental::REveRenderData::Entry::GetRole ( ) const
inline

Definition at line 163 of file REveRenderData.hxx.

◆ GetTexFormat()

ETexFormat ROOT::Experimental::REveRenderData::Entry::GetTexFormat ( ) const
inline

Definition at line 168 of file REveRenderData.hxx.

◆ GetTexH()

int ROOT::Experimental::REveRenderData::Entry::GetTexH ( ) const
inline

Definition at line 167 of file REveRenderData.hxx.

◆ GetTexW()

int ROOT::Experimental::REveRenderData::Entry::GetTexW ( ) const
inline

Definition at line 166 of file REveRenderData.hxx.

◆ GetType()

EType ROOT::Experimental::REveRenderData::Entry::GetType ( ) const
inline

Definition at line 162 of file REveRenderData.hxx.

◆ Grow()

std::byte * REveRenderData::Entry::Grow ( size_t n_bytes)
private

Append n_bytes of storage and return where they start.

Definition at line 166 of file REveRenderData.cxx.

◆ InBlob()

bool ROOT::Experimental::REveRenderData::Entry::InBlob ( ) const
inline

Takes the entry in the blob; empty entries are neither described nor written.

Definition at line 178 of file REveRenderData.hxx.

◆ NElements()

size_t ROOT::Experimental::REveRenderData::Entry::NElements ( ) const
inline

Definition at line 171 of file REveRenderData.hxx.

◆ Prim()

Entry & ROOT::Experimental::REveRenderData::Entry::Prim ( EPrim p)
inline

Definition at line 107 of file REveRenderData.hxx.

◆ Push() [1/4]

Entry & ROOT::Experimental::REveRenderData::Entry::Push ( const REveVectorF & v)
inline

Definition at line 138 of file REveRenderData.hxx.

◆ Push() [2/4]

template<typename T >
Entry & ROOT::Experimental::REveRenderData::Entry::Push ( const T * v,
size_t n )
inline

Append n elements, not items.

Definition at line 131 of file REveRenderData.hxx.

◆ Push() [3/4]

template<typename T , typename = std::enable_if_t<std::is_arithmetic_v<T>>>
Entry & ROOT::Experimental::REveRenderData::Entry::Push ( T v)
inline

Append one element; T must be the entry's type.

Definition at line 117 of file REveRenderData.hxx.

◆ Push() [4/4]

template<typename T , typename... Ts, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
Entry & ROOT::Experimental::REveRenderData::Entry::Push ( T v,
Ts... vs )
inline

Definition at line 124 of file REveRenderData.hxx.

◆ PushRGBA()

Entry & ROOT::Experimental::REveRenderData::Entry::PushRGBA ( UChar_t r,
UChar_t g,
UChar_t b,
UChar_t a = 255 )
inline

Definition at line 139 of file REveRenderData.hxx.

◆ Range()

REveRenderData::Entry & REveRenderData::Entry::Range ( UInt_t start,
UInt_t count )

Add a draw range of count items from start.

Definition at line 187 of file REveRenderData.cxx.

◆ RawData()

const std::byte * ROOT::Experimental::REveRenderData::Entry::RawData ( ) const
inline

Definition at line 180 of file REveRenderData.hxx.

◆ RefRanges()

const std::vector< std::pair< UInt_t, UInt_t > > & ROOT::Experimental::REveRenderData::Entry::RefRanges ( ) const
inline

Definition at line 169 of file REveRenderData.hxx.

◆ Reserve()

REveRenderData::Entry & REveRenderData::Entry::Reserve ( size_t n_items)

Reserve storage for n_items items of the item size.

Definition at line 178 of file REveRenderData.cxx.

◆ ResizeElements()

REveRenderData::Entry & REveRenderData::Entry::ResizeElements ( size_t n)

Resize to n elements, not items. New elements are zero.

Resize to n elements; new elements are zero.

Definition at line 196 of file REveRenderData.cxx.

◆ Role()

Entry & ROOT::Experimental::REveRenderData::Entry::Role ( ERole r)
inline

Definition at line 102 of file REveRenderData.hxx.

◆ Tag()

const std::string & ROOT::Experimental::REveRenderData::Entry::Tag ( ) const
inline

Definition at line 161 of file REveRenderData.hxx.

◆ WriteJson() [1/2]

template<class Json >
void ROOT::Experimental::REveRenderData::Entry::WriteJson ( Json & j,
size_t offset ) const

Metadata for render_data.entries[tag]; offset is block-relative.

Json is nlohmann::json, as below.

◆ WriteJson() [2/2]

template<class Json >
void ROOT::Experimental::REveRenderData::Entry::WriteJson ( Json & j,
size_t offset ) const

Write the entry's metadata into j. offset is block-relative.

Definition at line 243 of file REveRenderData.cxx.

Friends And Related Symbol Documentation

◆ REveRenderData

friend class REveRenderData
friend

Definition at line 80 of file REveRenderData.hxx.

Member Data Documentation

◆ fData

std::vector<std::byte> ROOT::Experimental::REveRenderData::Entry::fData
private

Definition at line 83 of file REveRenderData.hxx.

◆ fItemSize

int ROOT::Experimental::REveRenderData::Entry::fItemSize {1}
private

Elements per item: 3 for xyz, 1 for an index, 4 for RGBA; Count() is NElements() / fItemSize.

Definition at line 87 of file REveRenderData.hxx.

◆ fNElements

size_t ROOT::Experimental::REveRenderData::Entry::fNElements {0}
private

elements pushed; fData can be longer after AsTexture() pads it

Definition at line 84 of file REveRenderData.hxx.

◆ fPrim

EPrim ROOT::Experimental::REveRenderData::Entry::fPrim {EPrim::kNone}
private

Definition at line 91 of file REveRenderData.hxx.

◆ fRanges

std::vector<std::pair<UInt_t, UInt_t> > ROOT::Experimental::REveRenderData::Entry::fRanges
private

Definition at line 85 of file REveRenderData.hxx.

◆ fRole

ERole ROOT::Experimental::REveRenderData::Entry::fRole {ERole::kVertex}
private

Definition at line 90 of file REveRenderData.hxx.

◆ fTag

std::string ROOT::Experimental::REveRenderData::Entry::fTag
private

Definition at line 82 of file REveRenderData.hxx.

◆ fTexFormat

ETexFormat ROOT::Experimental::REveRenderData::Entry::fTexFormat {ETexFormat::kNone}
private

Definition at line 92 of file REveRenderData.hxx.

◆ fTexH

int ROOT::Experimental::REveRenderData::Entry::fTexH {0}
private

Definition at line 88 of file REveRenderData.hxx.

◆ fTexW

int ROOT::Experimental::REveRenderData::Entry::fTexW {0}
private

Definition at line 88 of file REveRenderData.hxx.

◆ fType

EType ROOT::Experimental::REveRenderData::Entry::fType {EType::kF32}
private

Definition at line 89 of file REveRenderData.hxx.

Libraries for ROOT::Experimental::REveRenderData::Entry:

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