C# Class Triangle, UnityUtils

Datei anzeigen Open project: mortennobel/UnityUtils Class Usage Examples

Public Methods

Method Description
Area ( ) : double
ConvertToMesh ( List triangles, string name = "TriangleMesh" ) : Mesh
ConvertToMeshes ( List triangles, string name = "TriangleMesh" ) : List
ConvertToOBJFile ( List triangles, string name = "TriangleMesh", bool removeDuplicateVertices = true ) : string
Cut ( LineSegment2D, line ) : Triangle[],
FlipNormal ( ) : void
GetLineSegments ( ) : LineSegment2D[],
GetShortestEdge ( ) : double
IsIntersecting ( LineSegment2D, ls ) : bool
IsPointInside ( Vector2D, point ) : bool
Midpoint2D ( ) : Vector3D,
ToArray2D ( ) : double[]
ToTriangleList2D ( double data, int count ) : List
Triangle ( ) : System
Triangle ( Vector3D, ps, Vector2D, uvs ) : System
UV ( int i ) : Vector2D,
Vertex ( int i ) : Vector3D,

Private Methods

Method Description
ContainsVertex ( Vector3D, p ) : bool
ContainsVertex2D ( Vector3D, p ) : bool
ProjectToTriangle ( Vector3D, point ) : Vector3D,
ReprojectNewVerticesOntoTriangles ( List res, Triangle, clippingTriangles ) : void
ReprojectUVNoY ( List res, bool forceXZLayerProject = true ) : void
ReprojectY ( List res ) : void
ReprojectY ( List res, Plane3D, plane ) : void
V2 ( Vector3D, v ) : Vector2D,

Method Details

Area() public method

public Area ( ) : double
return double

ConvertToMesh() public static method

public static ConvertToMesh ( List triangles, string name = "TriangleMesh" ) : Mesh
triangles List
name string
return Mesh

ConvertToMeshes() public static method

public static ConvertToMeshes ( List triangles, string name = "TriangleMesh" ) : List
triangles List
name string
return List

ConvertToOBJFile() public static method

public static ConvertToOBJFile ( List triangles, string name = "TriangleMesh", bool removeDuplicateVertices = true ) : string
triangles List
name string
removeDuplicateVertices bool
return string

Cut() public method

public Cut ( LineSegment2D, line ) : Triangle[],
line LineSegment2D,
return Triangle[],

FlipNormal() public method

public FlipNormal ( ) : void
return void

GetLineSegments() public method

public GetLineSegments ( ) : LineSegment2D[],
return LineSegment2D[],

GetShortestEdge() public method

public GetShortestEdge ( ) : double
return double

IsIntersecting() public method

public IsIntersecting ( LineSegment2D, ls ) : bool
ls LineSegment2D,
return bool

IsPointInside() public method

public IsPointInside ( Vector2D, point ) : bool
point Vector2D,
return bool

Midpoint2D() public method

public Midpoint2D ( ) : Vector3D,
return Vector3D,

ToArray2D() public method

public ToArray2D ( ) : double[]
return double[]

ToTriangleList2D() public static method

public static ToTriangleList2D ( double data, int count ) : List
data double
count int
return List

Triangle() public method

public Triangle ( ) : System
return System

Triangle() public method

public Triangle ( Vector3D, ps, Vector2D, uvs ) : System
ps Vector3D,
uvs Vector2D,
return System

UV() public method

public UV ( int i ) : Vector2D,
i int
return Vector2D,

Vertex() public method

public Vertex ( int i ) : Vector3D,
i int
return Vector3D,