Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cond_execut(3G) — HP-UX 9.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adapt_clip_to_extent(3G)

execute_segment(3G)

cond_call_segment(3G)

cond_return(3G)

inq_cond_index(3G)

set_extent(3G)

cond_execute_segment(3G)

NAME

cond_execute_segment − insert a conditional segment execution element into the currently open segment

SYNOPSIS

C Syntax:

void cond_execute_segment(fildes, cond_index_select, comp_flag, segno)
int fildes, cond_index_select, comp_flag, segno;

FORTRAN77 Syntax:

subroutine cond_execute_segment(fildes, cond_index_select, comp_flag, segno)
integer*4 fildes, cond_index_select, comp_flag, segno

Pascal Syntax:

procedure cond_execute_segment(fildes, cond_index_select, comp_flag, segno:integer);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

cond_index_select
Condition to test.  One of

CI_FALSE (0): constant value test always equal to FALSE. 
CI_PRUNE (1): prune condition, set by set_extent.
CI_CULL (2): cull condition, set by set_extent.

comp_flag Comparison flag against which the value of the condition index selected by cond_index_select is tested.  Either TRUE (1) or FALSE (0). 

segno Segment to be executed if the value of the condition index selected by cond_index_select equals comp_flag. 

Discussion

Cond_execute_segment inserts a cond_execute_segment element into the currently open segment of the specified graphics device.  If segno does not exist, an empty segment with that name is created. 

When a cond_execute_segment element is encountered during display list traversal, the value of the condition index selected by cond_index_select is compared against the value of comp_flag.  If they differ, traversal continues to the next element in the current segment.  If they are equal, the following actions occur: first, the current Starbase state is saved (see push_state(3G)); second, the segment segno is traversed; third, the saved Starbase state is restored (see pop_state(3G)). Traversal then continues with the next element. Cond_execute_segment differs from cond_call_segment(3G) only in the implicit state save and restore at traversal time.

If adapt_clip_to_extent has been called with mode set to TRUE (1), cond_execute_segment may disable some or all clipping planes while traversing segment segno, thereby improving performance.  The conditions under which this disabling can occur are i) cond_index_select is CI_PRUNE (1), ii) comp_flag is FALSE (0) and iii) set_extent has set the prune condition FALSE.  Under these conditions, clipping may be disabled for the planes that set_extent determined were not crossed by the bounding box of the extent specified in that call.  If that extent surrounds all primitives in segment segno, including any segments it calls, the clip-plane disabling will have no visual effect on the drawing of the segment, nor will it affect which primitives are picked in the segment.  However, any disabling performed will improve drawing or picking speed within segment segno. 

EXAMPLES

For typical uses of cond_execute_segment, see the examples for cond_call_segment(3G).

ERRORS

1 Graphics device is not initialized for this operation. 

20 Parameter value is out of range. 

24 Segment not open. 

SEE ALSO

adapt_clip_to_extent(3G), execute_segment(3G), cond_call_segment(3G),
cond_return(3G), inq_cond_index(3G), set_extent(3G).

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026