A* Pathfinding Project  4.3.2
The A* Pathfinding Project for Unity 3D
AdvancedSmooth.TurnConstructor Class Referenceabstract

Abstract turn constructor. More...

Detailed Description

Abstract turn constructor.

A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here

Public Member Functions

void AddCircleSegment (double startAngle, double endAngle, bool clockwise, Vector3 center, List< Vector3 > output, float radius)
 
Vector3 AngleToVector (double a)
 
double Atan2 (Vector3 v)
 
double ClampAngle (double a)
 
double ClockwiseAngle (double from, double to)
 Returns the angle between from and to in a clockwise direction. More...
 
double CounterClockwiseAngle (double from, double to)
 Returns the angle between from and to in a counter-clockwise direction. More...
 
void DebugCircle (Vector3 center, double radius, Color color)
 
void DebugCircleSegment (Vector3 center, double startAngle, double endAngle, double radius, Color color)
 
double GetLengthFromAngle (double angle, double radius)
 Returns the length of an circular arc with a radius and angle. More...
 
abstract void GetPath (Turn turn, List< Vector3 > output)
 
virtual void OnTangentUpdate ()
 
virtual void PointToTangent (List< Turn > turnList)
 
abstract void Prepare (int i, Vector3[] vectorPath)
 
virtual void TangentToPoint (List< Turn > turnList)
 
virtual void TangentToTangent (List< Turn > turnList)
 
double ToDegrees (double rad)
 

Static Public Member Functions

static void PostPrepare ()
 
static void Setup (int i, Vector3[] vectorPath)
 

Public Attributes

float constantBias = 0
 Constant bias to add to the path lengths. More...
 
float factorBias = 1
 Bias to multiply the path lengths with. More...
 
const double ThreeSixtyRadians = Math.PI * 2
 

Static Public Attributes

static bool changedPreviousTangent = false
 
static Vector3 normal
 
static Vector3 prev
 
static Vector3 t1
 
static float turningRadius = 1.0F
 

Static Private Attributes

static Vector3 current
 
static Vector3 next
 
static Vector3 prevNormal
 
static Vector3 t2
 

Member Function Documentation

◆ AddCircleSegment()

void AddCircleSegment ( double  startAngle,
double  endAngle,
bool  clockwise,
Vector3  center,
List< Vector3 >  output,
float  radius 
)

◆ AngleToVector()

Vector3 AngleToVector ( double  a)

◆ Atan2()

double Atan2 ( Vector3  v)

◆ ClampAngle()

double ClampAngle ( double  a)

◆ ClockwiseAngle()

double ClockwiseAngle ( double  from,
double  to 
)

Returns the angle between from and to in a clockwise direction.

◆ CounterClockwiseAngle()

double CounterClockwiseAngle ( double  from,
double  to 
)

Returns the angle between from and to in a counter-clockwise direction.

◆ DebugCircle()

void DebugCircle ( Vector3  center,
double  radius,
Color  color 
)

◆ DebugCircleSegment()

void DebugCircleSegment ( Vector3  center,
double  startAngle,
double  endAngle,
double  radius,
Color  color 
)

◆ GetLengthFromAngle()

double GetLengthFromAngle ( double  angle,
double  radius 
)

Returns the length of an circular arc with a radius and angle.

Angle is specified in radians

◆ GetPath()

abstract void GetPath ( Turn  turn,
List< Vector3 >  output 
)
pure virtual

◆ OnTangentUpdate()

virtual void OnTangentUpdate ( )
virtual

Reimplemented in AdvancedSmooth.MaxTurn.

◆ PointToTangent()

virtual void PointToTangent ( List< Turn turnList)
virtual

Reimplemented in AdvancedSmooth.MaxTurn.

◆ PostPrepare()

static void PostPrepare ( )
static

◆ Prepare()

abstract void Prepare ( int  i,
Vector3 []  vectorPath 
)
pure virtual

◆ Setup()

static void Setup ( int  i,
Vector3 []  vectorPath 
)
static

◆ TangentToPoint()

virtual void TangentToPoint ( List< Turn turnList)
virtual

Reimplemented in AdvancedSmooth.MaxTurn.

◆ TangentToTangent()

virtual void TangentToTangent ( List< Turn turnList)
virtual

◆ ToDegrees()

double ToDegrees ( double  rad)

Member Data Documentation

◆ changedPreviousTangent

bool changedPreviousTangent = false
static

◆ constantBias

float constantBias = 0

Constant bias to add to the path lengths.

This can be used to favor certain turn types before others.
By for example setting this to -5, paths from this path constructor will be chosen if there are no other paths more than 5 world units shorter than this one (as opposed to just any shorter path)

◆ current

Vector3 current
staticprivate

◆ factorBias

float factorBias = 1

Bias to multiply the path lengths with.

This can be used to favor certain turn types before others.

See also
constantBias

◆ next

Vector3 next
staticprivate

◆ normal

Vector3 normal
static

◆ prev

Vector3 prev
static

◆ prevNormal

Vector3 prevNormal
staticprivate

◆ t1

Vector3 t1
static

◆ t2

Vector3 t2
staticprivate

◆ ThreeSixtyRadians

const double ThreeSixtyRadians = Math.PI * 2

◆ turningRadius

float turningRadius = 1.0F
static

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