Packageaway3d.core.geom
Classpublic final class NGon
InheritanceNGon Inheritance Object

NGon is an object describing a shape in 3D of any number of points



Public Properties
 PropertyDefined By
  area : Number
[read-only] Calculates the area of an NGon
NGon
  material : Material
NGon
  normal : Vector3D
NGon
  plane : Plane3D
NGon
  uvs : Vector.<UV>
NGon
  vertices : Vector.<Vertex>
NGon
Public Methods
 MethodDefined By
  
Creates an NGon object
NGon
  
adjacent(nGon:NGon):Boolean
Tests if two NGons (partially) share an edge.
NGon
  
classifyToPlane(compPlane:Plane3D):int
Classifies on which side of a plane this NGon falls
NGon
  
Creates a duplicate of this NGon
NGon
  
fromTriangle(face:Face):void
Converts a Face object to an NGon
NGon
  
invert():void
Inverts the NGon
NGon
  
isNeglectable():Boolean
Determines if an NGon is too small to be of any use
NGon
  
split(splitPlane:Plane3D):Vector.<NGon>
Splits the ngon into two according to a split plane
NGon
  
triangulate():Vector.<Face>
Triangulates the NGon
NGon
  
trim(trimPlane:Plane3D):void
Trims the NGon to the front side of a plane
NGon
  
trimBack(trimPlane:Plane3D):void
Trims the NGon to the back side of a plane
NGon
Property Detail
_isSplitterproperty
arcane var _isSplitter:Boolean

areaproperty 
area:Number  [read-only]

Calculates the area of an NGon


Implementation
    public function get area():Number
materialproperty 
public var material:Material

normalproperty 
public var normal:Vector3D

planeproperty 
public var plane:Plane3D

uvsproperty 
public var uvs:Vector.<UV>

verticesproperty 
public var vertices:Vector.<Vertex>

Constructor Detail
NGon()Constructor
public function NGon()

Creates an NGon object

####INIT####
Method Detail
adjacent()method
public function adjacent(nGon:NGon):Boolean

Tests if two NGons (partially) share an edge.

Parameters

nGon:NGon — The NGon to test against.

Returns
Boolean — Whether or the target NGon shares an edge with the current NGon.
classifyToPlane()method 
public function classifyToPlane(compPlane:Plane3D):int

Classifies on which side of a plane this NGon falls

Parameters

compPlane:Plane3D

Returns
int
clone()method 
public function clone():NGon

Creates a duplicate of this NGon

Returns
NGon
fromTriangle()method 
public function fromTriangle(face:Face):void

Converts a Face object to an NGon

Parameters

face:Face

invert()method 
public function invert():void

Inverts the NGon

isNeglectable()method 
public function isNeglectable():Boolean

Determines if an NGon is too small to be of any use

Returns
Boolean
removeColinears()method 
arcane function removeColinears():void

split()method 
public function split(splitPlane:Plane3D):Vector.<NGon>

Splits the ngon into two according to a split plane

Parameters

splitPlane:Plane3D

Returns
Vector.<NGon> — Two new polygons. The first is on the positive side of the split plane, the second on the negative.
triangulate()method 
public function triangulate():Vector.<Face>

Triangulates the NGon

Returns
Vector.<Face>
trim()method 
public function trim(trimPlane:Plane3D):void

Trims the NGon to the front side of a plane

Parameters

trimPlane:Plane3D

trimBack()method 
public function trimBack(trimPlane:Plane3D):void

Trims the NGon to the back side of a plane

Parameters

trimPlane:Plane3D