19 #include "util3d/glsl.h"
27 typedef std::vector<scm_image *> scm_image_v;
28 typedef std::vector<scm_image *>::iterator scm_image_i;
29 typedef std::vector<scm_image *>::const_iterator scm_image_c;
60 void set_name (
const std::string &s);
62 void set_vert (
const std::string &s);
63 void set_frag (
const std::string &s);
69 GLuint get_color()
const {
return color; }
70 const std::string& get_name ()
const {
return name; }
71 const std::string& get_label()
const {
return label_file; }
72 const std::string& get_vert ()
const {
return vert_file; }
73 const std::string& get_frag ()
const {
return frag_file; }
85 void bind_page(
int,
int,
int,
long long)
const;
102 std::string label_file;
103 std::string vert_file;
104 std::string frag_file;
void set_label(const std::string &s)
Set the label text.
Definition: scm-scene.cpp:110
void get_page_bounds(int, long long, float &, float &) const
Determine the minimum and maximum values of one page of the height image.
Definition: scm-scene.cpp:287
void set_frag(const std::string &s)
Set the fragment shader and reinitialize the uniforms.
Definition: scm-scene.cpp:139
scm_image * get_image(int i)
Return a pointer to the image at index i.
Definition: scm-scene.cpp:74
void draw_label()
Render the labels for this scene, if any.
Definition: scm-scene.cpp:175
An scm_image represents an SCM data file in use by an scm_scene.
Definition: scm-image.hpp:34
An scm_scene encapsulates the definition of a sphere and its parameters.
Definition: scm-scene.hpp:40
void bind_page(int, int, int, long long) const
Bind a page in each image matching a channel.
Definition: scm-scene.cpp:230
An scm_label renders annotations on the sphere.
Definition: scm-label.hpp:52
void init_uniforms()
Request and store the uniform locations for the current program.
Definition: scm-scene.cpp:155
An scm_sphere generates the adaptive rendered geometry of the 3D sphere.
Definition: scm-sphere.hpp:30
int get_image_count() const
Return the number of images in the collection.
Definition: scm-scene.cpp:81
void set_name(const std::string &s)
Set the scene name.
Definition: scm-scene.cpp:99
void set_color(GLuint c)
Set the label color.
Definition: scm-scene.cpp:92
bool get_page_status(int, long long) const
Return true if any one of the images has page i in cache.
Definition: scm-scene.cpp:304
void set_vert(const std::string &s)
Set the vertex shader and reinitialize the uniforms.
Definition: scm-scene.cpp:123
float get_minimum_ground() const
Return the smallest value in the height image.
Definition: scm-scene.cpp:274
void unbind_page(int, int) const
Unbind a page in each image matching a channel.
Definition: scm-scene.cpp:239
void bind(int) const
Bind the program and all image textures matching the given channel.
Definition: scm-scene.cpp:197
~scm_scene()
Finalize all SCM scene state.
Definition: scm-scene.cpp:33
scm_scene(scm_system *)
Create a new SCM scene for use in the given SCM system.
Definition: scm-scene.cpp:24
float get_current_ground(const double *) const
Sample the height image at the given location.
Definition: scm-scene.cpp:262
int add_image(int i)
Allocate and insert a new image before index i. Return its index.
Definition: scm-scene.cpp:48
void unbind(int) const
Unbind the program and all image textures matching the given channel.
Definition: scm-scene.cpp:213
void touch_page(int, int, long long) const
Touch a page in each image matching a channel.
Definition: scm-scene.cpp:248
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
void del_image(int i)
Delete the image at index i.
Definition: scm-scene.cpp:64