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

*The graPHIGS Programming Interface : Subroutine Reference*

## GPVMF - Set Vertex Morphing Factors

**Purpose**

Use **GPVMF** to insert a Set Vertex Morphing Factors structure element
into the open structure following the element pointer,
or to replace the element pointed at by the element pointer
with a Set Vertex Morphing Factors structure element,
depending upon the edit
mode.

During traversal, the graPHIGS API combines the value of
*fdata*
with a primitive's vertex morphing
values to modify its rendered vertex coordinates.

In vertex morphing, the graPHIGS API combines the vertex coordinate values
*(x, y, z)*
with the vertex morphing scale factors in the
*fdata* parameter
(s_{1}
, s_{2}
, ..., s_{nscale}
)
and the vertex morphing vectors

(( dx_{1}
, dy_{1}
, dz_{1}
),
( dx_{2}
, dy_{2}
, dz_{2}
), ...,
( dx_{nvector}
, dy_{nvector}
, dz_{nvector}
))

to create the new vertex coordinate values
(x', y', z')
as follows:

x' = s_{1}
x +
s_{2}
dx_{1}
+
s_{3}
dx_{2}
+...+
s_{nscale}
dx_{nvector}

y' = s_{1}
y +
s_{2}
dy_{1}
+
s_{3}
dy_{2}
+...+
s_{nscale}
dy_{nvector}

z' = s_{1}
z +
s_{2}
dz_{1}
+
s_{3}
dz_{2}
+...+
s_{nscale}
dz_{nvector}

These equations show that the number of morphing scale
factors should be one more than the number of morphing vectors in the
affected primitive (*nscale*=*nvector*+1).
However,
if the number of morphing vectors and scale factors
disagree at traversal time,
then 0 value vectors and scale factors are assumed
wherever necessary.
For example, if you supply
too many scale factors for a given primitive
(*nscale*>*nvector*+1),
then the graPHIGS API ignores
the extra scale factors, as if there were additional
0 valued morphing vectors in the primitive definition.
If you supply too few scale factors
(*nscale*<*nvector*+1),
then the graPHIGS API ignores
the extra morphing vectors, just as if there were additional
morphing scale factors with value zero in this function call.

The traversal default for vertex morphing is
*flength*=1 and *fdata*={1.0}

Use
**GPQWDT**
to inquire the morphing facilities of a specified workstation.

**Parameters**

*flength* -- specified by user, fullword integer (>=1)
Number of morphing factors.
*fdata* -- specified by user, array of short floating-numbers
List of morphing factors.
The number of entries in this list is given by the
*flength* parameter.
**Error Codes**

**5**
- FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
**61**
- LENGTH IS INVALID

**Related Subroutines**

**GPBDMF**
- Set Back Data Morphing Factors
**GPDMF**
- Set Data Morphing Factors
**GPQWDT**
- Inquire Workstation Description

**RCP code**

201343519
(X'0C00421F')

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