mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilib] Impove Mechanism2D documentation (NFC) (#3584)
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Visual 2D representation of arms, elevators, and general mechanisms; through
|
||||
* Visual 2D representation of arms, elevators, and general mechanisms through
|
||||
* a node-based API.
|
||||
*
|
||||
* A Mechanism2d object is published and contains at least one root node. Other
|
||||
* nodes (such as ligaments) are recursively based on other nodes.
|
||||
* A Mechanism2d object is published and contains at least one root node. A root
|
||||
* is the anchor point of other nodes (such as ligaments). Other nodes are
|
||||
* recursively appended based on other nodes.
|
||||
*
|
||||
* Except for the Mechanism2d container object, none of the objects should be
|
||||
* passed or interacted with by value! Obtain pointers from factory methods such
|
||||
@@ -42,6 +43,9 @@ class Mechanism2d : public nt::NTSendable,
|
||||
/**
|
||||
* Create a new Mechanism2d with the given dimensions and background color.
|
||||
*
|
||||
* The dimensions represent the canvas that all the nodes are drawn on. The
|
||||
* default color is dark blue.
|
||||
*
|
||||
* @param width the width
|
||||
* @param height the height
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,9 @@ namespace frc {
|
||||
/**
|
||||
* Ligament node on a Mechanism2d.
|
||||
*
|
||||
* A ligament can have its length changed (like an elevator) or angle changed,
|
||||
* like an arm.
|
||||
*
|
||||
* @see Mechanism2d
|
||||
*/
|
||||
class MechanismLigament2d : public MechanismObject2d {
|
||||
|
||||
@@ -16,8 +16,12 @@ namespace frc {
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* <p>Append other nodes by using Append().
|
||||
*/
|
||||
class MechanismRoot2d : private MechanismObject2d {
|
||||
friend class Mechanism2d;
|
||||
|
||||
Reference in New Issue
Block a user