Root Mechanism2d node.
More...
#include <frc/smartdashboard/MechanismRoot2d.h>
Root Mechanism2d node.
A root is the anchor point of other nodes (such as ligaments).
Do not create objects of this class directly! Obtain pointers from the Mechanism2d.GetRoot() factory method.
Append other nodes by using Append().
◆ MechanismRoot2d()
frc::MechanismRoot2d::MechanismRoot2d |
( |
std::string_view |
name, |
|
|
double |
x, |
|
|
double |
y, |
|
|
const private_init & |
|
|
) |
| |
◆ Append()
template<typename T , typename... Args>
requires std::convertible_to<T*,
MechanismObject2d*>
Append a Mechanism object that is based on this one.
- Parameters
-
name | the name of the new object. |
args | constructor arguments of the object type. |
- Returns
- the constructed and appended object, useful for variable assignments and call chaining.
- Exceptions
-
if | an object with the given name already exists. |
◆ GetName()
const std::string & frc::MechanismObject2d::GetName |
( |
| ) |
const |
Retrieve the object's name.
- Returns
- the object's name relative to its parent.
◆ SetPosition()
void frc::MechanismRoot2d::SetPosition |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Set the root's position.
- Parameters
-
x | new x coordinate |
y | new y coordinate |
◆ Mechanism2d
The documentation for this class was generated from the following file: