SET SURFACE APPROXIMATION CRITERIA(3P+) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET SURFACE APPROXIMATION CRITERIA − create a structure element to set the surface approximation criteria
SYNOPSIS
C Syntax
void
pset_surf_approx ( type, uvalue, vvalue )
Pinttype;approximation type
Pfloatuvalue;approximation value for u dimension
Pfloatvvalue;approximation value for v dimension
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
SET SURFACE APPROXIMATION CRITERIA places into the currently open structure a structure element that specifies the surface approximation type and values. The surface approximation type controls the display precision of non-uniform B-spline surfaces by specifying the method to use to render the surface. The approximation values are used in a type-specific way, as described in the Execution section below.
When the current surface approximation criteria Aspect Source Flag (ASF) is set to INDIVIDUAL, the current value of this attribute defines the surface approximation criteria to be applied to the following output primitive:
• NON-UNIFORM B-SPLINE SURFACE
C Input Parameters
typeThe surface approximation type. Possible values defined in phigs.h are:
1PSURF_WS_DEP
2PSURF_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PSURF_CHORDAL_SIZE_WC
4PSURF_CHORDAL_SIZE_NPC
5PSURF_CHORDAL_SIZE_DC
6PSURF_PLANAR_DEVIATION_WC
7PSURF_PLANAR_DEVIATION_NPC
8PSURF_PLANAR_DEVIATION_DC
uvalue, vvalue
The values to use when applying the specified approximation method. Valid values depend on the approximation method. The value for the u dimension is uvalue. The value for the v dimension is vvalue. See the Execution section below for a description of the use of these values by each approximation method.
Execution
Depending upon the edit mode, a SET SURFACE APPROXIMATION CRITERIA element is either 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 this SET SURFACE APPROXIMATION CRITERIA element.
The approximation methods corresponding to the defined approximation types and the use of the approximation values by each method are:
Workstation Dependent, Type 1
Use an implementation dependent approximation method. This method is defined by the server.
Constant Parametric Subdivision Between Knots, Type 2
Tessellate using equal parametric increments between the uknots and the vknots. The integer portion of the u and v approximation values are used and interpreted as follows:
≤ 0: Evaluate the surface only at the parameter limits and at the knots that fall within the parameter limits.
> 0: Evaluate the surface at the parameter limits, at the knots that fall within the parameter limits, and at the uvalue or vvalue number of positions between the knots, but only if the position is within the parameter limits.
Chordal Size in WC, Type 3
Tessellate until the maximum length chord measured in World Coordinates (WC) for both the u and v dimensions is less than the corresponding positive real-number approximation value, uvalue and vvalue, respectively.
Chordal Size in NPC, Type 4
Tessellate until the maximum length chord measured in Normalized Projection Coordinates (NPC) for both the u and v dimensions is less than the corresponding positive real-number approximation value, uvalue and vvalue, respectively.
Chordal Size in DC, Type 5
Tessellate until the maximum length chord measured in Device Coordinates (DC) for both the u and v dimensions is less than the corresponding positive real-number approximation value, uvalue and vvalue, respectively.
Planar Deviation in WC, Type 6
Tessellate until the absolute value of the deviation measured in WC between the surface and the generated planar sub-primitives is less than the specified positive real-number approximation value.
Planar Deviation in NPC, Type 7
Tessellate until the absolute value of the deviation measured in NPC between the surface and the generated planar sub-primitives is less than the specified positive real-number approximation value.
Planar Deviation in DC, Type 8
Tessellate until the absolute value of the deviation measured in DC between the surface and the generated planar sub-primitives is less than the specified positive real-number approximation value.
At traversal time, the default approximation type is used if the specified approximation type is not supported by the workstation. If the approximation values are inconsistent with the specified approximation type, values of 1.0 is used. The approximation types supported by a workstation type can be determined with the function INQUIRE CURVE AND SURFACE FACILITIES, or by consulting the relevant entries in PHIGS WORKSTATION DESCRIPTION TABLE (7P).
When the current surface approximation criteria ASF is set to INDIVIDUAL, area-defining output primitives that follow in the structure network are filled using the current curve approximation criteria style.
When the current surface approximation criteria ASF is set to BUNDLED, the surface approximation criteria is taken from the workstation extended representation indicated by the current interior index. In this case, the surface approximation criteria set with SET SURFACE APPROXIMATION CRITERIA has no effect.
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
138Ignoring function, one or more of the fields in the specified data record are inconsistent with the specified type
SEE ALSO
NON-UNIFORM B-SPLINE SURFACE (3P+)
INQUIRE CURVE AND SURFACE FACILITIES (3P+)
September 02, 1992