X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Froam.h;h=02d0beb487aef9aad51c671553deff9f32dfbfe8;hp=da4f508561194ba4bbccf3fb81fc933b86f92663;hb=c2e39b9d64035038a19d753129cc2124b4ed1382;hpb=8060da4427ab86674362a745e9d4af15b8e48f95 diff --git a/src/roam.h b/src/roam.h index da4f508..02d0beb 100644 --- a/src/roam.h +++ b/src/roam.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Andy Spencer + * Copyright (C) 2009-2010 Andy Spencer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,7 +48,7 @@ struct _RoamPoint { gdouble norm[3]; // Vertex normal /* For get_intersect */ - gdouble lat, lon; + gdouble lat, lon, elev; /* For terrain */ RoamHeightFunc height_func; @@ -71,6 +71,10 @@ struct _RoamTriangle { double norm[3]; double error; GPQueueHandle handle; + + /* For get_intersect */ + struct { gdouble n,s,e,w; } edge; + RoamTriangle *kids[2]; }; RoamTriangle *roam_triangle_new(RoamPoint *l, RoamPoint *m, RoamPoint *r); void roam_triangle_add(RoamTriangle *triangle, @@ -113,12 +117,15 @@ struct _RoamSphere { RoamTriangle *roots[8]; }; RoamSphere *roam_sphere_new(); +void roam_sphere_update_view(RoamSphere *sphere); void roam_sphere_update_errors(RoamSphere *sphere); void roam_sphere_split_one(RoamSphere *sphere); void roam_sphere_merge_one(RoamSphere *sphere); gint roam_sphere_split_merge(RoamSphere *sphere); void roam_sphere_draw(RoamSphere *sphere); void roam_sphere_draw_normals(RoamSphere *sphere); +GList *roam_sphere_get_intersect(RoamSphere *sphere, gboolean all, + gdouble n, gdouble s, gdouble e, gdouble w); void roam_sphere_free(RoamSphere *sphere); #endif