Class sandy.primitive.Hedra

Implemented Interfaces

Primitive3D

Description

Hedra

Field Index

Inherited from Object3D

Inherited from Node

Method Index

new Hedra()
generate(), getNumSurfaces(), getPrimitiveName(), getSize(), toString()

Inherited from Object3D

Inherited from Leaf

Inherited from Node

Constructor Detail

Hedra

public function Hedra(h:Number, lg:Number, rad:Number)

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

h represents the height of the Hedra, lg represent its length and rad its radius

Parameters

hNumber
lgNumber
radNumber

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

getSize

public function getSize(Void):Vector

getSize() returns the length, height, and radius as a Vector (useful for storing an object's attributes). Returns vector where x is the length, y is the height, and z is the radius

Specified By

getSize() in sandy.primitive.Primitive3D

getPrimitiveName

public function getPrimitiveName(Void):String

getPrimitiveName() returns the string "Hedra"

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

getNumSurfaces

public function getNumSurfaces(Void):Number