4#include <cgv/math/vec.h>
5#include <cgv/math/mat.h>
6#include <cgv/math/fvec.h>
7#include <cgv/math/fmat.h>
8#include <cgv/math/quaternion.h>
9#include <cgv/media/color.h>
10#include <cgv/type/info/type_id.h>
20 static const void* get_address(
const T& value) {
return &value; }
21 static void* get_address(T& value) {
return &value; }
23 template <
typename T, cgv::type::u
int32_type N>
37 template <
typename T, cgv::media::ColorModel cm, cgv::media::AlphaModel am>
48 static const void* get_address(
const cgv::math::vec<T>& element) {
return &element(0); }
51 template <
typename T, cgv::type::u
int32_type N, cgv::type::u
int32_type M>
62 static const void* get_address(
const cgv::math::mat<T>& element) {
return &element(0, 0); }
91 static_assert(
sizeof(T) == 0,
"This type is not an array type or was not detected as an array type");
100 static const T*
get_address(
const std::vector<T>& vec) {
return &vec.front(); }
102 static T*
get_address(std::vector<T>& vec) {
return &vec.front(); }
106 static size_t get_size(
const std::vector<T>& vec) {
return vec.size() *
sizeof(T); }
109 template <
typename T>
124 template <
typename T>
125 type_descriptor get_array_type(
const T& arr)
127 return typename array_descriptor_traits<T>::get_type_descriptor(arr);
complete implementation of method actions that only call one method when entering a node
matrix of fixed size dimensions
A vector with zero based index.
A matrix type (full column major storage) The matrix can be loaded directly into OpenGL without need ...
unsigned ncols() const
number of columns
unsigned nrows() const
number of rows
unsigned size() const
number of elements
static const T * get_address(const cgv::math::vec< T > &vec)
return const start address in array
static T * get_address(cgv::math::vec< T > &vec)
return start address in array
static size_t get_nr_elements(const cgv::math::vec< T > &vec)
return number elements in array
static size_t get_size(const cgv::math::vec< T > &vec)
return size of array in bytes
static type_descriptor get_type_descriptor(const cgv::math::vec< T > &vec)
return type descriptor for array
static size_t get_size(const std::vector< T > &vec)
return size of array in bytes
static const T * get_address(const std::vector< T > &vec)
return const start address in array
static size_t get_nr_elements(const std::vector< T > &vec)
return number elements in array
static type_descriptor get_type_descriptor(const std::vector< T > &vec)
return type descriptor for array
static T * get_address(std::vector< T > &vec)
return start address in array
compact type description of data that can be sent to the context; convertible to int
template with a static member function get_id() of type TypeId returning the TypeId of the template a...