Record Class LibVisionIO.TargetObservation
java.lang.Object
java.lang.Record
com.flarerobotics.lib.subsystem.vision.LibVisionIO.TargetObservation
- Enclosing interface:
- LibVisionIO
public static record LibVisionIO.TargetObservation(edu.wpi.first.math.geometry.Rotation2d tx, edu.wpi.first.math.geometry.Rotation2d ty)
extends Record
Represents the angle to a simple target, not used for pose estimation.
-
Constructor Summary
ConstructorsConstructorDescriptionTargetObservation
(edu.wpi.first.math.geometry.Rotation2d tx, edu.wpi.first.math.geometry.Rotation2d ty) Creates an instance of aTargetObservation
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.edu.wpi.first.math.geometry.Rotation2d
tx()
Returns the value of thetx
record component.edu.wpi.first.math.geometry.Rotation2d
ty()
Returns the value of thety
record component.
-
Constructor Details
-
TargetObservation
public TargetObservation(edu.wpi.first.math.geometry.Rotation2d tx, edu.wpi.first.math.geometry.Rotation2d ty) Creates an instance of aTargetObservation
record class.- Parameters:
tx
- the value for thetx
record componentty
- the value for thety
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
public edu.wpi.first.math.geometry.Rotation2d tx()Returns the value of thetx
record component.- Returns:
- the value of the
tx
record component
-
ty
public edu.wpi.first.math.geometry.Rotation2d ty()Returns the value of thety
record component.- Returns:
- the value of the
ty
record component
-