student-ar-org-papervision3d-core-geom-Lines3D.ax [swf] [flash] flex
<p> The Lines object is a DisplayObject3D that is designed to contain and handle the rendering of Line3D objects. A Line3D is defined by two 3D vertices; one for each end. A line's start and end vertices are converted into 2D space and rendered using the Flash drawing API lineTo method. Line3D can also render curves; add a control vertex using the Line3D.addControlVertex(...) method. The line's control vertex is then converted into 2D space and rendered using the Flash drawing API curveTo method. The line's appearance is defined by its LineMaterial. </p> <p> Example: </p> <pre><code> //This example creates a @ax-student-ar-org-papervision3d-core-geom-Lines3D DisplayObject3D and adds 100 lines into it. var numLines : int = 100; var lines3D : @ax-student-ar-org-papervision3d-core-geom-Lines3D = new @ax-student-ar-org-papervision3d-core-geom-Lines3D(); var lineMaterial : LineMaterial = new LineMaterial(0xff0000, 0.8); var lineWeight : Number = 5; for(var i : int = 0; i<numLines; i++) { var startVertex : Vertex3D = new Vertex3D(Math.random()*200, Math.random()*200, Math.random()*200); var endVertex : Vertex3D = new Vertex3D(Math.random()*200, Math.random()*200, Math.random()*200); var line : Line3D = new Line3D(lines3D, lineMaterial, lineWeight, startVertex, endVertex); lines3D.addLine(line); } scene.addChild(lines3D); </code></pre> </p> <p> See also : LineMaterial </p> @Author Ralph Hauwert @Author Seb Lee-Delisle @Author Alan Owen
parameter: material The default material for this @ax-student-ar-org-papervision3d-core-geom-Lines3D. If ommitted then the default LineMaterial3D is used.
parameter: name An identifier for this Lines object.
Converts 3D vertices into 2D space, to prepare for rendering onto the stage.
parameter: parent The parent DisplayObject3D
parameter: renderSessionData The renderSessionData object for this render cycle.
Adds a Line3D object to this @ax-student-ar-org-papervision3d-core-geom-Lines3D container.
parameter: line The Line3D object to add.
Creates a new line from the parameters passed and adds it.
parameter: size The weight of the line.
parameter: x0 The line's start x position.
parameter: y0 The line's start y position.
parameter: z0 The line's start z position.
parameter: x1 The line's end x position.
parameter: y1 The line's end y position.
parameter: z1 The line's end z position.
returns: The line just created.
This is identical to addNewLine, except it breaks up the line into several shorter line segments that together make up the full line. This would be useful for improved z-depth sorting.
parameter: size The weight of the line.
parameter: segments The number of segments to break up the line into
parameter: x0 The line's start x position.
parameter: y0 The line's start y position.
parameter: z0 The line's start z position.
parameter: x1 The line's end x position.
parameter: y1 The line's end y position.
parameter: z1 The line's end z position.
returns: An array of the lines just created.
Removes a line.
parameter: line The line to remove.
Removes all the lines.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.