Class MechanismRoot2d

    • Method Detail

      • append

        public <T extends MechanismObject2d> T append​(T object)
        Append a Mechanism object that is based on this one.
        Type Parameters:
        T - The object type.
        Parameters:
        object - the object to add.
        Returns:
        the object given as a parameter, useful for variable assignments and call chaining.
        Throws:
        UnsupportedOperationException - if the object's name is already used - object names must be unique.
      • setPosition

        public void setPosition​(double x,
                                double y)
        Set the root's position.
        Parameters:
        x - new x coordinate
        y - new y coordinate