Class sandy.core.face.Polygon

Implemented Interfaces

IPolygon

Description

Polygon

Field Index

clipped, depth

Method Index

new Polygon()
clip(), createNormale(), destroy(), enableEvents(), getBackSkin(), getClippedVertices(), getId(), getMaxDepth(), getMinDepth(), getSkin(), getTextureMatrix(), getUVCoords(), getVertices(), getZAverage(), isVisible(), refresh(), render(), setBackSkin(), setNormale(), setSkin(), setUVCoords(), swapCulling(), toString(), updateTextureMatrix()

Constructor Detail

Polygon

public function Polygon(oref:Object3D)

Field Detail

depth

public depth:Number

clipped

public clipped:Boolean

Method Detail

updateTextureMatrix

public function updateTextureMatrix(s:Skin):Void

FIXME, the matrix is available only for front skin, the same thing shall be applied for back skins!

Specified By

updateTextureMatrix() in sandy.core.face.IPolygon

getUVCoords

public function getUVCoords(Void):Array

setUVCoords

public function setUVCoords(pUv1:UVCoord, pUv2:UVCoord, pUv3:UVCoord):Void

getVertices

public function getVertices(Void):Array

Allows you to get the vertex of the face. Very usefull when you want to make some calculation on a face after it has been clicked.

Parameters

Void

Return

Array The array of vertex.

Specified By

getVertices() in sandy.core.face.IPolygon

getClippedVertices

public function getClippedVertices(Void):Array

render

public function render(mc:MovieClip, pS:Skin, pSb:Skin):Void

Render the face into a MovieClip.

Parameters

Specified By

render() in sandy.core.face.IPolygon

refresh

public function refresh(mc:MovieClip, pS:Skin, pSb:Skin):Void

Refresh the face display

Specified By

refresh() in sandy.core.face.IPolygon

setSkin

public function setSkin(s:Skin):Void

NFace3D allows all the skins available in Sandy, but you must be warned that if you use a TextureSkin (or a derivate one) the distortion will not be correct! The only solution to be able to map an object with a bitmap correctly is to use TriFace3D.

Parameters

sSkin object. The skin to apply to the face.

Specified By

setSkin() in sandy.core.face.IPolygon

getZAverage

public function getZAverage(Void):Number

Return the depth average of the face.

Useful for z-sorting.

Return

A Number as depth average.

Specified By

getZAverage() in sandy.core.face.IPolygon

getMinDepth

public function getMinDepth(Void):Number

Returns the min depth of its vertex.

Parameters

Void

Return

number the minimum depth of it's vertex

Specified By

getMinDepth() in sandy.core.face.IPolygon

getMaxDepth

public function getMaxDepth(Void):Number

Returns the max depth of its vertex.

Parameters

Void

Return

number the maximum depth of it's vertex

Specified By

getMaxDepth() in sandy.core.face.IPolygon

toString

public function toString(Void):String

Get a String represntation of the NFace3D.

Return

A String representing the NFace3D.

clip

public function clip(frustum:Frustum):Array

getId

public function getId(Void):Number

Returns the ID of the current face. This ID is an unique number.

Parameters

Void

Return

Number The ID of the face.

enableEvents

public function enableEvents(b:Boolean):Void

Enable or not the events onPress, onRollOver and onRollOut with this face.

Parameters

bBoolean True to enable the events, false otherwise.

Specified By

enableEvents() in sandy.core.face.IPolygon

isVisible

public function isVisible(Void):Boolean

isvisible

Say if the face is visible or not

Parameters

Void

Return

a Boolean, true if visible, false otherwise

Specified By

isVisible() in sandy.core.face.IPolygon

createNormale

public function createNormale(Void):Vector

Create the normal vector of the face.

Return

The resulting Vertex corresponding to the normal.

Specified By

createNormale() in sandy.core.face.IPolygon

setNormale

public function setNormale(n:Vector):Void

Set the normal vector of the face.

Parameters

Specified By

setNormale() in sandy.core.face.IPolygon

setBackSkin

public function setBackSkin(s:Skin):Void

Set up the back skin of the face. It corresponds to the skin that is applied to the back of the face, so to the faces that is normally hidden to the user but that is visible if you've set Object3D.drawAllFaces to true.

Parameters

sThe Skin to set.

Specified By

setBackSkin() in sandy.core.face.IPolygon

getSkin

public function getSkin(Void):Skin

Get the skin of the face

Return

The Skin

Specified By

getSkin() in sandy.core.face.IPolygon

getBackSkin

public function getBackSkin(Void):Skin

Returns the the skin of the back of this face.

Return

The Skin

Specified By

getBackSkin() in sandy.core.face.IPolygon

See Also

  • Face.setBackSkin

swapCulling

public function swapCulling(Void):Void

This method change the value of the "normal" clipping side. Also swap the font and back skins

Parameters

Void

Specified By

swapCulling() in sandy.core.face.IPolygon

destroy

public function destroy(Void):Void

Destroy the movieclip attache to this polygon

Specified By

destroy() in sandy.core.face.IPolygon

getTextureMatrix

public function getTextureMatrix(Void):Matrix

Returns the precomputed matrix for the texture algorithm.

Specified By

getTextureMatrix() in sandy.core.face.IPolygon