20 #include "scm-scene.hpp"
40 int get_detail()
const {
return detail; }
41 int get_limit ()
const {
return limit; }
46 void set_zoom(
double x,
double y,
double z,
double k);
58 void zoom(
double *,
const double *);
62 std::set<long long> pages;
64 bool is_set (
long long i)
const {
return (pages.find(i) != pages.end()); }
65 void set_page(
long long i);
67 void add_page(
const double *,
int,
int,
double,
double,
long long,
bool);
68 double view_page(
const double *,
int,
int,
double,
double,
long long,
bool);
69 void debug_page(
const double *,
double,
double,
long long);
71 bool prep_page(
scm_scene *,
const double *,
int,
int,
int,
long long,
bool);
72 void draw_page(
scm_scene *,
int,
int,
int,
long long);
76 void init_arrays(
int);
An scm_scene encapsulates the definition of a sphere and its parameters.
Definition: scm-scene.hpp:40
void set_detail(int d)
Set the geometric detail of the sphere. Each page will be rendered as a d-by-d grid. This value is limited to the range 0 to 256, which ensures that the vertex index count is a 16-bit number. Changing the detail will trigger a regeneration of the sphere's vertex buffer object data, so it should not be done every frame.
Definition: scm-sphere.cpp:70
void prep(scm_scene *, const double *, int, int, int, bool)
Prepare to render the sphere. Perform all visibility and subdivision calculations. Cache the results for use by a subsequent draw call.
Definition: scm-sphere.cpp:102
scm_sphere(int d, int l)
Create a new spherical geometry rendering object. Initialize the necessary OpenGL vertex buffer objec...
Definition: scm-sphere.cpp:45
void set_limit(int l)
Set the subdivision limit in pixels. That is, if the on-screen size of a page exceeds l then it will ...
Definition: scm-sphere.cpp:84
An scm_sphere generates the adaptive rendered geometry of the 3D sphere.
Definition: scm-sphere.hpp:30
~scm_sphere()
Finalize all OpenGL state.
Definition: scm-sphere.cpp:57
void set_zoom(double x, double y, double z, double k)
Set the direction and magnitude of the zoom.
Definition: scm-sphere.cpp:206
void draw(scm_scene *, const double *, int, int, int, int)
Render the sphere using cached visibility and subdivision state.
Definition: scm-sphere.cpp:124