Line Class Reference

This reference page is linked to from the following overview topics: Math and Geometry Utilities.



Detailed Description

Represents a line segment in 3d space.

Definition at line 1474 of file math.h.

#include <math.h>

List of all members.

Public Types

enum   IntersectionResult { PARALLEL, COINCIDENT, NOT_INTERSECTING, INTERSECTING }
 

Possible return values of computing intersection of 2 lines.

More...

Public Member Functions

  Line (const Vector &vStart, const Vector &vEnd)
  Constructor, based on start and end points.
float  RangeFrom (const Vector &vPoint)
  Returns the shortest distance between a given point and this line.
IntersectionResult  Intersection2D (const Line &cOther, Vector &vResult, bool bSegmentOnly=false)
  Calculates intersection of 2 lines in 2D. If bSegmentOnly is true it will only.

Member Enumeration Documentation

Possible return values of computing intersection of 2 lines.

Enumerator:
PARALLEL 
COINCIDENT 
NOT_INTERSECTING 
INTERSECTING 

Definition at line 1495 of file math.h.

    {
        PARALLEL,
        COINCIDENT,
        NOT_INTERSECTING,
        INTERSECTING
    };

    IntersectionResult Intersection2D( const Line& cOther, Vector &vResult, bool bSegmentOnly = false );
};

Constructor & Destructor Documentation

Line ( const Vector vStart,
const Vector vEnd 
)

Constructor, based on start and end points.


Member Function Documentation

float RangeFrom ( const Vector vPoint )

Returns the shortest distance between a given point and this line.

Note: The line is not logically extended to infinity in this function. Only points between the start and end point are considered part of the line.

IntersectionResult Intersection2D ( const Line cOther,
Vector vResult,
bool  bSegmentOnly = false 
)

Calculates intersection of 2 lines in 2D. If bSegmentOnly is true it will only.

result the intersection point if it is between the segment endpoints, otherwise the result apply to whole lines.


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

Line Line Line Line Line Line Line Line Line Line
Line Line Line Line Line Line Line Line Line Line