Primitive3D Conic - Creates a conic section (a slice of a cone)
new Conic()public function Conic(radiusTop:Number, radiusBottom:Number, height:Number, quality:Number, mode:String, noTop:Boolean, noBottom:Boolean, noSides:Boolean, separateFaces:Boolean)This is the constructor to call when you need to create a Conic 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
radiusTop represents the radius of the bottom of the conic section, radiusBottom represents the radius of the top of the conic section, height represent its height and quality its quality (the number of faces)
radiusTop | Number The radius of the bottom face of the conic section. Set radiusTop or radiusBottom to 1 to create a pointy cone. |
radiusBottom | Number The radius of the top face of the conic section. Set radiusBottom to a negative number (the opposite sign of radiusTop) to create an hourglass. |
height | Number The height of the conic section |
quality | Number The number of faces around the side of the conic section (max 200, which is a lot). |
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. |
noTop | Boolean If true, the top of the conic section is not rendered (defaults to false). unless radiusBottom is 1, in which case the bottom face need not be rendered separately). |
noBottom | Boolean If true, the bottom of the conic section is not rendered (defaults to false unless radiusTop is 1, in which case the bottom face need not be rendered separately). |
noSides | Boolean If true, the sides of the conic section are not rendered (defaults to false). |
separateFaces | Boolean If true, texture faces separately (defaults to false). |
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 height and radii as a Vector (useful for storing an object's attributes). Returns vector where x is the top radius, y is the bottom radius, and z is the height, and