Class MechanismRoot2d
java.lang.Object
edu.wpi.first.wpilibj.smartdashboard.MechanismObject2d
edu.wpi.first.wpilibj.smartdashboard.MechanismRoot2d
- All Implemented Interfaces:
AutoCloseable
public final class MechanismRoot2d extends MechanismObject2d
Root Mechanism2d node.
A root is the anchor point of other nodes (such as ligaments).
Do not create objects of this class directly! Obtain instances from the Mechanism2d.getRoot(String, double, double)
factory method.
Append other nodes by using MechanismObject2d.append(MechanismObject2d)
.
-
Method Summary
Modifier and Type Method Description void
close()
void
setPosition(double x, double y)
Set the root's position.protected void
updateEntries(NetworkTable table)
Update this object's entries with new ones from a new table.
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classMechanismObject2d
-
setPosition
Set the root's position.- Parameters:
x
- new x coordinatey
- new y coordinate
-
updateEntries
Description copied from class:MechanismObject2d
Update this object's entries with new ones from a new table.- Specified by:
updateEntries
in classMechanismObject2d
- Parameters:
table
- the new table.
-