Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pe_cond_incl_struct(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pe_cond_incl_struct(3g)  —  Subroutines

Name

pe_cond_incl_struct − Includes the structure if the specified condition is met. 

Operating States: PHOP, ∗, STOP, ∗
Digital PHIGS extension function
Creates a structure element

Syntax

void pe_cond_incl_struct (
  Pint                struct_id,          /∗ (I) Structure identifier ∗/
  Pint                test_method,        /∗ (I) Test method ∗/
  const Ptest_data   ∗test_method_data    /∗ (I) Test method data ∗/
)

Data Structures

typedef union {
    struct {
        Plimit3          extent;        /∗ extent rectangle ∗/
        Ptest_compare    relation;      /∗ test relation ∗/
        Pfloat           threshold;     /∗ threshold value ∗/
    } extent3;
    struct {
        Plimit           extent;        /∗ extent rectangle ∗/
        Ptest_compare    relation;      /∗ test relation ∗/
        Pfloat           threshold;     /∗ threshold value ∗/
    } extent;
    struct {
        Ppoint_list_list3   point_lists;    /∗ test object ∗/
        Pclip_cond          cond;           /∗ test condition ∗/
    } bounds3;
    struct {
        Ppoint_list_list    point_lists;    /∗ test object ∗/
        Pclip_cond          cond;           /∗ test condition ∗/
    } bounds;
    struct {
        Pint           filter_type;    /∗ type of filter ∗/
        Pint           filter_id;      /∗ filter identifier ∗/
        Pfilter_op     cond;           /∗ test condition ∗/
    } nameset;
    struct {
        Pint              appl_id;      /∗ application attribute
                                           selector ∗/
        Ptest_compare     comparison;   /∗ test comparison ∗/
        Pint              data;         /∗ application attribute data
                                           value ∗/
    } appl_int_attr;
    struct {
        Pint              appl_id;      /∗ application attribute
                                           selector ∗/
        Ptest_compare     comparison;   /∗ test comparison ∗/
        Pfloat            data;         /∗ application attribute data
                                           value ∗/
    } appl_real_attr;
} Ptest_data;
    typedef struct {
        Pfloat   x_min;    /∗ x minimum ∗/
        Pfloat   x_max;    /∗ x maximum ∗/
        Pfloat   y_min;    /∗ y minimum ∗/
        Pfloat   y_max;    /∗ y maximum ∗/
        Pfloat   z_min;    /∗ z minimum ∗/
        Pfloat   z_max;    /∗ z maximum ∗/
    } Plimit3;
    typedef enum {
        PTRL_EQUAL,
        PTRL_NOT_EQUAL,
        PTRL_GREATER,
        PTRL_LESS,
        PTRL_GREATER_EQUAL,
        PTRL_LESS_EQUAL,
        PTRG_BITWISE_AND,
        PTRG_BITWISE OR,
        PTRG_BITWISE_XOR
    } Ptest_compare;
    typedef struct {
        Pfloat   x_min;    /∗ x minimum ∗/
        Pfloat   x_max;    /∗ x maximum ∗/
        Pfloat   y_min;    /∗ y minimum ∗/
        Pfloat   y_max;    /∗ y maximum ∗/
    } Plimit;
    typedef struct {
        Pint           num_point_lists;     /∗ number of point lists ∗/
        Ppoint_list3  ∗point_lists;         /∗ list of point lists ∗/
    } Ppoint_list_list3;
        typedef struct {
            Pint      num_points;   /∗ number of Ppoint3s in the list ∗/
            Ppoint3  ∗points;       /∗ list of points ∗/
        } Ppoint_list3;
            typedef struct {
                Pfloat    x;    /∗ x coordinate ∗/
                Pfloat    y;    /∗ y coordinate ∗/
                Pfloat    z;    /∗ z coordinate ∗/
            } Ppoint3;
    typedef enum {
        PCLIPCOND_IS_NOT_CLIPPED,
        PCLIPCOND_IS_PARTIALLY_CLIPPED,
        PCLIPCOND_IS_FULLY_CLIPPED
    } Pclip_cond;
    typedef struct {
        Pint          num_point_lists;  /∗ number of point lists ∗/
        Ppoint_list  ∗point_lists;      /∗ list of point lists ∗/
    } Ppoint_list_list;
        typedef struct {
            Pint      num_points;   /∗ number of Ppoints in the list ∗/
            Ppoint   ∗points;       /∗ list of points ∗/
        } Ppoint_list;
            typedef struct {
                Pfloat    x;    /∗ x coordinate ∗/
                Pfloat    y;    /∗ y coordinate ∗/
            } Ppoint;
    typedef enum {
        PFILTER_FAILS,    /∗ condition was not met ∗/
        PFILTER_PASSES    /∗ condition was met ∗/
    } Pfilter_op;

Constants

 
Defined Argument     Constant                   Description
---------------------------------------------------------------------------
test_method          PTEST_ALWAYS_FAIL          The test will always fail.
                     PTEST_ALWAYS_SUCCEED       The test will always
                                                succeed.
                     PTEST_EXTENT3              This method contains a
                                                rectangular parallelepiped,
                                                a relation, and a
                                                threshold. Digital PHIGS
                                                compares the maximum of
                                                the differences between
                                                the minimum and maximum x,
                                                y, and z values
                                                against the threshold,
                                                using the specified
                                                relation. If the
                                                relationship is satisfied,
                                                the test is successful.
                     PTEST_EXTENT               This method contains a
                                                rectangle, a relation, and
                                                a threshold.  Digital PHIGS
                                                compares the maximum of
                                                the differences between
                                                the minimum and maximum
                                                x and y values against
                                                the threshold, using the
                                                specified relation.  If the
                                                relationship is satisfied,
                                                the test is successful.
                     PTEST_BOUNDS3              This method contains a
                                                description of a test
                                                object and a clip
                                                condition.  The test
                                                determines if the object
                                                will be clipped by
                                                Digital PHIGS. If the clip
                                                condition is satisfied,
                                                the test is successful.
                     PTEST_BOUNDS               This method contains a
                                                description of a test
                                                object and a clip
                                                condition.  The test
                                                determines if the object
                                                will be clipped by
                                                Digital PHIGS. If the clip
                                                condition is satisfied,
                                                the test is successful.
                     PTEST_NAMESET              This method compares the
                                                specified filter against
                                                the current name set.  If
                                                the result matches the
                                                specified filter
                                                condition, the test is
                                                successful.
                     PTEST_APPL_INTEGER_ATTR    This method compares the
                                                specified application
                                                attribute to the
                                                threshold, using the
                                                specified relation.  If the
                                                relationship is satisfied,
                                                the test is successful.
                                                Tests against undefined
                                                application attributes
                                                always fail.
 
                     PTEST_APPL_REAL_ATTR       This method compares the
                                                specified application
                                                attribute to the
                                                threshold, using the
                                                specified relation.  If the
                                                relationship is satisfied,
                                                the test is successful.
                                                Tests against undefined
                                                application attributes
                                                always fail.
 
Filter types         PFILTER_TYPE_INVIS         Compares the current
                                                invisibility filter set
                                                to the current name set.
                     PFILTER_TYPE_HIGHL         Compares the current
                                                highlighting filter set
                                                to the current name set.
                     PFILTER_TYPE_PICK          Compares the current pick
                                                filter set to the current
                                                name set.
                     PFILTER_TYPE_APPL          Compares the application
                                                filter set (selected by
                                                the filter identifier) to
                                                the current name set.
---------------------------------------------------------------------------

Description

pe_cond_incl_struct includes the specified structure if the specified condition is met.  If the specified structure does not exist, Digital PHIGS creates a new empty structure. 

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 conditional include structure element. 

When Digital PHIGS interprets a conditional include structure element, it performs the following tasks:

•Digital PHIGS executes the test method. 

•If the test fails, Digital PHIGS continues traversing the current structure at the next element. 

•If the test is successful, Digital PHIGS suspends structure traversal and performs the following actions:

•Saves the structure identifier associated with the current structure

•Makes the structure identifier associated with the element the current identifier

•Completely traverses the structure network associated with the element

•Restores the structure identifier of the current structure

•Resumes traversing the current structure

Digital PHIGS considers the elements of the included structure as part of the parent structure. 

If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element. 

Digital PHIGS Version 4.1 does not support this function.

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