-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvxTextured.h
53 lines (38 loc) · 1.4 KB
/
vxTextured.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
*
* @file vxTextured.h
\brief Facilities to keep track of texturing.
The texture is derived from FastVolume with the help of the Textured class.
*
* This header file is a part of VoxelBrain software.
*
* (c) Nanyang Technological University
*
* Author: Konstantin Levinski
*
*/
#ifndef __vxTextured_h__
#define __vxTextured_h__
#include "vxValidatable.h"
#include "vxFastVolume.h"
#include "vxRange.h"
/*! \brief Takes care of texturing from FastVolume.
Range keeps track of which part of volume is currently active. */
class Textured: public Validatable {
public:
/*! \brief Link to the FastVolume being used.
Has to be assigned manually. */
FastVolume * texturing_fastvolume;
bool CheckTexture( Range & r ); //!< \brief Check if the provided Range is currently included in the texture. If not, upload it.
const V3f & SetTexture( const V3f & where ); //!< \brief Set OpenGL texture coordinate for point where. Returns the same point for chaining. (?)
Textured(); //!< \brief Allocate memory for the texture data.
~Textured(); //!< \brief Free memory.
Range current_range; //!< \brief The current range for which the data is valid.
/*! \brief Flag to update the texture forcefully.
Bad decision, but being used. */
bool force_update;
void * data; //!< \brief Texture data.
int size; //!< \brief Texture data size.
};
#endif // __vxTextured_h__
//End of vxTextured.h