Class sandy.primitive.Conic

Implemented Interfaces

Primitive3D

Description

Conic - Creates a conic section (a slice of a cone)

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Conic()
generate(), getPrimitiveName(), getSize()

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

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)

Parameters

radiusTopNumber The radius of the bottom face of the conic section. Set radiusTop or radiusBottom to 1 to create a pointy cone.
radiusBottomNumber 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.
heightNumber The height of the conic section
qualityNumber The number of faces around the side of the conic section (max 200, which is a lot).
modeString represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points.
noTopBoolean 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).
noBottomBoolean 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).
noSidesBoolean If true, the sides of the conic section are not rendered (defaults to false).
separateFacesBoolean If true, texture faces separately (defaults to false).

Method Detail

generate

public function generate(Void):Void

generate 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

Specified By

generate() in sandy.primitive.Primitive3D

getPrimitiveName

public function getPrimitiveName(Void):String

getSize

public function getSize(Void):Vector

getSize() 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

Specified By

getSize() in sandy.primitive.Primitive3D