The U4DSegment class implements a geometrical representation of a segment in 3D space.
More...
The U4DSegment class implements a geometrical representation of a segment in 3D space.
◆ closestPointOnSegmentToPoint()
Determines the closest 3D point on the 3D segment to a 3D point.
- Parameters
-
uPoint | 3D point to determine closest point |
- Returns
- Returns the 3D point closest on segment
◆ getBarycentricCoordinatesOfPoint()
void U4DEngine::U4DSegment::getBarycentricCoordinatesOfPoint |
( |
U4DPoint3n & |
uPoint, |
|
|
float & |
baryCoordinateU, |
|
|
float & |
baryCoordinateV |
|
) |
| |
Method which computes the Barycentric coordinates of the 3D point in the segment.
- Parameters
-
uPoint | 3D point to compute barycentric coordinates from |
baryCoordinateU | u-component of the barycentric coordinates of the 3D point |
baryCoordinateV | v-componenet of the barycentric coordinates of the 3D point |
◆ getPoints()
std::vector< U4DPoint3n > U4DEngine::U4DSegment::getPoints |
( |
| ) |
|
Method which returns the 3D endpoints of the segments.
- Returns
- Returns the endpoints of the segment
◆ isPointOnSegment()
bool U4DEngine::U4DSegment::isPointOnSegment |
( |
U4DPoint3n & |
uPoint | ) |
|
Determines if the point is on the segment.
- Parameters
-
uPoint | 3D point to test if it lies on segment |
- Returns
- Returns True if point is on segment
◆ isValid()
bool U4DEngine::U4DSegment::isValid |
( |
| ) |
|
Method which tests if the segment is a valid 3D segment.
- Returns
- Returns true if the segment is valid
◆ negate()
Method which flips the direction of the 3D segment. That is, point AB becomes point BA.
- Returns
- Returns the flip direction of the 3D segment. That is, point AB becomes point BA
◆ normalizedSquareDistancePointSegment()
float U4DEngine::U4DSegment::normalizedSquareDistancePointSegment |
( |
U4DPoint3n & |
uPoint | ) |
|
Method which normalizes the square distance(magnitude) between a 3D point and the segment.
- Parameters
-
uPoint | 3D point to calculate distance from |
- Returns
- Returns the normalized square distance between point and segment
◆ operator!=()
bool U4DEngine::U4DSegment::operator!= |
( |
const U4DSegment & |
uSegment | ) |
|
Method which compares if two 3D segments are NOT equal.
- Parameters
-
uSegment | 3D segments to compare |
- Returns
- Returns true if the 3D segments are NOT equal
◆ operator=()
Copy constructor for the 3D segment.
- Parameters
-
- Returns
- Returns a copy of the 3D segment
◆ operator==()
bool U4DEngine::U4DSegment::operator== |
( |
const U4DSegment & |
uSegment | ) |
|
Method which compares if two 3D segments are equal.
- Parameters
-
uSegment | 3D segments to compare |
- Returns
- Returns true if the 3D segments are equal
◆ sqDistancePointSegment()
float U4DEngine::U4DSegment::sqDistancePointSegment |
( |
U4DPoint3n & |
uPoint | ) |
|
Returns the squared distance between a 3D point and segment.
- Parameters
-
uPoint | 3D point to calculate distance from |
- Returns
- Squared distance between point and segment