void PEXOCCArcAreas( PEXOCC context, PEXArcAreaType arc_type, unsigned int count, PEXPointer arcs )
None.
Invoke PEXOCCArcAreas to create an arc-based fill areas primitive output command (PEXOCArcAreaSetWithData). This implementation applies the General Surface, Styled and Shaded Surface, Edge, Curve, and Data Mapping attribute sets and surface clipping to this primitive.
You can only define one type of arc area per function call. PEXlib defines the following arc-based fill areas:
where:
M = <radius, 0, 0>,
m = <0, radius, 0>
If
|then-
| > 2
,
=
+ 2
.
If
then<
,
=
+ 2
.
You close the arc area by joining each endpoint by a chordal segment (PEXArcAreaCircularClosedChordArc) or by connecting each endpoint with a segment to the center vertex (PEXArcAreaCircularClosedPieArc). If your application defines a three-dimensional circular closed arc, then the implementation ignores the z value. If the radius of the circular closed arc is less than or equal to zero, then the arc degrades to a dot at the center vertex.
If
|then-
| > 2
,
=
+ 2
.
If
then<
,
=
+ 2
.
You close the arc area by joining each endpoint by a segment (PEXArcAreaEllipticalClosedChordArc) or by connecting each endpoint with a segment to the center vertex (PEXArcAreaEllipticalClosedPieArc). If the length of both of the axes is equal to zero, then the arc degrades to a dot at the center vertex. If the length of just one of the axes is equal to zero or if the axes have non-zero lengths and are parallel, then the elliptical closed arc degrades in an implementation-dependent way.
This primitive only supports the optional vertex attributes: PEXGAColor, PEXGAFloatData and PEXGA2D.
Although there is no non-OCC form of this function, you may use one of the PEXDataPacked, PEXDataStride, or the PEXDataPacked data models to supply the arc area data via the arcs parameter in modeling coordinates.
Each arc area type has its own set of required vertex data, where each vertex is used to describe a complete arc area.
--------------------------------------------------------- Arc Area Type Required Vertex Data --------------------------------------------------------- PEXArcAreaCircle coord, radius PEXArcAreaCircularClosedChordArc coord, radius, angles PEXArcAreaCircularClosedPieArc coord, radius, angles PEXArcAreaEllipse coord, axes PEXArcAreaEllipticalClosedChordArc coord, axes, angles PEXArcAreaEllipticalClosedPieArc coord, axes, angles ---------------------------------------------------------
PEXlib ignores the PEXGARadius flag since the presence of a radius is implicit with the arc area type.
PEXlib does not supply a set of type definitions for arc area set vertex data due to the large number of combinations of vertex data possible when considering both the required and optional vertex data. Therefore, you may find it convenient to design your own data structure to pass in the arcs parameter when using the PEXDataPacked data model. You need to design the data structure with the following ordering rules in mind:
For the three circular arc area types, the required order is:
PEXCoord (or PEXCoord2D) center PEXColor* one of the PEXlib color types, if provided float radius float start angle, if an arc float end angle, if an arc float[n] floating point data, if provided
For the three elliptical arc area types, the required order is:
PEXCoord (or PEXCoord2D) center PEXColor* one of the PEXlib color types, if provided PEXCoord (or PEXCoord2D) major axis PEXCoord (or PEXCoord2D) minor axis float start angle, if an arc float end angle, if an arc float[n] floating point data, if provided
As an example, if you wish to supply data for Closed Circular Arcs using 3D coordinates, RGB floating-point colors and three floating-point numbers (for texture data), you would create a structure like this:
typedef struct { PEXCoord center; PEXColorRGB rgb; float radius; float start_angle; float stop_angle; float texture_data[3]; } MY_PEXRGBCircularClosedArc;
Remember to set the correct surface vertex attributes in the OCC. In this case you would make sure that the PEXGA2D flag is off, the PEXGAColor is on and the PEXGAFloatData flag is on. You set the color_type field in the OCC to PEXColorTypeRGB and the number of floats in the OCC to three.
If you are using the PEXDataStride data model, then you set the stride and offset members in the OC Context to reflect the way the data is stored in your structured array. Pass a pointer to the start of the structured array in the arcs parameter of the function call. Be sure that there is a valid offset for each vertex attribute that is present.
If you are using the PEXDataUnpacked data model, then you would set size members in the OCC to the appropriate values and point to each of the data lists with the PEXUnpackedVertexData data structure. Again, be careful to set a size and pointer for every attribute you indicate as present in the vertex attributes.
For primitives similar to this one, see:
There are no PEXlib 5.1 compatibility primitives similar to this one.
For attributes that affect this primitive, see
For an overview, see Output Command Functions.