| layout | default-layout |
|---|---|
| title | class CLineSegment - Dynamsoft Core Module C++ Edition API Reference |
| description | This page shows the C++ edition of the class CLineSegment in Dynamsoft Core Module. |
| keywords | line segment, c++ |
| needAutoGenerateSidebar | true |
The CLineSegment class represents a line segment in 2D space. It contains two CPoint objects, which represent the start point and end point of the line segment.
Namespace: dynamsoft::basic_structures
Assembly: DynamsoftCore
class CLineSegment | Method | Description |
|---|---|
GetStartPoint |
Gets the start point of the line segment. |
GetEndPoint |
Gets the end point of the line segment. |
SetStartPoint |
Sets the start point of the line segment. |
SetEndPoint |
Sets the end point of the line segment. |
GetId |
Gets the id of the line segment. |
SetId |
Sets the id of the line segment. |
Gets the start point of the line segment.
const CPoint& GetStartPoint() constReturn Value
Returns the start point of the line segment.
See Also
[CPoint]({{ site.dcvb_cpp_api }}core/basic-structures/point.html)
Gets the end point of the line segment.
const CPoint& GetEndPoint() constReturn Value
Returns the end point of the line segment.
See Also
[CPoint]({{ site.dcvb_cpp_api }}core/basic-structures/point.html)
Sets the start point of the line segment.
void SetStartPoint(const CPoint& pt)Parameters
[in] pt: The start point of the line segment.
See Also
[CPoint]({{ site.dcvb_cpp_api }}core/basic-structures/point.html)
Sets the end point of the line segment.
void SetEndPoint(const CPoint& pt)Parameters
[in] pt: The end point of the line segment.
See Also
[CPoint]({{ site.dcvb_cpp_api }}core/basic-structures/point.html)
Gets the id of the line segment.
int GetId() const;Return Value
Returns the id of the line segment.
Sets the id of the line segment.
void SetId(int lineId);Parameters
[in] lineId: The id of the line segment.