void PEXOCCSetSurfaceApprox(
PEXOCC context,
int method,
double utolerance,
double vtolerance
)
void PEXSetSurfaceApprox(
Display *display,
XID resource_id,
PEXOCRequestType req_type,
int method,
double utolerance,
double vtolerance
)
- context
- An OC context returned by
a successful PEXCreateOCC call.
- display (OCC)
- A pointer to a display structure
returned by a successful XOpenDisplay call.
- resource_id (OCC)
- The resource identifier of the renderer or structure.
- req_type (OCC)
- The request type for the output command
(PEXOCRender, PEXOCStore,
PEXOCRenderSingle or PEXOCStoreSingle).
- method
- The surface approximation method (PEXApproxImpDep,
PEXApproxConstantBetweenKnots,
PEXApproxWCChordalSize,
PEXApproxNPCChordalSize,
PEXApproxDCChordalSize, PEXApproxWCPlanarDev,
PEXApproxNPCPlanarDev, PEXApproxDCPlanarDev,
PEXApproxWCRelative, PEXApproxNPCRelative or
PEXApproxDCRelative).
- utolerance
- The surface approximation tolerance in the u direction.
- vtolerance
- The surface approximation tolerance in the v direction.
None.
Invoke PEXOCCSetSurfaceApprox to create an attribute
output command which sets the surface approximation method
attribute in the renderer's pipeline state according to the
value specified by method.
By setting the surface approximation attribute's ASF to
PEXIndividual
(see PEXOCCSetIndividualASF),
you use the pipeline state's surface approximation entry to
specify the smoothing method to be used when rendering
curved bivariate primitives.
When you set the surface approximation attribute's ASF to
PEXBundled, the implementation uses the surface
approximation from the
interior bundle table.
PEXlib defines the following surface approximation
methods and the use of utolerance and
vtolerance:
- PEXApproxImpDep -
- smooths the surface in an implementation-dependent way and
ignores the utolerance and
vtolerance. (5.0)
- PEXApproxConstantBetweenKnots -
- tessellates the surface with equal parametric increments
between successive pairs of knots. (5.0)
utolerance and vtolerance controls the
tessellation in each of the two parameter dimensions.
If you specify a fraction for utolerance or
vtolerance, then the implementation truncates it and
only uses the integer portion.
If you specify a utolerance or vtolerance that
is less than or equal to zero, then the surface is evaluated
only at the parameter limits and at the knots that are
within the specified parameter range in that tolerance's
direction.
If utolerance or vtolerance is greater than
zero, in the tolerance's direction, then the surface is
evaluated at the parameter limits, at the knots that are
within the specified parameter range, and at the number of
positions specified by tolerance between each pair of
knots.
- PEXApproxWCChordalSize -
- tessellates the surface whereby the WC length of each
segment (chord) in the u direction is less than the
utolerance (specified in world coordinates) and each
segment in the v direction is less than the
vtolerance (specified in world
coordinates). (5.0)
- PEXApproxNPCChordalSize -
- tessellates the surface whereby the NPC length of each
segment (chord) in the u direction is less than the
utolerance (specified in normalized projection
coordinates) and each segment in the v direction is
less than the vtolerance (specified in normalized
projection coordinates). (5.0)
- PEXApproxDCChordalSize -
- tessellates the surface whereby the DC length of each
segment (chord) in the u direction is less than the
utolerance (specified in device coordinates) and each
segment in the v direction is less than the
vtolerance (specified in device
coordinates). (5.0)
- PEXApproxWCChordalDev -
- tessellates the surface whereby the deviation in WC's
between the surface and its tessellated representation in
the u direction does not exceed the utolerance
(specified in world coordinates) and the tessellated
representation in the v direction does not exceed the
vtolerance (specified in world
coordinates). (5.0)
- PEXApproxNPCChordalDev -
- tessellates the surface whereby the deviation in NPC's
between the surface and its tessellated representation in
the u direction does not exceed the utolerance
(specified in normalized projection coordinates) and the
tessellated representation in the v direction does
not exceed the vtolerance (specified in normalized
projection coordinates). (5.0)
- PEXApproxDCChordalDev -
- tessellates the surface whereby the deviation in DC's
between the surface and its tessellated representation in
the u direction does not exceed the utolerance
(specified in device coordinates) and the tessellated
representation in the v direction does not exceed the
vtolerance (specified in device
coordinates). (5.0)
- PEXApproxWCRelative -
- indicates, with a utolerance value in the range
[0.0, 1.0], a relative quality of rendering to be maintained
independent of scaling in world coordinates (WCs).
Specify a utolerance of 1.0 for the highest possible
quality.
The implementation ignores the
vtolerance. (5.0)
- PEXApproxNPCRelative -
- indicates, with a utolerance value in the range
[0.0, 1.0], a relative quality of rendering to be maintained
independent of scaling in normalized projection coordinates
(NPC's).
Specify a utolerance of 1.0 for the highest possible
quality.
The implementation ignores the
vtolerance. (5.0)
- PEXApproxDCRelative -
- indicates, with a utolerance value in the range
[0.0, 1.0], a relative quality of rendering to be maintained
independent of scaling in device coordinates (DC's).
Specify a utolerance of 1.0 for the highest possible
quality.
The implementation ignores the
vtolerance. (5.0)
If the implementation does not support the specified
surface approximation method, then the method
defaults to PEXApproxImpDep.
Inquire the supported values for the surface
approximation method by invoking the
PEXGetEnumTypeInfo
function.
Specify the
utolerance and vtolerance to indicate the
desired accuracy of the approximation.
The surface approximation tolerance has different results
depending on which method you specify.
See Pipeline Contexts
for more information about tolerance
values.
This function is a member of the
curved surface
attribute set.
- BadPEXRenderer
- The specified renderer resource identifier is invalid.
- BadPEXStructure
- The specified structure resource identifier is invalid.
For an overview and for a list of all output attribute functions,
see Output Attribute Functions.