Packagealternativa.utils
Classpublic class MeshUtils

Mesh-objects utilities



Public Methods
 MethodDefined by
  
autoWeldFaces(mesh:Mesh, angleThreshold:Number = 0, uvThreshold:Number = 0, ignoreLineJoints:Boolean = false):void
[static]Welding of faces that set flat convex n-gon.
MeshUtils
  
autoWeldVertices(mesh:Mesh, threshold:Number = 0):void
[static]Welding Mesh-object vertices that have same coordinates.
MeshUtils
  
generateClass(mesh:Mesh, packageName:String = ""):String
[static]Generate AS-class.
MeshUtils
  
[static]Delete isolated vertices (which are not connected to any object's face).
MeshUtils
  
[static]Delete singular faces.
MeshUtils
  
[static]Delete vertices that are lying on a segment between previous and next vertex in all their faces.
MeshUtils
  
uniteMeshes(... meshes):Mesh
[static]Unite several Mesh-objects.
MeshUtils
Method detail
autoWeldFaces()method
public static function autoWeldFaces(mesh:Mesh, angleThreshold:Number = 0, uvThreshold:Number = 0, ignoreLineJoints:Boolean = false):void

Welding of faces that set flat convex n-gon.

Parameters
mesh:Meshan object which faces are being welded
 
angleThreshold:Number (default = 0)angle threshhold
 
uvThreshold:Number (default = 0)UV-coordinates threshhold
 
ignoreLineJoints:Boolean (default = false)if true, then two polygons will not be welded together if resulting polygon will have two adjacent edges that lie on the same line
autoWeldVertices()method 
public static function autoWeldVertices(mesh:Mesh, threshold:Number = 0):void

Welding Mesh-object vertices that have same coordinates. Coordinates are being compared using treshold.

Parameters
mesh:Meshan object which vertices are being welded
 
threshold:Number (default = 0)distance threshold
generateClass()method 
public static function generateClass(mesh:Mesh, packageName:String = ""):String

Generate AS-class.

Parameters
mesh:Meshobject, which is used as a base
 
packageName:String (default = "")package name for generating class

Returns
Stringlisting of AS-class, representing specified mesh
removeIsolatedVertices()method 
public static function removeIsolatedVertices(mesh:Mesh):void

Delete isolated vertices (which are not connected to any object's face).

Parameters
mesh:Meshan object which vertices are being deleted
removeSingularFaces()method 
public static function removeSingularFaces(mesh:Mesh):void

Delete singular faces.

Parameters
mesh:Meshan object, which singular faces are being deleted
removeUselessVertices()method 
public static function removeUselessVertices(mesh:Mesh):void

Delete vertices that are lying on a segment between previous and next vertex in all their faces.

Parameters
mesh:Meshan object which vertices are being deleted
uniteMeshes()method 
public static function uniteMeshes(... meshes):Mesh

Unite several Mesh-objects.

Parameters
... meshesobject of alternativa.engine3d.core.Mesh class that are being united

Returns
Mesha new mesh, containing result of uniting of specified meshes