Contained Within
Find More Documentation
Featured Support Resources
| PDF로 이 문서 다운로드
NAME
- SET FACE DISTINGUISHING MODE - create structure element to set face distinguishing mode
SYNOPSIS
C Syntax
-
void
-
pset_face_disting_mode ( mode )
-
- Pdisting_mode
- mode;
-
distinguishing mode
FORTRAN Syntax
-
SUBROUTINE psfdm ( MODE )
-
- INTEGER
- MODE
-
distinguishing mode (YES/NO)
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-facing and back-facing portions of area-defining primitives.
- 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 noncoincident 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 (3PP) 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 vertices in triangles is reversed for even numbered triangles, with triangle 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 cross-product of the tangent vector along the u direction and the tangent vector along the v direction.
- Notice that when the geometric normal is computed, the order of points determines the sense of direction -- that is, whether it is front-facing or back-facing.
- This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.
C Input Parameters
- The following data types are predefined in phigs.h.
-
-
mode
- A pointer to a Pdisting_mode structure. A Pdisting_mode structure is defined as:
-
- typedef enum {
- PDISTING_NO,
- PDISTING_YES
- } Pdisting_mode;
FORTRAN Input Parameters
- The following data types are predefined in phigs77.h.
-
MODE The distinguishing mode. Predefined values are:
-
-
0 PNDIST No distinguishing mode
1 PDIST Set distinguishing model
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 (3PP) 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
-
- 005
- Ignoring function, function requires state (PHOP, * ,STOP, * )
SEE ALSO
-
SET FACE CULLING MODE (3PP)
|
|