Green Rock Engine 0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
GREngine.Core.Physics2D.Line Struct Reference

Form: Ay = mx + c Standard A = 1, m = gradient Becomes A = 0, m = 1, c = -(x intercept) when line is vertical. More...

Public Member Functions

 Line (float c, float m)
 
 Line (float a, float c, float m)
 
 Line (PointF p1, PointF p2)
 
Line GetNormal ()
 Returns a line equation that is normal to this one.
 
Vector2 GetNormalAsDirection (PointF fromPoint, PointF towardsPoint)
 Returns a directional vector of this line, assuming its a normal.
 

Public Attributes

float a
 
float c
 
float m
 

Detailed Description

Form: Ay = mx + c Standard A = 1, m = gradient Becomes A = 0, m = 1, c = -(x intercept) when line is vertical.

Member Function Documentation

◆ GetNormal()

Line GREngine.Core.Physics2D.Line.GetNormal ( )
inline

Returns a line equation that is normal to this one.

Returns

◆ GetNormalAsDirection()

Vector2 GREngine.Core.Physics2D.Line.GetNormalAsDirection ( PointF  fromPoint,
PointF  towardsPoint 
)
inline

Returns a directional vector of this line, assuming its a normal.

Parameters
towardsPointreference point towards which to extend
Returns

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