44 void set_scm (
const std::string& s);
45 void set_name (
const std::string& s);
54 const std::string& get_scm()
const {
return scm; }
55 const std::string& get_name()
const {
return name; }
56 int get_channel()
const {
return channel; }
57 float get_normal_min()
const {
return k0; }
58 float get_normal_max()
const {
return k1; }
60 bool is_channel(
int c)
const {
return (channel == c || channel == -1); }
61 bool is_height()
const {
return (height); }
69 void bind(GLuint, GLuint)
const;
72 void bind_page(GLuint,
int,
int,
long long)
const;
void unbind(GLuint) const
Unbind the cache's texture by binding the texture unit to zero.
Definition: scm-image.cpp:160
bool get_page_status(long long) const
Return true if a page is present in this image.
Definition: scm-image.cpp:260
void set_normal_min(float k)
Set the input value to be mapped onto 0 in the output.
Definition: scm-image.cpp:102
void bind(GLuint, GLuint) const
Set all GLSL uniform values for this image and bind the cache's texture.
Definition: scm-image.cpp:140
An scm_image represents an SCM data file in use by an scm_scene.
Definition: scm-image.hpp:34
float get_page_sample(const double *) const
Sample this image at the given location, returning a normalized result.
Definition: scm-image.cpp:230
void set_scm(const std::string &s)
Configure this image to read data from the named SCM file.
Definition: scm-image.cpp:67
void unbind_page(GLuint, int) const
Set the texture mapping uniforms to reference cache line zero (which is always blank).
Definition: scm-image.cpp:208
scm_image(scm_system *)
Initialize a new empty image for use in the given SCM system.
Definition: scm-image.cpp:25
~scm_image()
Finalize this image's SCM file.
Definition: scm-image.cpp:41
void init_uniforms(GLuint)
Request and store GLSL uniform locations for this image's parameters.
Definition: scm-image.cpp:118
void set_normal_max(float k)
Set the input value to be mapped onto 1 in the output.
Definition: scm-image.cpp:109
void touch_page(int, long long) const
Set the last-used time of a page.
Definition: scm-image.cpp:216
void set_channel(int c)
Set the channel index for this image.
Definition: scm-image.cpp:95
void bind_page(GLuint, int, int, long long) const
Set the GLSL uniforms necessary to map a page of texture data.
Definition: scm-image.cpp:175
void get_page_bounds(long long, float &, float &) const
Determine the minimum and maximum values of one page, returning a normalized result.
Definition: scm-image.cpp:241
void set_name(const std::string &s)
Set the name by which GLSL sampler uniforms may access this image.
Definition: scm-image.cpp:84
An scm_system encapsulates all of the state of an SCM renderer. Its interface is the primary API of t...
Definition: scm-system.hpp:175
An scm_cache is a virtual texture, demand-paged with threaded data access, represented as a single la...
Definition: scm-cache.hpp:35