22 static void init_cplane(
void);
28 static void init_cplane(
void)
38 Cp_norm[i][
Y] = Cp_norm[i][
Z] = 0.0;
40 Cp_rot[i][
X] = Cp_trans[i][
X] = 0.0;
41 Cp_rot[i][
Y] = Cp_trans[i][
Y] = 0.0;
42 Cp_rot[i][
Z] = Cp_trans[i][
Z] = 0.0;
57 float sx, sy, sz, ppt[3];
66 ppt[0] = (pt[0] + Cp_pt[0]) * sx;
67 ppt[1] = (pt[1] + Cp_pt[1]) * sy;
68 ppt[2] = (pt[2] + Cp_pt[2] - zmin) * sz;
70 params[0] = norm[0] * sx;
71 params[1] = norm[1] * sy;
72 params[2] = norm[2] * sz;
74 params[3] = -ppt[0] * params[0] - ppt[1] * params[1] - ppt[2] * params[2];
106 static int first = 1;
147 onstate[i] = Cp_ison[i];
169 thru[
X] = Cp_pt[
X] + Cp_trans[ons][
X];
170 thru[
Y] = Cp_pt[
Y] + Cp_trans[ons][
Y];
171 thru[
Z] = Cp_pt[
Z] + Cp_trans[ons][
Z];
172 planes[ons][
X] = -Cp_norm[ons][
X];
173 planes[ons][
Y] = -Cp_norm[ons][
Y];
174 planes[ons][
Z] = -Cp_norm[ons][
Z];
175 planes[ons][
W] = -(
DOT3(planes[ons], thru));
192 v[0][
X] = v[0][
W] = 1.0;
193 v[0][
Y] = v[0][
Z] = 0.0;
196 P_rot(Cp_rot[num][
Z],
'z');
197 P_rot(Cp_rot[num][
Y],
'y');
198 P_rot(Cp_rot[num][
X],
'x');
231 Cp_trans[num][
X] = tx;
232 Cp_trans[num][
Y] = ty;
233 Cp_trans[num][
Z] = tz;
250 float len, dir[3], bgn[2], end[2], px, py, fencenorm[3];
253 if ((was_on = Cp_ison[cpnum])) {
259 dir[
X] = -Cp_norm[cpnum][
Y];
260 dir[
Y] = Cp_norm[cpnum][
X];
263 px = Cp_trans[cpnum][
X] + Cp_pt[
X];
264 py = Cp_trans[cpnum][
Y] + Cp_pt[
Y];
273 bgn[
X] = px + len * dir[
X];
274 bgn[
Y] = py + len * dir[
Y];
275 end[
X] = px - len * dir[
X];
276 end[
Y] = py - len * dir[
Y];
278 fencenorm[
X] = -Cp_norm[cpnum][
X];
279 fencenorm[
Y] = -Cp_norm[cpnum][
Y];
280 fencenorm[
Z] = -Cp_norm[cpnum][
Z];
323 Cp_pt[
Y] + Cp_trans[num][
Y], Cp_pt[
Z] + Cp_trans[num][
Z]);
void P_transform(int, float(*)[4], float(*)[4])
Transform array of vectors using current T matrix.
void gsd_blend(int)
Specify pixel arithmetic.
void gsd_cplane_settrans(int num, float tx, float ty, float tz)
ADD.
int gs_get_datacenter(float *)
Get data center point.
int gs_get_data_avg_zmax(float *)
Get average z-max value.
void gsd_bgnpolygon(void)
Delimit the vertices of a primitive or a group of like primitives.
void gsd_cplane_off(int num)
Turn off clip plane.
void gsd_popmatrix(void)
Pop the current matrix stack.
void gsd_endpolygon(void)
Delimit the vertices of a primitive or a group of like primitives.
void gsd_get_cplanes_state(int *onstate)
Get cplane state.
void gsd_update_cpnorm(int num)
ADD.
int gsd_wall(float *, float *, float *)
ADD.
int GS_v3norm(float *)
Change v1 so that it is a unit vector (2D)
void gsd_update_cplanes(void)
Update cplaces.
void P_rot(float, char)
Rotate matrix.
void gsd_rot(float, char)
ADD.
void gsd_def_clipplane(int, double *)
Define clip plane.
int P_popmatrix(void)
Pop top of matrix stack, placing it into the current transformation matrix.
void gsd_color_func(unsigned int)
Set current color.
void gsd_translate(float, float, float)
Multiply the current matrix by a translation matrix.
void gsd_draw_cplane_fence(geosurf *surf1, geosurf *surf2, int cpnum)
ADD.
float GS_global_exag(void)
Get global z-exag value.
int P_pushmatrix(void)
Push current transformation matrix onto matrix stack.
void gsd_cplane_setrot(int num, float rx, float ry, float rz)
ADD.
void gsd_zwritemask(unsigned long)
Write out z-mask.
int gsd_get_cplanes(Point4 *planes)
Get cplaces.
int GS_dv3norm(double *)
Changes v1 so that it is a unit vector.
void gsd_pushmatrix(void)
Push the current matrix stack.
int GS_get_longdim(float *)
Get largest dimension.
void GS_get_scale(float *, float *, float *, int)
Get axis scale.
int GS_get_zrange(float *, float *, int)
Get z-extent for all loaded surfaces.
void gsd_cplane_on(int num)
ADD.
unsigned int GS_default_draw_color(void)
Get default draw color.
float GS_P2distance(float *, float *)
Calculate distance in plane.
void gsd_do_scale(int)
Set current scale.
void gsd_scale(float, float, float)
Multiply the current matrix by a general scaling matrix.
void gsd_set_clipplane(int, int)
Set clip plane.
void gsd_def_cplane(int num, float *pt, float *norm)
Define cplace.
void gsd_draw_cplane(int num)
Draw cplane.
void gsd_vert_func(float *)
ADD.