View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

texture1d.h
Go to the documentation of this file.
1#ifndef TEXTURE1D_H
2#define TEXTURE1D_H
3
4
5#include "scalar.h"
6#include "shm.h"
7#include "object.h"
8#include "vec.h"
9
10namespace vistle {
11
12class V_COREEXPORT Texture1D: public Vec<Scalar> {
14
15public:
17
18 Texture1D(const Index width, const Scalar min, const Scalar max, const Meta &meta = Meta());
19
20 Index getWidth() const;
21 Scalar getMin() const;
22 Scalar getMax() const;
23 Index getNumCoords() { return getSize(); }
24 Index getNumCoords() const { return getSize(); }
25 shm<unsigned char>::array &pixels() { return *d()->pixels; }
26 const shm<unsigned char>::array &pixels() const { return *d()->pixels; }
27 shm<Scalar>::array &coords() { return x(); }
28 const Scalar *coords() const { return x(); }
29
31 Scalar range[2];
32
34
35 static Data *create(const Index width = 0, const Scalar min = 0, const Scalar max = 0, const Meta &m = Meta());
36 Data(const std::string &name = "", const Index size = 0, const Scalar min = 0, const Scalar max = 0,
37 const Meta &m = Meta());
38
40};
41
42} // namespace vistle
43#endif
Definition: objectmeta.h:16
Definition: texture1d.h:12
static Data * create(const Index width=0, const Scalar min=0, const Scalar max=0, const Meta &m=Meta())
V_DATA_END(Texture1D)
shm< Scalar >::array & coords()
Definition: texture1d.h:27
const Scalar * coords() const
Definition: texture1d.h:28
Index getNumCoords()
Definition: texture1d.h:23
const shm< unsignedchar >::array & pixels() const
Definition: texture1d.h:26
ShmVector< unsigned char > pixels
Definition: texture1d.h:33
shm< unsignedchar >::array & pixels()
Definition: texture1d.h:25
Index getNumCoords() const
Definition: texture1d.h:24
Data(const std::string &name="", const Index size=0, const Scalar min=0, const Scalar max=0, const Meta &m=Meta())
Vec< Scalar > Base
Definition: texture1d.h:16
V_DATA_BEGIN(Texture1D)
Definition: vec.h:13
Definition: shm_reference.h:15
Definition: shm_array.h:19
#define V_COREEXPORT
Definition: export.h:9
static T min(T a, T b)
Definition: messages.cpp:28
Definition: allobjects.cpp:30
float Scalar
Definition: scalar.h:14
uint32_t Index
Definition: index.h:13
#define V_OBJECT(ObjType)
declare a new Object type
Definition: object.h:381
Definition: object.h:233