Loading...
Searching...
No Matches
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.
void | gsd_update_cplanes (void)
| Update cplaces.
void | gsd_cplane_on (int num)
| ADD.
void | gsd_cplane_off (int num)
| Turn off clip plane.
void | gsd_get_cplanes_state (int *onstate)
| Get cplane state.
int | gsd_get_cplanes (Point4 *planes)
| Get cplaces.
void | gsd_update_cpnorm (int num)
| ADD.
void | gsd_cplane_setrot (int num, float rx, float ry, float rz)
| ADD.
void | gsd_cplane_settrans (int num, float tx, float ty, float tz)
| ADD.
void | gsd_draw_cplane_fence (geosurf *surf1, geosurf *surf2, int cpnum)
| ADD.
void | gsd_draw_cplane (int num)
| Draw cplane.

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

  num | cplane 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.

References gsd_def_cplane(), and gsd_set_clipplane().

Referenced by GS_draw_lighting_model(), and 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.

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

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.

References gsd_def_cplane(), X, and Y.

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.

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

## gsd_draw_cplane()

void gsd_draw_cplane | ( | int | num | ) |

Draw cplane.

Parameters

  num |

Definition at line 296 of file gsd_cplane.c.

References GS_default_draw_color(), GS_get_longdim(), GS_global_exag(), gsd_bgnpolygon(), gsd_blend(), gsd_color_func(), gsd_do_scale(), gsd_endpolygon(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_set_clipplane(), gsd_translate(), gsd_vert_func(), gsd_zwritemask(), X, and Y.

Referenced by GS_draw_cplane().

## gsd_draw_cplane_fence()

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

ADD.

Parameters

  surf1 | first surface (geosurf)
  surf2 | second 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().

## gsd_get_cplanes()

int gsd_get_cplanes | ( | Point4 * | planes | ) |

Get cplaces.

Planes MUST be big enough to hold MAX_CPLANES Point4s

Parameters

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

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

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

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_popmatrix(), P_pushmatrix(), P_rot(), P_transform(), X, and Y.

Referenced by gsd_cplane_setrot().