Class sandy.primitive.Ellipsoid

Implemented Interfaces

Primitive3D

Description

Generate an Ellipsoid using 3D coordinates. The Ellipsoid generated is a 3D object that can be rendered by Sandy's engine.

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Ellipsoid()
generate(), getPrimitiveName(), getSize(), toString()

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

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

Parameters

xradiusNumber
yradiusNumber
zradiusNumber
qualityNumber
modeString represents the two available modes to generate the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points.

Method Detail

generate

public function generate(Void):Void

Generate 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.

Specified By

generate() in sandy.primitive.Primitive3D

getSize

public function getSize(Void):Vector

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

Specified By

getSize() in sandy.primitive.Primitive3D

getPrimitiveName

public function getPrimitiveName(Void):String

getPrimitiveName() returns the string "Sphere"

Specified By

getPrimitiveName() in sandy.primitive.Primitive3D

toString

public function toString(Void):String

Description copied from Object3D

Represents the Object3D into a String.

Specified By

toString() in sandy.primitive.Primitive3D

Overrides

toString() in sandy.core.Object3D