cgv
Loading...
Searching...
No Matches
cgv::render::type_descriptor Struct Reference

compact type description of data that can be sent to the context; convertible to int More...

#include <context.h>

Public Member Functions

 type_descriptor (int td=0)
 construct from int
 
 type_descriptor (cgv::type::info::TypeId _coordinate_type, bool _normalize=false)
 construct descriptor for values
 
 type_descriptor (cgv::type::info::TypeId _coordinate_type, unsigned _nr_entries, bool _normalize=false)
 construct descriptor for vectors
 
 type_descriptor (cgv::type::info::TypeId _coordinate_type, unsigned _nr_rows, unsigned _nr_cols, bool _is_row_major, bool _normalize=false)
 construct descriptor for matrices
 
 type_descriptor (const type_descriptor &td, bool _is_array)
 construct descriptor for an array
 
 operator int () const
 cast to int
 

Public Attributes

cgv::type::info::TypeId coordinate_type: 8
 
ElementType element_type: 4
 
unsigned nr_rows: 4
 
unsigned nr_columns: 4
 
bool is_row_major: 1
 
bool is_array: 1
 
bool normalize: 1
 

Detailed Description

compact type description of data that can be sent to the context; convertible to int

Definition at line 46 of file context.h.

Constructor & Destructor Documentation

◆ type_descriptor() [1/5]

cgv::render::type_descriptor::type_descriptor ( int  td = 0)
inline

construct from int

Definition at line 56 of file context.h.

◆ type_descriptor() [2/5]

cgv::render::type_descriptor::type_descriptor ( cgv::type::info::TypeId  _coordinate_type,
bool  _normalize = false 
)
inline

construct descriptor for values

Definition at line 58 of file context.h.

◆ type_descriptor() [3/5]

cgv::render::type_descriptor::type_descriptor ( cgv::type::info::TypeId  _coordinate_type,
unsigned  _nr_entries,
bool  _normalize = false 
)
inline

construct descriptor for vectors

Definition at line 60 of file context.h.

◆ type_descriptor() [4/5]

cgv::render::type_descriptor::type_descriptor ( cgv::type::info::TypeId  _coordinate_type,
unsigned  _nr_rows,
unsigned  _nr_cols,
bool  _is_row_major,
bool  _normalize = false 
)
inline

construct descriptor for matrices

Definition at line 62 of file context.h.

◆ type_descriptor() [5/5]

cgv::render::type_descriptor::type_descriptor ( const type_descriptor td,
bool  _is_array 
)
inline

construct descriptor for an array

Definition at line 64 of file context.h.

Member Function Documentation

◆ operator int()

cgv::render::type_descriptor::operator int ( ) const
inline

cast to int

Definition at line 66 of file context.h.

Member Data Documentation

◆ coordinate_type

cgv::type::info::TypeId cgv::render::type_descriptor::coordinate_type

Definition at line 48 of file context.h.

◆ element_type

ElementType cgv::render::type_descriptor::element_type

Definition at line 49 of file context.h.

◆ is_array

bool cgv::render::type_descriptor::is_array

Definition at line 53 of file context.h.

◆ is_row_major

bool cgv::render::type_descriptor::is_row_major

Definition at line 52 of file context.h.

◆ normalize

bool cgv::render::type_descriptor::normalize

Definition at line 54 of file context.h.

◆ nr_columns

unsigned cgv::render::type_descriptor::nr_columns

Definition at line 51 of file context.h.

◆ nr_rows

unsigned cgv::render::type_descriptor::nr_rows

Definition at line 50 of file context.h.


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