Class sandy.primitive.Sphere

Implemented Interfaces

Primitive3D

Description

Generates a Sphere 3D coordinates. The Sphere generated is a 3D object that can be rendered by Sandy's engine. You can play with the constructor's parameters to ajust it to your needs.

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Sphere()
getPrimitiveName()

Inherited from Ellipsoid

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

Sphere

public function Sphere(radius:Number, quality:Number, mode:String)

This is the constructor to call when you nedd to create a Sphere 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

radius represents the radius of the Sphere, quality represent its quality (between 1 and 5), more quality is up, more faces there is

Parameters

radiusNumber
qualityNumber
modeString represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points.

Method Detail

getPrimitiveName

public function getPrimitiveName(Void):String

getPrimitiveName() returns the string "Sphere"

Specified By

getPrimitiveName() in sandy.primitive.Primitive3D

Overrides

getPrimitiveName() in sandy.primitive.Ellipsoid