Arbor 3: FSM & BT Graph Editor 3.1.2

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Properties | List of all members
Bezier2D Class Reference

Class to handle the two-dimensional cubic Bezier More...

## Public Member Functions
| Bezier2D ()
| new Bezier2D. More...
| Bezier2D (Vector2 startPosition, Vector2 startControl, Vector2 endPosition, Vector2 endControl)
| new Bezier2D. More...
| Bezier2D (Bezier2D bezier)
| new Bezier2D. More...
bool | SetStartPoint (Vector2 position, Vector2 control)
| Set Start point. More...
bool | SetEndPoint (Vector2 position, Vector2 control)
| Set End point. More...
Vector2 | GetPoint (float t)
| Get a position on the Bezier curve. More...
Vector2 | GetClosestPoint (Vector2 pos, float thresholdT=0.001f)
| Get a closest point on the Bezier curve. More...
float | GetClosestParam (Vector2 pos, float thresholdT=0.001f)
| Get a closest point on the Bezier curve. More...
Vector2 | GetLinearPoint (float t)
| Get a position on the Bezier curve linear. More...
bool | Equals (Bezier2D bezier)
| Returns whether this is equal to Bezier2D. More...
override bool | Equals (object obj)
| Returns whether this is equal to object. More...
override int | GetHashCode ()
| Get a hash code. More...

## Static Public Member Functions
static Vector2 | GetPoint (Vector2 startPosition, Vector2 startControl, Vector2 endPosition, Vector2 endControl, float t)
| Get a position on the Bezier curve. More...

## Properties
Vector2 | startPosition`[get, set]`
| Starting point More...
Vector2 | startControl`[get, set]`
| Control point of the starting point More...
Vector2 | endPosition`[get, set]`
| End point More...
Vector2 | endControl`[get, set]`
| Control point of the end point More...
float | length`[get]`
| Length More...
bool | isChanged`[get]`
| Whether it has been changed More...

## Detailed Description

Class to handle the two-dimensional cubic Bezier

## Constructor & Destructor Documentation

Bezier2D | ( |  | ) |

new Bezier2D.

Bezier2D | ( | Vector2 | startPosition,
|  | Vector2 | startControl,
|  | Vector2 | endPosition,
|  | Vector2 | endControl
| ) |  |

new Bezier2D.

Parameters

  startPosition | Starting point
  startControl | Control point of the end point
  endPosition | End point
  endControl | Control point of the end point

Bezier2D | ( | Bezier2D | bezier | ) |

new Bezier2D.

Parameters

  bezier | Copy source Bezier2D

## Member Function Documentation

bool Equals | ( | Bezier2D | bezier | ) |

Returns whether this is equal to Bezier2D.

Parameters

  bezier | Value of Bezier2D

Returns
  Returns true if they are equal.

override bool Equals | ( | object | obj | ) |

Returns whether this is equal to object.

Parameters

  obj | object value

Returns
  Returns true if they are equal.

float GetClosestParam | ( | Vector2 | pos,
|  | float | thresholdT = `0.001f`
| ) |  |

Get a closest point on the Bezier curve.

Parameters

  pos | position
  thresholdT | threshold of closest param.

Returns
  Closest param

Vector2 GetClosestPoint | ( | Vector2 | pos,
|  | float | thresholdT = `0.001f`
| ) |  |

Get a closest point on the Bezier curve.

Parameters

  pos | position
  thresholdT | threshold of closest param.

Returns
  Closest point

override int GetHashCode | ( |  | ) |

Get a hash code.

Returns
  Hash code

Vector2 GetLinearPoint | ( | float | t | ) |

Get a position on the Bezier curve linear.

Parameters

  t | 0-1 of value

Vector2 GetPoint | ( | float | t | ) |

Get a position on the Bezier curve.

Parameters

  t | 0-1 of value

static Vector2 GetPoint | ( | Vector2 | startPosition,
|  | Vector2 | startControl,
|  | Vector2 | endPosition,
|  | Vector2 | endControl,
|  | float | t
| ) |  |
| static

Get a position on the Bezier curve.

Parameters

  startPosition | Starting point
  startControl | Control point of the starting point
  endPosition | End point
  endControl | Control point of the end point
  t | 0-1 of value

bool SetEndPoint | ( | Vector2 | position,
|  | Vector2 | control
| ) |  |

Set End point.

Parameters

  position | Position
  control | Control point

Returns
  true if changed.

bool SetStartPoint | ( | Vector2 | position,
|  | Vector2 | control
| ) |  |

Set Start point.

Parameters

  position | Position
  control | Control point

Returns
  true if changed.

## Property Documentation

Vector2 endControl
| get set

Control point of the end point

Vector2 endPosition
| get set

End point

bool isChanged
| get

Whether it has been changed

float length
| get

Length

Vector2 startControl
| get set

Control point of the starting point

Vector2 startPosition
| get set

Starting point