Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET FACE DISTINGUISHING MODE(3P+)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

SET FACE DISTINGUISHING MODE − create a structure element to set the face distinguishing mode

SYNOPSIS

C Syntax

void
pset_face_disting_mode ( mode )
Pdisting_modemode; distinguishing mode

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

SET FACE DISTINGUISHING MODE creates a structure element to set the face distinguishing mode.  The attribute face distinguishing mode defines control over the attributes applied when rendering front and back facing portions of area defining primitives. 

An application indirectly specifies which of the two faces of an area-defining primitive is the front face, by the ordering of the vertex data. 

A facet of an area defining primitive is defined to be back facing if its geometric normal has a negative z component when transformed to NPC; otherwise, the facet is front facing. 

If facet normals are supplied, they are used as geometric normals; otherwise, a geometric normal is computed for each facet using a method that depends on the primitive type:

Fill Area or Fill Area Set
A geometric normal is computed by first determining three points: A, B, and C. Point A is the first of the vertices. Point B is the next point in the list that is non-coincident with A. Point C is the next point in the list (after B) that is non-colinear with A and B. The geometric normal is the cross product of the vector extending from A to B with the vector extending from A to C. The utility function COMPUTE FILL AREA SET GEOMETRIC NORMAL (3P+) can be used to determine the geometric normal for a fill area set primitive according to the above procedure. 

Triangle Strip Primitive
Determination of the geometric normal for each triangle is computed as for a fill area, using the vertices of the triangle. Order of facets in triangles is reversed for even numbered facets, with facets numbering starting at 1.

Quadrilateral Mesh Primitive
Determination of the geometric normal for each quadrilateral is calculated by taking the cross product of its diagonals.

Non-uniform B-Spline Surface
The geometric normal is computed as the normalized cross product of the tangent vector along the u direction and the tangent vector along the v direction. 

C Input Parameters

modeA pointer to a Pdisting_mode structure. A  Pdisting_mode structure is defined as:

typedef enum {
PDISTING_NO,
PDISTING_YES
} Pdisting_mode;

Execution

Depending on the edit mode, a SET FACE DISTINGUISHING MODE element is inserted into the open structure after the element pointer, or replaces the element pointed at by the element pointer. The element pointer is then updated to point to the new SET FACE DISTINGUISHING MODE (3P+) element. 

When the face distinguishing mode is No, the back face attributes are not used, and the front face attributes are used for both front facing and back facing portions of the primitives. When the face distinguishing mode is Yes, the back face attributes are used for back facing portions. 

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

SET FACE CULLING MODE (3P+)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026