RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::CubicBezier::Knot Class Reference

Control knot defining both position and tangent handle geometry. More...

#include <CubicBezier.hpp>

Public Member Functions

 Knot (Length x, Length y, Angle theta, Length magnitude) noexcept
 Constructs a control knot with position, tangent angle, and handle length.
Point getPoint () const noexcept
 Returns the anchor position (x, y) of the control knot.
Point getForwardControl () const noexcept
 Returns the forward (outgoing) control handle in world coordinates.
Point getBackwardControl () const noexcept
 Returns the backward (incoming) control handle in world coordinates.

Detailed Description

Control knot defining both position and tangent handle geometry.

Each Knot specifies a point (x, y) in meters, an outgoing tangent direction theta in radians, and a tangent handle length magnitude in meters. From these, two derived “handles” are computed:

  • Forward control: point + magnitude * [cos(theta), sin(theta)]
  • Backward control: point - magnitude * [cos(theta), sin(theta)]

These handles are used when constructing Bézier segments: the start control point contributes its forward handle, and the end control point contributes its backward handle.

Constructor & Destructor Documentation

◆ Knot()

rz::CubicBezier::Knot::Knot ( Length x,
Length y,
Angle theta,
Length magnitude )
noexcept

Constructs a control knot with position, tangent angle, and handle length.

Parameters
xX coordinate (meters).
yY coordinate (meters).
thetaTangent direction (radians).
magnitudeLength of tangent handle (meters).
Precondition
magnitude > 0.

Member Function Documentation

◆ getBackwardControl()

Point rz::CubicBezier::Knot::getBackwardControl ( ) const
noexcept

Returns the backward (incoming) control handle in world coordinates.

◆ getForwardControl()

Point rz::CubicBezier::Knot::getForwardControl ( ) const
noexcept

Returns the forward (outgoing) control handle in world coordinates.

◆ getPoint()

Point rz::CubicBezier::Knot::getPoint ( ) const
noexcept

Returns the anchor position (x, y) of the control knot.


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