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

Friends

CGV_API std::ostream & operator<< (std::ostream &os, const type_descriptor &td)
 operator to write textual description to stream

Detailed Description

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

Definition at line 60 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 70 of file context.h.

Referenced by operator<<, and type_descriptor().

◆ 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 72 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 74 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 76 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 78 of file context.h.

References type_descriptor().

Member Function Documentation

◆ operator int()

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

cast to int

Definition at line 80 of file context.h.

◆ operator<<

CGV_API std::ostream & operator<< ( std::ostream & os,
const type_descriptor & td )
friend

operator to write textual description to stream

Definition at line 30 of file context.cxx.

References cgv::type::info::TI_BOOL, cgv::type::info::TI_FLT32, cgv::type::info::TI_FLT64, cgv::type::info::TI_INT32, cgv::type::info::TI_UINT32, and type_descriptor().

Member Data Documentation

◆ coordinate_type

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

Definition at line 62 of file context.h.

◆ element_type

ElementType cgv::render::type_descriptor::element_type

Definition at line 63 of file context.h.

◆ is_array

bool cgv::render::type_descriptor::is_array

Definition at line 67 of file context.h.

◆ is_row_major

bool cgv::render::type_descriptor::is_row_major

Definition at line 66 of file context.h.

◆ normalize

bool cgv::render::type_descriptor::normalize

Definition at line 68 of file context.h.

◆ nr_columns

unsigned cgv::render::type_descriptor::nr_columns

Definition at line 65 of file context.h.

◆ nr_rows

unsigned cgv::render::type_descriptor::nr_rows

Definition at line 64 of file context.h.


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