ScummVM API documentation
Sword25::Line Class Reference

Public Types

enum  VERTEX_CLASSIFICATION { LEFT, RIGHT, ON }
 

Static Public Member Functions

static bool isVertexLeft (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool isVertexLeftOn (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool isVertexRight (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool isVertexRightOn (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool isVertexOn (const Vertex &a, const Vertex &b, const Vertex &c)
 
static VERTEX_CLASSIFICATION classifyVertexToLine (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool doesIntersectProperly (const Vertex &a, const Vertex &b, const Vertex &c, const Vertex &d)
 
static bool isOnLine (const Vertex &a, const Vertex &b, const Vertex &c)
 
static bool isOnLineStrict (const Vertex &a, const Vertex &b, const Vertex &c)
 

Member Function Documentation

◆ isVertexLeft()

static bool Sword25::Line::isVertexLeft ( const Vertex a,
const Vertex b,
const Vertex c 
)
inlinestatic

Determines whether a piont is left of a line

Parameters
aThe start point of a line
bThe end point of a line
cThe test point
Returns
Returns true if the point is to the left of the line. If the point is to the right of the line or on the line, false is returned.

◆ isVertexRight()

static bool Sword25::Line::isVertexRight ( const Vertex a,
const Vertex b,
const Vertex c 
)
inlinestatic

Determines whether a piont is right of a line

Parameters
aThe start point of a line
bThe end point of a line
cThe test point
Returns
Returns true if the point is to the right of the line. If the point is to the right of the line or on the line, false is returned.

◆ isVertexOn()

static bool Sword25::Line::isVertexOn ( const Vertex a,
const Vertex b,
const Vertex c 
)
inlinestatic

Determines whether a piont is on a line

Parameters
aThe start point of a line
bThe end point of a line
cThe test point
Returns
Returns true if the point is on the line, false otherwise.

◆ classifyVertexToLine()

static VERTEX_CLASSIFICATION Sword25::Line::classifyVertexToLine ( const Vertex a,
const Vertex b,
const Vertex c 
)
inlinestatic

Determines where a point is relative to a line.

Parameters
aThe start point of a line
bThe end point of a line
cThe test point
Returns
LEFT is returned if the point is to the left of the line. RIGHT is returned if the point is to the right of the line. ON is returned if the point is on the line.

◆ doesIntersectProperly()

static bool Sword25::Line::doesIntersectProperly ( const Vertex a,
const Vertex b,
const Vertex c,
const Vertex d 
)
inlinestatic

Determines whether two lines intersect

Parameters
aThe start point of the first line
bThe end point of the first line
cThe start point of the second line
dThe end point of the second line
Remarks
In cases where a line only touches the other, false is returned (improper intersection)

◆ isOnLine()

static bool Sword25::Line::isOnLine ( const Vertex a,
const Vertex b,
const Vertex c 
)
inlinestatic

Determines whether a point is on a line segment

Parameters
aThe start point of a line
bThe end point of a line
cThe test point

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