- Main Page
- Modules
- Classes
- Files
- Related Pages

- File List
- File Members

# src/vectorMath/bezier.h File Reference

`#include "../typedefs.h"`

Go to the source code of this file.

## Defines
#define | BEZIER_PTS_PER_METER 1.25
## Functions
Vector3r | pointOnCubicBezier (const Vector3r &startPoint, const Vector3r &startCtrlPoint, const Vector3r &endPoint, const Vector3r &endCtrlPoint, float t)
void | computeBezier (Polygon &points, const Vector3r &startPoint, const Vector3r &startCtrlPoint, const Vector3r &endPoint, const Vector3r &endCtrlPoint, dReal ratio=1)

## Define Documentation

#define BEZIER_PTS_PER_METER 1.25

## Function Documentation

void computeBezier | ( | Polygon & | points,
|  | const Vector3r & | startPoint,
|  | const Vector3r & | startCtrlPoint,
|  | const Vector3r & | endPoint,
|  | const Vector3r & | endCtrlPoint,
|  | dReal | ratio = `1` |
| ) |  |  |

Computes points on Bezier line specified by parameters

Parameters:

  | points | container to attach the points to
  | startPoint | starting point of the line
  | startCtrlPoint | first control point
  | endPoint | ending point of the line
  | endCtrlPoint | second control point
  | ratio | drives the real position of the control points on the vectors (startPoint->startCtrlPoint) and (endPoint->endCtrlPoint)

Vector3r pointOnCubicBezier | ( | const Vector3r & | startPoint,
|  | const Vector3r & | startCtrlPoint,
|  | const Vector3r & | endPoint,
|  | const Vector3r & | endCtrlPoint,
|  | float | t |
| ) |  |  |

Computes one point on the Bezier line