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

GPSPH - Polysphere

GPSPH (nsphere, pflags, pdata, width, spherelist)

Purpose

Use GPSPH to insert a Polysphere structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Polysphere structure element depending on the current edit mode.

When encountered during structure traversal, this element generates a sphere or a sequence of spheres each defined by a center point and a radius in Modelling Coordinates (MC) Each sphere is subject to all transformations and clipping.

All polygon interior and surface attributes are applied to this primitive.

Since the sphere has no defined boundary or edge, edge attributes do not apply to this primitive (i.e. 1=HOLLOW and 5=EMPTY have no visual effect) Highlight color and pick echo for 1=HOLLOW and 5=EMPTY which normally are applied to edges, are applied in a workstation dependent manner (i.e., highlight color and pick echo may be applied to tessellation lines)

GPSPH is identified as GDP 1046.

Note:

Not all GDPs are supported on all workstations. Use the Inquire List of Generalized Drawing Primitives (GPQGD) subroutine to determine the GDPs supported by an opened workstation. See the workstation description in The graPHIGS Programming Interface: Technical Reference

Parameters

nsphere -- specified by user, fullword integer

Number of spheres to be generated (>=0)

pflags -- specified by user, fullword integer

Indicates what optional data is specified for this primitive. (There is no optional data currently defined. This field must be set to zero)

pdata -- specified by user, array of primitive data

Contains specific information about the primitive. The presence of optional fields is determined by the value of the pflags parameter. (Since there is no optional data currently defined, this field must be set to zero)

width -- specified by user, fullword integer

Number of fullwords between subsequent x values (>=4)

spherelist -- specified by user, array of short floating point numbers (MC)

Array of floating point numbers defining the sphere. The number of arrays is equal to the specified number of spheres. Each array contains:

point

3 short floating point numbers (MC)

x, y and z coordinates of the center of a sphere.

radius

a short floating point number (MC)

Radius of the sphere (>=0)

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
101
NUMBER OF SPHERES < ZERO
351
OPTIONAL DATA AVAILABILITY FLAG IS INVALID
557
WIDTH PARAMETER < MINIMUM ALLOWED
582
RADIUS SPECIFIED < ZERO

Related Subroutines

GPBICD
Set Back Interior Color Direct
GPBICI
Set Back Interior Color Index
GPBSCD
Set Back Specular Color Direct
GPBSCI
Set Back Specular Color Index
GPBSPR
Set Back Surface Properties
GPFDMO
Set Face Distinguish Mode
GPICD
Set Interior Color Direct
GPICI
Set Interior Color Index
GPII
Set Interior Index
GPIS
Set Interior Style
GPISI
Set Interior Style Index
GPLMO
Set Lighting Calculation Mode
GPLSS
Set Light Source State
GPPGC
Set Polygon Culling
GPSAC
Set Surface Approximation Criteria
GPSCD
Set Specular Color Direct
GPSCI
Set Specular Color Index
GPSPR
Set Surface Properties
GPTCAC
Set Trimming Curve Approximation Criteria

RCP code

201346817 (X'0C004F01')


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