Class DGraph2
Arbitrary-Topology 2D Graph. This is similar to DMesh3 but without faces.
Each vertex can be connected to an arbitrary number of edges.
Each vertex can have a 3-float color, and edge edge can have an integer GroupID
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class DGraph2 : DGraph
Constructors
DGraph2()
Declaration
DGraph2(DGraph2)
Declaration
public DGraph2(DGraph2 copy)
Parameters
Fields
InvalidVertex
Declaration
public static readonly Vector2d InvalidVertex
Field Value
Properties
CachedBounds
Declaration
public AxisAlignedBox2d CachedBounds { get; }
Property Value
HasVertexColors
Declaration
public bool HasVertexColors { get; }
Property Value
Methods
append_new_split_vertex(Int32, Int32)
Declaration
protected override int append_new_split_vertex(int a, int b)
Parameters
Returns
Overrides
AppendGraph(DGraph2, Int32)
Declaration
public void AppendGraph(DGraph2 graph, int gid = -1)
Parameters
AppendPolygon(GeneralPolygon2d, Int32)
Declaration
public void AppendPolygon(GeneralPolygon2d poly, int gid = -1)
Parameters
AppendPolygon(Polygon2d, Int32)
Declaration
public void AppendPolygon(Polygon2d poly, int gid = -1)
Parameters
AppendPolyline(PolyLine2d, Int32)
Declaration
public void AppendPolyline(PolyLine2d poly, int gid = -1)
Parameters
AppendVertex(Vector2d)
Declaration
public int AppendVertex(Vector2d v)
Parameters
Returns
AppendVertex(Vector2d, Vector3f)
Declaration
public int AppendVertex(Vector2d v, Vector3f c)
Parameters
Returns
DiscardVertexColors()
Declaration
public void DiscardVertexColors()
EnableVertexColors(Vector3f)
Declaration
public void EnableVertexColors(Vector3f initial_color)
Parameters
Type |
Name |
Description |
Vector3f |
initial_color |
|
GetBounds()
Declaration
public AxisAlignedBox2d GetBounds()
Returns
GetEdgeCenter(Int32)
Declaration
public Vector2d GetEdgeCenter(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
GetEdgeSegment(Int32)
Declaration
public Segment2d GetEdgeSegment(int eID)
Parameters
Type |
Name |
Description |
Int32 |
eID |
|
Returns
GetEdgeV(Int32, ref Vector2d, ref Vector2d)
Declaration
public bool GetEdgeV(int eID, ref Vector2d a, ref Vector2d b)
Parameters
Returns
GetVertex(Int32)
Declaration
public Vector2d GetVertex(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
GetVertexColor(Int32)
Declaration
public Vector3f GetVertexColor(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
OpeningAngle(Int32, Double)
Compute opening angle at vertex vID.
If not a vertex, or valence != 2, returns invalidValue argument.
If either edge is degenerate, returns invalidValue argument.
Declaration
public double OpeningAngle(int vID, double invalidValue = 1.7976931348623157E+308)
Parameters
Returns
SetVertex(Int32, Vector2d)
Declaration
public void SetVertex(int vID, Vector2d vNewPos)
Parameters
SetVertexColor(Int32, Vector3f)
Declaration
public void SetVertexColor(int vID, Vector3f vNewColor)
Parameters
SortedVtxEdges(Int32)
return edges around vID sorted by angle, in clockwise order
Declaration
public int[] SortedVtxEdges(int vID)
Parameters
Type |
Name |
Description |
Int32 |
vID |
|
Returns
subclass_validity_checks(Action<Boolean>)
Declaration
protected override void subclass_validity_checks(Action<bool> CheckOrFailF)
Parameters
Overrides
Vertices()
Declaration
public IEnumerable<Vector2d> Vertices()
Returns