Record Class VisionIO.TargetObservation
java.lang.Object
java.lang.Record
com.stuypulse.robot.subsystems.vision.VisionIO.TargetObservation
- Enclosing interface:
VisionIO
public static record VisionIO.TargetObservation(org.wpilib.math.geometry.Rotation2d tx, org.wpilib.math.geometry.Rotation2d ty)
extends Record
Represents the angle to a simple target, not used for pose estimation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTargetObservation(org.wpilib.math.geometry.Rotation2d tx, org.wpilib.math.geometry.Rotation2d ty) Creates an instance of aTargetObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.org.wpilib.math.geometry.Rotation2dtx()Returns the value of thetxrecord component.org.wpilib.math.geometry.Rotation2dty()Returns the value of thetyrecord component.
-
Field Details
-
tx
The field for thetxrecord component. -
ty
The field for thetyrecord component.
-
-
Constructor Details
-
TargetObservation
public TargetObservation(org.wpilib.math.geometry.Rotation2d tx, org.wpilib.math.geometry.Rotation2d ty) Creates an instance of aTargetObservationrecord class.- Parameters:
tx- the value for thetxrecord componentty- the value for thetyrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
tx
Returns the value of thetxrecord component.- Returns:
- the value of the
txrecord component
-
ty
Returns the value of thetyrecord component.- Returns:
- the value of the
tyrecord component
-