Before VectorVision was integrated, Papervision3D already had a Lines3D
class for drawing 3D lines. Two differences between drawing lines with VectorShape3D
and Lines3D
are:
Whereas
VectorShape3D
enables you to easily draw rectangles, circles, and ellipses,Lines3D
does not have built-in methods to do such things.Lines3D
creates lines with aVertex3D
as the start and end point, resulting in 3D projection of the vertices that make the line. On the other hand,VectorShape3D
lets you draw a 2D shape, which you then can rotate in order to achieve a 3D perspective.
Let's take a look at how to create straight as well as curved lines with Lines3D
, and how to add interactivity. The following class will serve as a template for the Lines3D
examples to come:
package { import flash.events.Event; import org.papervision3d.core.geom.Lines3D; import org.papervision3d.core.geom.renderables.Line3D; import org.papervision3d.core.geom.renderables.Vertex3D; import org.papervision3d...