Pretty Poly Editor Documentation
I. PPE Manual - 6. Working with the editor - d. Overview of primitives
Primitives are - apart from vertices - the lowest level building blocks in PPE. One can distinguish between three kinds:
- Primitives that don't describe a surface. These are:
- Point
- Line
- LineStrip
- LineLoop
Many renderers only display surfaces, but vertices and lines are displayed
in PPE and may be used as "reference objects". For example, when you do a car,
you could have an additional vertex at the hinge of the door. In the future, you will be able to
snap zo the vertex and rotate the door around the vertex to open it. This means,
"single" vertices or lines can be
used to remember positions and directions. Primitives used like that may also
be called construction objects, since they aid later on in the construction of
things like the open door, but are not intended for the target system. However,
there are also target renderers that do render vertices and lines. For example
a flight simulator might use a vertex to do the positional lights of the aircraft
and use lines to do power cables or antennas or the outlkine of the rotating propeller.
A Linestrip is a series of linked lines, that is of lines that share vertices.
A lineloop is a closed linestrip.
- Primitives consisting of one or several polygons. Polygon in this manual always means planar polygon. These primitives are very important, since they can be used to approximate objects and they can be rendered by 3D accelerators.
- Triangle: One triangle (3 sided-polygon)
- Polygon: Polygon with arbitrary number of sides/vertices.
- Rectangle: 4 sided-polygon with 90-degrees angles.
- Quad: 4 sided-polygon
- TriStrip: Strip of one or several triangles, "one after the other".
- TriFan: Fan of triangles. All share one vertex. The lie "one besides the other".
- QuadStrip: Strip of one or several quads, "one after the other".
The primitives B1 till B4 consist of one polygon, the other of one or several.
The reason for this later category (B5-B7) is that the polygons will share vertices.
The first triangle of a tristrip or TriFan has three vertices and each additional triangle
will share two vertices with the triangle before and only add one new vertex. If,
for example you have four triangles (B1), the you have 4*3=12 vertices. If you have
a tristrip (B5) or a TriFan (B6) consisting of four triangles, then then you have 3+(4-1)*1 = 6
vertices. This makes tristrips faster to render than single triangles on opengl. Sharing
vertices also means that if you move the vertex, several polygons are affected and
that you wont have several vertices at the same point in space, which can be
both confusing, awkward and lead to rendering artifacts due to limited numerical precision.
- Planned: Curved primitives like "real" spheres and cylinders, NURBS, Metaballs etc.