GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
gsd_cplane.c File Reference

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

#include <grass/ogsf.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

◆ gsd_cplane_off()

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

Referenced by GS_draw_lighting_model(), and GS_unset_cplane().

◆ gsd_cplane_on()

void gsd_cplane_on ( int  num)

ADD.

Parameters
num

Definition at line 104 of file gsd_cplane.c.

Referenced by GS_set_cplane().

◆ gsd_cplane_setrot()

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.

Referenced by GS_set_cplane_rot().

◆ gsd_cplane_settrans()

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.

Referenced by GS_set_cplane_trans().

◆ gsd_def_cplane()

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.

◆ gsd_draw_cplane()

void gsd_draw_cplane ( int  num)

Draw cplane.

Parameters
num

Definition at line 296 of file gsd_cplane.c.

References MAX_CPLANES.

Referenced by GS_draw_cplane().

◆ gsd_draw_cplane_fence()

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.

Referenced by GS_draw_cplane(), and GS_draw_cplane_fence().

◆ gsd_get_cplanes()

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 MAX_CPLANES.

Referenced by gs_setlos_enterdata().

◆ gsd_get_cplanes_state()

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.

References MAX_CPLANES.

Referenced by GS_alldraw_cplane_fences(), and GS_draw_lighting_model().

◆ gsd_update_cplanes()

void gsd_update_cplanes ( void  )

Update cplaces.

Called when viewing matrix changes

Definition at line 86 of file gsd_cplane.c.

References MAX_CPLANES.

Referenced by gsd_set_view().

◆ gsd_update_cpnorm()

void gsd_update_cpnorm ( int  num)

ADD.

Parameters
num

Definition at line 188 of file gsd_cplane.c.

References P_pushmatrix(), P_rot(), W, X, Y, and Z.