pset_hlhsr_id(3g) — Subroutines
Name
pset_hlhsr_id − Specifies the identifier value used to control workstation-independent hidden line and hidden surface removal attributes.
Operating States: PHOP, ∗, STOP, ∗
PHIGS standard function
Creates a structure element
Syntax
void pset_hlhsr_id (
Pint hlhsrid /∗ (I) HLHSR identifier ∗/
)
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
hlhsrid PHLHSR_INDEX_NONE No HLHSR processing. This
is the default value.
PHLHSR_INDEX_PAINTERS Painters sort algorithm.
PHLHSR_INDEX_ZBUFFER Z-buffer algorithm.
PHLHSR_INDEX_SCANLINE Scan line algorithm.
PHLHSR_INDEX_HIDDEN_LINE Hidden line algorithm.
PHLHSR_INDEX_AVERAGE_Z Old Painters sort
algorithm.
---------------------------------------------------------------------------
Description
pset_hlhsr_id specifies the identifier value used to control workstation-independent hidden line and hidden surface removal (HLHSR) attributes. The HLHSR mode must be set to PPHLHSR_INDEX_NONE for the change to take effect.
Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer. The pointer then points to the new set HLHSR identifier element.
The set HLHSR identifier element produces the following effects during structure traversal:
•Digital PHIGS sets the current HLHSR identifier entry in the PHIGS traversal state list to the specified value. Digital PHIGS uses this value when traversing subsequent primitives; it also provides HLHSR information to the workstation.
•If the workstation cannot interpret the specified HLHSR identifier value, it uses another HLHSR identifier.
You may cause an implicit regeneration if you add primitives while Digital PHIGS is performing HLHSR activity. Primitives that are not visible on the display as a result of HLHSR activity are not eligible for pick input.
Digital PHIGS recognizes the following HLHSR modes:
•None---Digital PHIGS will do no HLHSR processing. This is the default value.
•Painters---Digital PHIGS sorts all the primitives by their average Z value and sends them to the device in back-to-front order. This is a fast HLHSR method, and yields reasonable results in many cases. This method is not supported on PEX workstations.
•Z-buffer---Digital PHIGS uses a Z-buffer algorithm. Every pixel has a Z value associated with it. When the hardware "lights" a pixel, it checks the Z buffer value for that pixel. If the value is less than the value for the primitive that is being drawn, the pixel gets the new value (both color and Z buffer). This is supported only on PEX workstations.
•Scan line---Currently not implemented.
•Hidden line---Currently not implemented.
To check which HLHSR modes are supported by your device, call the pinq_hlhsr_mode_facs function.
If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element.
See Also
pinq_hlhsr_id_facs
pinq_hlhsr_mode
pinq_hlhsr_mode_facs
pset_hlhsr_mode