RenderStack 11.06.1
Public Member Functions | Properties
RenderStack.Geometry.Edge Struct Reference

Connection between two points. More...

List of all members.

Public Member Functions

Point Other (Point first)
 Edge (Point a, Point b)
 Constructs a new edge sharing points a and b.
bool IEquatable< Edge >. Equals (Edge other)
 Equality test for edges. Edge sharing the same points are considered equal regardless of the order of the points.
override bool Equals (object obj)
override int GetHashCode ()

Properties

Point A [get, set]
Point B [get, set]
Point this[int index] [get]

Detailed Description

Note:
Edges A to B and B to A are considered the same edge.

Edge stores only connectivity information. All edge attributes such as smoothing angle are stored externally in attribute maps such as Dictionary<Edge, float>

Note:
Experimental.

Definition at line 34 of file Edge.cs.


Constructor & Destructor Documentation

RenderStack.Geometry.Edge.Edge ( Point  a,
Point  b 
)

Definition at line 50 of file Edge.cs.

        {
            this.a = a;
            this.b = b;
        }

Member Function Documentation

Point RenderStack.Geometry.Edge.Other ( Point  first)

Definition at line 44 of file Edge.cs.

        {
            return (A == first) ? B : A;
        }
bool IEquatable<Edge>. RenderStack.Geometry.Edge.Equals ( Edge  other)

Definition at line 58 of file Edge.cs.

References RenderStack.Geometry.Edge.A, and RenderStack.Geometry.Edge.B.

Referenced by RenderStack.Geometry.TruncateGeometryOperation.TruncateGeometryOperation().

        {
            bool equals = 
                ((A == other.A) && (B == other.B)) ||
                ((A == other.B) && (B == other.A));

            /*if(equals == true)
            {
                Logger.Log("!");
            }*/

            return equals;
        }
override bool RenderStack.Geometry.Edge.Equals ( object  obj)

Definition at line 72 of file Edge.cs.

References RenderStack.Geometry.Edge.A, and RenderStack.Geometry.Edge.B.

        {
            if(obj is Edge)
            {
                Edge other = (Edge)obj;
                bool equals = 
                    ((A == other.A) && (B == other.B)) ||
                    ((A == other.B) && (B == other.A));

                return equals;
            }
            return false;
        }
override int RenderStack.Geometry.Edge.GetHashCode ( )

Definition at line 86 of file Edge.cs.

References RenderStack.Geometry.Edge.GetHashCode().

Referenced by RenderStack.Geometry.Edge.GetHashCode().

        {
            return A.GetHashCode() ^ B.GetHashCode();
        }

Property Documentation

Point RenderStack.Geometry.Edge.A [get, set]
Point RenderStack.Geometry.Edge.B [get, set]
Point RenderStack.Geometry.Edge.this[int index] [get]

Definition at line 42 of file Edge.cs.


The documentation for this struct was generated from the following file: