| [Insert name here] Reference Manual |
|---|
graphf-scene —
struct GraphfScenePoint;
struct GraphfSceneLine;
struct GraphfSceneTriangle;
struct GraphfSceneLight;
struct GraphfScene;
struct GraphfSceneImageData;
struct GraphfSceneImage;
void graphf_scene_init (GraphfScene *scene);
void graphf_scene_get_triangle_normal
(GraphfScene *scene,
unsigned tri_index,
double *normal_out);
gboolean graphf_scene_get_is_underside (GraphfScene *scene,
unsigned tri_index,
const double *camera_relative_normal,
const double *camera_relative_tri_center);
void graphf_scene_get_triangle_color (GraphfScene *scene,
unsigned tri_index,
const double *normal,
gboolean is_underside,
float *rgb_out);
struct GraphfSceneTriangle {
guint vertices[3];
guint32 emissive_color;
guint32 front_color;
guint32 back_color;
gdouble fudge;
};
struct GraphfScene {
Graphf3DCamera camera;
guint n_points;
GraphfScenePoint *points;
guint n_tris;
GraphfSceneTriangle *tris;
guint n_lines;
GraphfSceneLine *lines;
guint n_lights;
Graphf3DLight *lights;
guint n_image_data;
GraphfSceneImageData *image_data;
guint n_images;
GraphfSceneImage *images;
guint32 background_color;
guint ambient_light;
double clip_z;
};
struct GraphfSceneImageData {
guint width, height;
/* you may assume (width+7)/8 bytes per row in 'is_opaque'.
if NULL, the image is completely opaque. */
guint8 *is_opaque;
guint8 *rgb_data;
gint rowstride;
GraphfSceneImageData *next_resolution;
};
struct GraphfSceneImage {
guint which_image;
/* where is 0,0 in the image */
double origin[3];
/* this covers the extent of the image along
its width in real coordinate. */
double x[3];
/* likewise for height */
double y[3];
};
void graphf_scene_get_triangle_normal
(GraphfScene *scene,
unsigned tri_index,
double *normal_out);
| scene: | |
| Param2: | |
| normal_out: |
gboolean graphf_scene_get_is_underside (GraphfScene *scene,
unsigned tri_index,
const double *camera_relative_normal,
const double *camera_relative_tri_center);
| scene: | |
| Param2: | |
| camera_relative_normal: | |
| camera_relative_tri_center: | |
| Returns : |
| << graphf-render | graphf-zbuffer >> |