Primitive3D Pyramid
new Pyramid()public function Pyramid(h:Number, lg:Number, rad:Number)This is the constructor to call when you nedd to create a Pyramid 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 Pyramid, lg represent its length(or depth) and rad its radius(or wide)
h | Number |
lg | Number |
rad | Number |
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, height, and radius as a Vector (useful for storing an object's attributes). Returns vector where x is the length, y is the height, and z is the radius
public function getPrimitiveName(Void):StringgetPrimitiveName() returns the string "Pyramid"
public function toString(Void):StringDescription copied from Object3D
Represents the Object3D into a String.
toString() in sandy.primitive.Primitive3D