Struct LineSegmentPoint
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Line segment structure retrieved from cvHoughLines2
[Serializable]
[SuppressMessage("Design", "CA1051: Do not declare visible instance fields")]
public struct LineSegmentPoint : IEquatable<LineSegmentPoint>
- Implements
- Inherited Members
Constructors
LineSegmentPoint(Point, Point)
Constructor
public LineSegmentPoint(Point p1, Point p2)
Parameters
Fields
P1
1st Point
public Point P1
Field Value
P2
2nd Point
public Point P2
Field Value
Methods
Equals(LineSegmentPoint)
Specifies whether this object contains the same members as the specified Object.
public bool Equals(LineSegmentPoint other)
Parameters
otherLineSegmentPointThe Object to test.
Returns
- bool
This method returns true if obj is the same type as this object and has the same members as this object.
Equals(object?)
Specifies whether this object contains the same members as the specified Object.
public override bool Equals(object? obj)
Parameters
objobjectThe Object to test.
Returns
- bool
This method returns true if obj is the same type as this object and has the same members as this object.
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()
Returns
- int
An integer value that specifies a hash value for this object.
IntersectedLineAndSegment(LineSegmentPoint, LineSegmentPoint)
Returns a boolean value indicating whether a line and a segment intersect.
public static bool IntersectedLineAndSegment(LineSegmentPoint line, LineSegmentPoint seg)
Parameters
lineLineSegmentPointLine
segLineSegmentPointSegment
Returns
IntersectedSegments(LineSegmentPoint)
Returns a boolean value indicating whether the specified two segments intersect.
public bool IntersectedSegments(LineSegmentPoint seg)
Parameters
segLineSegmentPoint
Returns
IntersectedSegments(LineSegmentPoint, LineSegmentPoint)
Returns a boolean value indicating whether the specified two segments intersect.
public static bool IntersectedSegments(LineSegmentPoint seg1, LineSegmentPoint seg2)
Parameters
seg1LineSegmentPointseg2LineSegmentPoint
Returns
Length()
public double Length()
Returns
LineAndSegmentIntersection(LineSegmentPoint, LineSegmentPoint)
Calculates a intersection of a line and a segment
public static Point? LineAndSegmentIntersection(LineSegmentPoint line, LineSegmentPoint seg)
Parameters
lineLineSegmentPointsegLineSegmentPoint
Returns
LineIntersection(LineSegmentPoint)
Calculates a intersection of the specified two lines
public Point? LineIntersection(LineSegmentPoint line)
Parameters
lineLineSegmentPoint
Returns
LineIntersection(LineSegmentPoint, LineSegmentPoint)
Calculates a intersection of the specified two lines
public static Point? LineIntersection(LineSegmentPoint line1, LineSegmentPoint line2)
Parameters
line1LineSegmentPointline2LineSegmentPoint
Returns
Offset(Point)
Translates the Point by the specified amount.
public void Offset(Point p)
Parameters
pPointThe Point used offset this CvPoint.
Offset(int, int)
Translates the Point by the specified amount.
public void Offset(int x, int y)
Parameters
SegmentIntersection(LineSegmentPoint)
Calculates a intersection of the specified two segments
public Point? SegmentIntersection(LineSegmentPoint seg)
Parameters
segLineSegmentPoint
Returns
SegmentIntersection(LineSegmentPoint, LineSegmentPoint)
Calculates a intersection of the specified two segments
public static Point? SegmentIntersection(LineSegmentPoint seg1, LineSegmentPoint seg2)
Parameters
seg1LineSegmentPointseg2LineSegmentPoint
Returns
ToString()
Converts this object to a human readable string.
public override string ToString()
Returns
- string
A string that represents this object.
Operators
operator ==(LineSegmentPoint, LineSegmentPoint)
Compares two CvPoint objects. The result specifies whether the members of each object are equal.
public static bool operator ==(LineSegmentPoint lhs, LineSegmentPoint rhs)
Parameters
lhsLineSegmentPointA Point to compare.
rhsLineSegmentPointA Point to compare.
Returns
- bool
This operator returns true if the members of left and right are equal; otherwise, false.
operator !=(LineSegmentPoint, LineSegmentPoint)
Compares two CvPoint objects. The result specifies whether the members of each object are unequal.
public static bool operator !=(LineSegmentPoint lhs, LineSegmentPoint rhs)
Parameters
lhsLineSegmentPointA Point to compare.
rhsLineSegmentPointA Point to compare.
Returns
- bool
This operator returns true if the members of left and right are unequal; otherwise, false.