Package frc.spectrumLib.sim
Interface Mount
public interface Mount
Represents a simulation component that other mechanisms can be attached to. Implementations
expose their current position and angle so child mechanisms can update their own position each
simulation period.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDiscriminates between the two supported mount types so child mechanisms can apply the correct positioning logic. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetAngle()Returns the current absolute angle of this mount in radians.doubleReturns the horizontal displacement of this mount from its initial position (metres).doubleReturns the vertical displacement of this mount from its initial position (metres).Returns the type of this mount, used by child mechanisms to select positioning logic.doubleReturns the X coordinate that child mechanisms should use as their attachment point (metres).doubleReturns the Y coordinate that child mechanisms should use as their attachment point (metres).
-
Method Details
-
getMountType
Mount.MountType getMountType()Returns the type of this mount, used by child mechanisms to select positioning logic.- Returns:
- this mount's
Mount.MountType
-
getDisplacementX
double getDisplacementX()Returns the horizontal displacement of this mount from its initial position (metres).- Returns:
- horizontal displacement in metres
-
getDisplacementY
double getDisplacementY()Returns the vertical displacement of this mount from its initial position (metres).- Returns:
- vertical displacement in metres
-
getAngle
double getAngle()Returns the current absolute angle of this mount in radians.- Returns:
- angle in radians
-
getMountX
double getMountX()Returns the X coordinate that child mechanisms should use as their attachment point (metres).- Returns:
- mount X position in metres
-
getMountY
double getMountY()Returns the Y coordinate that child mechanisms should use as their attachment point (metres).- Returns:
- mount Y position in metres
-