SET MODELLING CLIPPING VOLUME 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET MODELLING CLIPPING VOLUME 3 − create structure element to set the current 3D modelling clipping volume
SYNOPSIS
C Syntax
void
pset_model_clip_vol3 ( op, half_spaces )
Pintop;operator
Phalf_space_list3∗half_spaces; list of half-spaces
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET MODELLING CLIPPING VOLUME 3 creates a structure element containing the operator and half-spaces specified, and places the element in the current structure. During traversal, this element is used to modify the value of the current modelling clipping volume attribute, which may affect all output primitives.
A SET MODELLING CLIPPING VOLUME 3 element contains half-spaces in the model space. Each specified half-space is transformed by the current composite modelling transformation. These half-spaces are intersected to form a clipping volume. If no half-spaces are provided, the clipping volume is defined to be all of modelling coordinate space. Clipping volume is combined as specified by OPERATOR with current modelling clipping volume to form a new value of current modelling clipping volume. This volume is used to clip subsequent output primitives during structure traversal.
C Input Parameters
opThe operator that describes the application of the half-spaces in this element to the current modelling clipping volume. Operator values defined in phigs.h are:
PMC_REPLACEReplace
PMC_INTERSECTIntersect
half_spaces
The list of half-spaces to store in the element. Phalf_space_list3 is defined in phigs.h as:
typedef struct {
Pintnum_half_spaces; /∗ number of half-spaces ∗/
Phalf_space3∗half_spaces;/∗ list of half-spaces ∗/
} Phalf_space_list3;
The number is the number of half-spaces in the array of Phalf_space3 elements pointed to by half-spaces, as specified by a point, and the normal to the plane containing the point, in the direction of the half-space. Phalf_space3 is defined in phigs.h as:
typedef struct {
Ppoint3point; /∗ point ∗/
Pvec3norm;/∗ normal ∗/
} Phalf_space3;
Ppoint3 and Pvec3 are similar structures (but have different semantics), defined by phigs.h:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;
typedef struct {
Pfloatdelta_x;/∗ x magnitude ∗/
Pfloatdelta_y;/∗ y magnitude ∗/
Pfloatdelta_z;/∗ z magnitude ∗/
} Pvec3;
Execution
If the current edit mode is INSERT, a SET MODELLING CLIPPING VOLUME 3 element is inserted into the currently open structure after the element pointed to by the current element pointer. If the edit mode is REPLACE, the new element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new element.
During traversal, this element is used to modify the value of the current modelling clipping volume attribute, which affects all output primitives. This volume is used to clip subsequent output primitives during structure traversal.
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
INQUIRE MODELLING CLIPPING FACILITIES (3P)
SET MODELLING CLIPPING INDICATOR (3P)
RESTORE MODELLING CLIPPING VOLUME (3P)
SET MODELLING CLIPPING VOLUME (3P)
September 02, 1992