GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gsd_cplane.c File Reference

OGSF library - manipulating surfaces (lower level functions) More...

#include <grass/gstypes.h>
#include "rowcol.h"
Include dependency graph for gsd_cplane.c:

Go to the source code of this file.

Functions

void gsd_def_cplane (int num, float *pt, float *norm)
 Define cplace. More...
 
void gsd_update_cplanes (void)
 Update cplaces. More...
 
void gsd_cplane_on (int num)
 ADD. More...
 
void gsd_cplane_off (int num)
 Turn off clip plane. More...
 
void gsd_get_cplanes_state (int *onstate)
 Get cplane state. More...
 
int gsd_get_cplanes (Point4 *planes)
 Get cplaces. More...
 
void gsd_update_cpnorm (int num)
 ADD. More...
 
void gsd_cplane_setrot (int num, float rx, float ry, float rz)
 ADD. More...
 
void gsd_cplane_settrans (int num, float tx, float ty, float tz)
 ADD. More...
 
void gsd_draw_cplane_fence (geosurf *surf1, geosurf *surf2, int cpnum)
 ADD. More...
 
void gsd_draw_cplane (int num)
 Draw cplane. More...
 

Detailed Description

OGSF library - manipulating surfaces (lower level functions)

GRASS OpenGL gsurf OGSF Library

(C) 1999-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Bill Brown USACERL, GMSL/University of Illinois (January 1993)
Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gsd_cplane.c.

Function Documentation

void gsd_cplane_off ( int  num)

Turn off clip plane.

Parameters
numcplane id

Definition at line 126 of file gsd_cplane.c.

References gsd_set_clipplane(), and num.

Referenced by GS_draw_lighting_model(), and GS_unset_cplane().

void gsd_cplane_on ( int  num)

ADD.

Parameters
num

Definition at line 104 of file gsd_cplane.c.

References first, gsd_def_cplane(), gsd_set_clipplane(), and num.

Referenced by GS_draw_lighting_model(), and GS_set_cplane().

void gsd_cplane_setrot ( int  num,
float  rx,
float  ry,
float  rz 
)

ADD.

Parameters
num
rx,ry,rz

Definition at line 211 of file gsd_cplane.c.

References gsd_def_cplane(), gsd_update_cpnorm(), num, X, and Y.

Referenced by GS_set_cplane_rot().

void gsd_cplane_settrans ( int  num,
float  tx,
float  ty,
float  tz 
)

ADD.

Parameters
num
tx,ty,tz

Definition at line 229 of file gsd_cplane.c.

References gsd_def_cplane(), num, X, and Y.

Referenced by GS_set_cplane_trans().

void gsd_def_cplane ( int  num,
float *  pt,
float *  norm 
)

Define cplace.

Parameters
num
pt
norm

Definition at line 55 of file gsd_cplane.c.

References GS_dv3norm(), GS_get_scale(), GS_get_zrange(), and gsd_def_clipplane().

Referenced by gsd_cplane_on(), gsd_cplane_setrot(), gsd_cplane_settrans(), and gsd_update_cplanes().

void gsd_draw_cplane_fence ( geosurf *  surf1,
geosurf *  surf2,
int  cpnum 
)

ADD.

Parameters
surf1first surface (geosurf)
surf2second surface (geosurf) [unused]
cpnum

Definition at line 247 of file gsd_cplane.c.

References GS_P2distance(), GS_v3norm(), gsd_set_clipplane(), gsd_wall(), VROW2Y, X, and Y.

Referenced by GS_draw_cplane(), and GS_draw_cplane_fence().

int gsd_get_cplanes ( Point4 *  planes)

Get cplaces.

Planes MUST be big enough to hold MAX_CPLANES Point4s

Parameters
placessurface coordinates, normal pointing away from visible side
Returns
ADD

Definition at line 162 of file gsd_cplane.c.

References X, and Y.

Referenced by gs_setlos_enterdata().

void gsd_get_cplanes_state ( int onstate)

Get cplane state.

onstate MUST be big enough to hold MAX_CPLANES ints

Parameters
onstate

Definition at line 142 of file gsd_cplane.c.

Referenced by GS_alldraw_cplane_fences(), and GS_draw_lighting_model().

void gsd_update_cplanes ( void  )

Update cplaces.

Called when viewing matrix changes

Definition at line 86 of file gsd_cplane.c.

References gsd_def_cplane().

Referenced by gsd_set_view().

void gsd_update_cpnorm ( int  num)

ADD.

Parameters
num

Definition at line 188 of file gsd_cplane.c.

References P_popmatrix(), P_pushmatrix(), P_rot(), P_transform(), X, and Y.

Referenced by gsd_cplane_setrot().