The Geoobj Module

The GeoObj Type

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];
}
   

size

total size of the structure (internal use only)

type

type of objects, i.e. POINTS, LINES, POLYGON,.. (Read Only)

bbox

3D coordinates of the bounding box (Read Only)

bvolume

volume of the bounding box to allow sorting (Read Only)

centroid

3D coordinates of the object centroid (Read Only)

anchor

3D coordinates of a point on the object to anchor text or other (Read Write)

data

byte stream specifying the object. (Resisable)

About format structure:

The format of points follows a simplified high resolution interwined system.

formatTextureColorNormalVertex
FM_V3D   3xFloat8
FM_C3D_V3D 3xFloat8 3xFloat8
FM_C4D_V3D 4xFloat8 3xFloat8
FM_N3D_V3D  3xFloat83xFloat8
FM_C4D_N3D_V3D 4xFloat83xFloat83xFloat8
FM_T2D_V3D2xFloat8  3xFloat8
FM_T2D_C3D_V3D2xFloat83xFloat8 3xFloat8
FM_T2D_N3D_V3D2xFloat8 3xFloat83xFloat8
FM_T2D_C4D_N3D_V3D2xFloat84xFloat83xFloat83xFloat8

FM_POINTS

Structure

struct points
{
int4 numvertex;
int4 format;
float4 pointsize;
float4 color[4];
float8 array[1]; (Resisable)
}
     

Representation

POINTS ( COLOR(r g b a) FORMAT(format) SIZE(s) (x11 x21 x31 ..xn1,...,x1m x2m ...xnm)) 
     

r,g,b,a

the color of all the points - optional (black by default)

format

FM_V3D or FM_C3D_V3D or FM_C4D_V3D

s

the point size -optional (1 by default)

FM_LINES, FM_LINE_STRIP, FM_LINE_LOOP

Structure

struct lines

{
int4 numvertex;
int4 format;
float4 width;
int4 factor;
int4 pattern;
float4 color[4];
float8 array[1]; (Resisable)
}
     

Representation

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))
     

r,g,b,a

the color of all the points - optional (black by default)

format

FM_V3D or FM_C3D_V3D or FM_C4D_V3D

w

the line width

factor

stipple factor

pattern

stipple pattern

The Geoobj Functions