Primitive3D Generate an Ellipsoid using 3D coordinates. The Ellipsoid generated is a 3D object that can be rendered by Sandy's engine.
new Ellipsoid()public function Ellipsoid(xradius:Number, yradius:Number, zradius:Number, quality:Number, mode:String)This is the constructor to call when you need to create an Ellipsoid primitive.
This method will create a complete object with vertex, normales, texture coords and the faces.
xradius represents the x radius of the Ellipsoid,
yradius represents the y radius of the Ellipsoid,
zradius represents the z radius of the Ellipsoid,
quality represent quality (between 1 and 5), the higher the quality the more faces there are
xradius | Number |
yradius | Number |
zradius | Number |
quality | Number |
mode | String represents the two available modes to generate the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points. |
public function generate(Void):VoidGenerate all that is needed to construct the object. Vertex, UVCoords, Faces
Generates the points, normals and faces of the primitive depending on the parameters given
It dynamically constructs the object taking into account your preferences given in the parameters.
public function getSize(Void):VectorgetSize() returns the radius as a Vector (useful for storing an object's attributes). Returns vector where x, y, and z are the x, y, and z radii
public function getPrimitiveName(Void):StringgetPrimitiveName() returns the string "Sphere"
public function toString(Void):StringDescription copied from Object3D
Represents the Object3D into a String.
toString() in sandy.primitive.Primitive3D