Primitive3D VPlane
new Plane3D()public function Plane3D(h:Number, lg:Number, q:Number, mode:String)This is the constructor to call when you nedd to create an Vertical Plane primitive.
This method will create a complete object with vertex, normales, texture coords and the faces. So it allows to have a custom 3D object easily
h represents the height of the Plane, lg represent its length and q the quality, so the number of parts the surface will be sliced on. The plane will be located at z coordinate set to 0
h | Number |
lg | Number |
q | Number Between 1 and 10 |
mode | String represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points. |
public function generate(Void):Voidgenerate all is needed to construct the object. Vertex, UVCoords, Faces
Generate the points, normales and faces of this primitive depending of tha parameters given
It can construct dynamically the object, taking care of your preferences givent in parameters. Note that for now all the faces have only three points. This point will certainly change in the future, and give to you the possibility to choose 3 or 4 points per faces
public function getSize(Void):VectorgetSize() returns the length and height as a Vector (useful for storing an object's attributes). Returns vector where x is the length, y is the height, and z is always 0.
public function toString(Void):StringDescription copied from Object3D
Represents the Object3D into a String.
toString() in sandy.primitive.Primitive3D