Ligament node on a Mechanism2d.
More...
#include <frc/smartdashboard/MechanismLigament2d.h>
Ligament node on a Mechanism2d.
A ligament can have its length changed (like an elevator) or angle changed, like an arm.
- See also
- Mechanism2d
◆ MechanismLigament2d()
frc::MechanismLigament2d::MechanismLigament2d |
( |
std::string_view |
name, |
|
|
double |
length, |
|
|
units::degree_t |
angle, |
|
|
double |
lineWidth = 6 , |
|
|
const frc::Color8Bit & |
color = {235, 137, 52} |
|
) |
| |
◆ GetAngle()
double frc::MechanismLigament2d::GetAngle |
( |
| ) |
|
Get the ligament's angle relative to its parent.
- Returns
- the angle
◆ GetColor()
Color8Bit frc::MechanismLigament2d::GetColor |
( |
| ) |
|
Get the ligament color.
- Returns
- the color of the line
◆ GetLength()
double frc::MechanismLigament2d::GetLength |
( |
| ) |
|
Get the ligament length.
- Returns
- the line length
◆ GetLineWeight()
double frc::MechanismLigament2d::GetLineWeight |
( |
| ) |
|
Get the line thickness.
- Returns
- the line thickness
◆ SetAngle()
void frc::MechanismLigament2d::SetAngle |
( |
units::degree_t |
angle | ) |
|
Set the ligament's angle relative to its parent.
- Parameters
-
◆ SetColor()
void frc::MechanismLigament2d::SetColor |
( |
const Color8Bit & |
color | ) |
|
Set the ligament color.
- Parameters
-
color | the color of the line |
◆ SetLength()
void frc::MechanismLigament2d::SetLength |
( |
double |
length | ) |
|
Set the ligament's length.
- Parameters
-
◆ SetLineWeight()
void frc::MechanismLigament2d::SetLineWeight |
( |
double |
lineWidth | ) |
|
Set the line thickness.
- Parameters
-
lineWidth | the line thickness |
◆ UpdateEntries()
void frc::MechanismLigament2d::UpdateEntries |
( |
std::shared_ptr< nt::NetworkTable > |
table | ) |
|
|
overrideprotectedvirtual |
The documentation for this class was generated from the following file: