[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPTEX3 - Test Extent 3

GPTEX3 (point1, point2, index)

Purpose

Use GPTEX3 to insert a Test Extent 3 structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Test Extent 3 structure element depending on the current edit mode.

This structure element modifies the cull flag and prune flag within the current condition flags. These flags are used when processing subsequent conditional execute structure and conditional return elements.

During structure traversal, this element sets the prune flag (31st bit) and cull flag (30th bit) of the current condition flags in the graPHIGS traversal state list as follows:

  1. Transform the specified extent box by the current modelling and viewing transformation but applying only z clip of the viewing transformation. The window clipping of the viewing and workstation transformation is not applied.

  2. Determine the smallest box whose edges are parallel to the NPC axes and which surrounds the remaining extent box after z clipping.

  3. If the box is completely outside the viewport of the view or completely outside of the workstation window, set the 31st bit (prune flag) to a value of one; otherwise set it to zero.

  4. Transform the box by the workstation transformation and map it onto two-dimensional-DC using a parallel projection.

  5. If the diagonal of the mapped rectangle is shorter than the cull size threshold specified by the cull size index, set the 30th bit (cull flag) to a value of one; otherwise set it to zero.
  6. The condition flag is a 32-bit bit string. Each bit is defined as follows:

        0                        15  16                       29  30     31
        --------------------------------------------------------------------------
        |                           |                            | cull |  prune |
        | reserved for application  |          reserved          | flag |  flag  |
        --------------------------------------------------------------------------
      High bit                                                               Low bit
    If the workstation does not support the specified cull size index or the specified index is outside the allowable range, then the cull size index defaults to a value of 1.

    GPTEX3 is identified as GSE 1006.

    Note:

    Not all GSEs are supported on all workstations. Use the Inquire List of Generalized Structure Elements (GPQGSE) inquiry subroutine to determine the GSEs supported by an open workstation. See also the workstation descriptors in The graPHIGS Programming Interface: Technical Reference

    Parameters

    point1 -- specified by user, 3 short floating-point numbers (MC)

    x, y, and z coordinates of one end point of the extent box's diagonal.

    point2 -- specified by user, 3 short floating-point numbers (MC)

    x, y, and z coordinates of the other end point of the extent box's diagonal.

    index -- specified by user, fullword integer

    Cull size index specifying an entry of the cull size table (>=1)

    Error Codes

    5
    FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
    278
    CULL SIZE INDEX < ONE

    Related Subroutines

    GPCEXS
    Conditional Execute Structure
    GPCOND
    Set Condition
    GPCRET
    Conditional Return
    GPCSR
    Set Cull Size Representation
    GPQCSR
    Inquire Cull Size Representation
    GPTEX2
    Test Extent 2

    RCP code

    201331718 (X'0C001406')


    [ Previous | Next | Contents | Glossary | Home | Search ]