Interface ITopology
- Namespace
- Lime
- Assembly
- Lime.dll
public interface ITopology
Properties
ConstrainedEdges
IEnumerable<(int, int)> ConstrainedEdges { get; }
Property Value
- IEnumerable<(int, int)>
EdgeHitTestDistance
float EdgeHitTestDistance { get; set; }
Property Value
Faces
IEnumerable<TopologyFace> Faces { get; }
Property Value
FacesWithInfo
We need private information in Tangerine in order to show them to end user. In any other application there is no need to know inner information about topology.
IEnumerable<(TopologyFace, TopologyFace.FaceInfo)> FacesWithInfo { get; }
Property Value
VertexHitTestRadius
float VertexHitTestRadius { get; set; }
Property Value
Vertices
List<Vector2> Vertices { get; }
Property Value
Methods
AddVertex(Vector2)
int AddVertex(Vector2 vertex)
Parameters
vertex
Vector2
Returns
ConstructFrom(IEnumerable<Vector2>, List<TopologyEdge>, IReadOnlyList<TopologyFace>)
void ConstructFrom(IEnumerable<Vector2> vertices, List<TopologyEdge> constrainedEdges, IReadOnlyList<TopologyFace> faces)
Parameters
vertices
IEnumerable<Vector2>constrainedEdges
List<TopologyEdge>faces
IReadOnlyList<TopologyFace>
HitTest(Vector2, float, float, out TopologyHitTestResult)
Carries out a test to determine the most suitable topology primitive for a given position.
bool HitTest(Vector2 position, float vertexHitRadius, float edgeHitRadius, out TopologyHitTestResult result)
Parameters
position
Vector2Position in local space.
vertexHitRadius
floatAdmissible radius for vertex testing.
edgeHitRadius
floatAdmissible radius for edge testing.
result
TopologyHitTestResultPrimitive and its appropriate info if test was successful, null otherwise.
Returns
- bool
Test success verdict.
InsertConstrainedEdge(int, int)
bool InsertConstrainedEdge(int index0, int index1)
Parameters
Returns
Locate(Vector2)
IHalfEdge Locate(Vector2 point)
Parameters
point
Vector2
Returns
RemoveConstrainedEdge(int, int)
void RemoveConstrainedEdge(int index0, int index1)
Parameters
RemoveUnusedVertices()
(List<int>, int) RemoveUnusedVertices()
Returns
RemoveVertex(int)
void RemoveVertex(int index)
Parameters
index
int
Scale(Vector2)
void Scale(Vector2 scale)
Parameters
scale
Vector2
TranslateVertex(int, Vector2)
bool TranslateVertex(int index, Vector2 positionDelta)
Parameters
Returns
Events
OnTopologyChanged
event Action<ITopology> OnTopologyChanged