Class Geometry
Stores geometry in a DCEL (doubly connected (half) edge list).
Inheritance
Inherited Members
Namespace: Fusee.Jometri
Assembly: Fusee.Jometri.dll
Syntax
public class Geometry
Constructors
Geometry(IEnumerable<PolyBoundary>)
2D Geometry, stored in a DCEL (half edge data structure).
Declaration
public Geometry(IEnumerable<PolyBoundary> outlines)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<PolyBoundary> | outlines | A collection of the geometry's outlines, each containing the geometric information as a list of float3 in ccw order. |
Methods
CloneGeometry()
Creates an exact copy of the given Geometry.
Declaration
public Geometry CloneGeometry()
Returns
Type | Description |
---|---|
Geometry |
GetAllFaces()
Returns all Faces of the Geometry.
Declaration
public IEnumerable<Face> GetAllFaces()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Face> |
GetAllHalfEdges()
Returns all HalfEdges of the Geometry.
Declaration
public IEnumerable<HalfEdge> GetAllHalfEdges()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetAllVertices()
Returns all Vertices of the Geometry.
Declaration
public IEnumerable<Vertex> GetAllVertices()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Vertex> |
GetFaceHalfEdges(Int32)
This collection contains all handles to HalfEdges of a given Face.
Declaration
public IEnumerable<HalfEdge> GetFaceHalfEdges(int fHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fHandle | The reference of the Face. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetFaceOuterVertices(Int32)
This collection contains all Vertices of the outer boundary of a given Face.
Declaration
public IEnumerable<Vertex> GetFaceOuterVertices(int fHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fHandle | The reference of the Face. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Vertex> |
GetFacesAdajacentToFace(Int32)
This collection contains all Faces neighboring a given Face.
Declaration
public IEnumerable<Face> GetFacesAdajacentToFace(int fHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fHandle | The reference of the Face. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Face> |
GetFaceVertices(Int32)
This collection contains all Vertices of a given Face.
Declaration
public IEnumerable<Vertex> GetFaceVertices(int fHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fHandle | The reference of the Face. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Vertex> |
GetHalfEdgeLoop(Int32)
This collection contains all handles to HalfEdges belonging to a closed loop. Collection is made by tracking the initial HalfEdge's successors.
Declaration
public IEnumerable<HalfEdge> GetHalfEdgeLoop(int heHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | heHandle | The reference to the HalfEdge with which the loop starts. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetHalfEdgeLoopReverse(Int32)
This collection contains all handles to HalfEdges belonging to a closed loop. Calculation is made by tracking the initial HalfEdge's predecessors.
Declaration
public IEnumerable<HalfEdge> GetHalfEdgeLoopReverse(int heHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | heHandle | The reference to the HalfEdge with which the loop starts. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetVertexAdajacentFaces(Int32)
This collection contains all handles to Faces adjacent to a given Vertex.
Declaration
public IEnumerable<Face> GetVertexAdajacentFaces(int vHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vHandle | The reference of the Vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Face> |
GetVertexAdjacentVertices(Int32)
This collection contains all vertices neighboring a given Vertex.
Declaration
public IEnumerable<Vertex> GetVertexAdjacentVertices(int vHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vHandle | The reference of the Vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Vertex> |
GetVertexIncidentHalfEdges(Int32)
This collection contains all handles to HalfEdges starting at or targeting a given Vertex.
Declaration
public IEnumerable<HalfEdge> GetVertexIncidentHalfEdges(int vHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vHandle | The reference of the Vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetVertexStartingHalfEdges(Int32)
This collection contains all handles to HalfEdges starting at a given Vertex.
Declaration
public IEnumerable<HalfEdge> GetVertexStartingHalfEdges(int vHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vHandle | The reference of the Vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
GetVertexTargetingHalfEdges(Int32)
This collection contains all handles to HalfEdges ending at a given Vertex.
Declaration
public IEnumerable<HalfEdge> GetVertexTargetingHalfEdges(int vHandle)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vHandle | The reference of the Vertex. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<HalfEdge> |
SetFaceNormal(IList<Vertex>, Face)
Calculates and saves the normal of the Face into its FaceData.
Declaration
public void SetFaceNormal(IList<Vertex> faceOuterVertices, Face face)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<Vertex> | faceOuterVertices | All vertices of the outer boundary of the Face. |
Face | face | The Face the normal belongs to. |