The purpose of geoobj is to be of a more general nature and not to be specifically bound by GIS or CAD semantic. However it should provide a minimum of funtionality to allow its use in GIS applications. The geoobj should be flexible enough to provide adaptive storage for OpenGL primitives as well as more elaborated GLUT primitives and maybe a combination of all...
The structure of geoobj follows the style type casting of GTK+. It means that the geoobj is a hierachical structure.
Struct geeobj { int4 size; int4 type; float8 bbox[6]; float8 bvolume; float8 centroid[6]; float8 anchor[6]; char data[1]; }
total size of the structure (internal use only)
type of objects, i.e. POINTS, LINES, POLYGON,.. (Read Only)
3D coordinates of the bounding box (Read Only)
volume of the bounding box to allow sorting (Read Only)
3D coordinates of the object centroid (Read Only)
3D coordinates of a point on the object to anchor text or other (Read Write)
byte stream specifying the object. (Resisable)
About format structure:
The format of points follows a simplified high resolution interwined system.
format | Texture | Color | Normal | Vertex |
FM_V3D | 3xFloat8 | |||
FM_C3D_V3D | 3xFloat8 | 3xFloat8 | ||
FM_C4D_V3D | 4xFloat8 | 3xFloat8 | ||
FM_N3D_V3D | 3xFloat8 | 3xFloat8 | ||
FM_C4D_N3D_V3D | 4xFloat8 | 3xFloat8 | 3xFloat8 | |
FM_T2D_V3D | 2xFloat8 | 3xFloat8 | ||
FM_T2D_C3D_V3D | 2xFloat8 | 3xFloat8 | 3xFloat8 | |
FM_T2D_N3D_V3D | 2xFloat8 | 3xFloat8 | 3xFloat8 | |
FM_T2D_C4D_N3D_V3D | 2xFloat8 | 4xFloat8 | 3xFloat8 | 3xFloat8 |
struct points { int4 numvertex; int4 format; float4 pointsize; float4 color[4]; float8 array[1]; (Resisable) }
POINTS ( COLOR(r g b a) FORMAT(format) SIZE(s) (x11 x21 x31 ..xn1,...,x1m x2m ...xnm))
the color of all the points - optional (black by default)
FM_V3D or FM_C3D_V3D or FM_C4D_V3D
the point size -optional (1 by default)
struct lines
{ int4 numvertex; int4 format; float4 width; int4 factor; int4 pattern; float4 color[4]; float8 array[1]; (Resisable) }
LINES ( COLOR(r g b a) FORMAT (format) WIDTH (w) STIPPLE (factor pattern) (x11 x21 x31 ..xn1,...,x1m x2m ...xnm)) LINE_STRIP ( COLOR(r g b a) FORMAT (format) WIDTH (w) STIPPLE (factor pattern) (x11 x21 x31 ..xn1,...,x1m x2m ...xnm)) LINE_LOOP ( COLOR(r g b a) FORMAT (format) WIDTH (w) STIPPLE (factor pattern) (x11 x21 x31 ..xn1,...,x1m x2m ...xnm))
the color of all the points - optional (black by default)
FM_V3D or FM_C3D_V3D or FM_C4D_V3D
the line width
stipple factor
stipple pattern