Class Translation2dStruct
java.lang.Object
edu.wpi.first.math.geometry.struct.Translation2dStruct
- All Implemented Interfaces:
Struct<Translation2d>
-
Field Summary
Fields inherited from interface edu.wpi.first.util.struct.Struct
kSizeBool, kSizeDouble, kSizeFloat, kSizeInt16, kSizeInt32, kSizeInt64, kSizeInt8 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the schema.intgetSize()Gets the serialized size (in bytes).Gets the Class object for the stored value.Gets the type name (e.g.booleanReturns whether or not objects are immutable.voidpack(ByteBuffer bb, Translation2d value) Puts object contents to a ByteBuffer starting at the current position.unpack(ByteBuffer bb) Deserializes an object from a raw struct serialized ByteBuffer starting at the current position.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.util.struct.Struct
clone, getNested, getTypeString, isCloneable, unpackInto
-
Constructor Details
-
Translation2dStruct
public Translation2dStruct()
-
-
Method Details
-
getTypeClass
Description copied from interface:StructGets the Class object for the stored value.- Specified by:
getTypeClassin interfaceStruct<Translation2d>- Returns:
- Class
-
getTypeName
Description copied from interface:StructGets the type name (e.g. for schemas of other structs). This should be globally unique among structs.- Specified by:
getTypeNamein interfaceStruct<Translation2d>- Returns:
- type name
-
getSize
Description copied from interface:StructGets the serialized size (in bytes). This should always be a constant.- Specified by:
getSizein interfaceStruct<Translation2d>- Returns:
- serialized size
-
getSchema
Description copied from interface:StructGets the schema.- Specified by:
getSchemain interfaceStruct<Translation2d>- Returns:
- schema
-
unpack
Description copied from interface:StructDeserializes an object from a raw struct serialized ByteBuffer starting at the current position. Will increment the ByteBuffer position by getStructSize() bytes. Will not otherwise modify the ByteBuffer (e.g. byte order will not be changed).- Specified by:
unpackin interfaceStruct<Translation2d>- Parameters:
bb- ByteBuffer- Returns:
- New object
-
pack
Description copied from interface:StructPuts object contents to a ByteBuffer starting at the current position. Will increment the ByteBuffer position by getStructSize() bytes. Will not otherwise modify the ByteBuffer (e.g. byte order will not be changed).- Specified by:
packin interfaceStruct<Translation2d>- Parameters:
bb- ByteBuffervalue- object to serialize
-
isImmutable
Description copied from interface:StructReturns whether or not objects are immutable. Immutable objects must also be comparable using the equals() method. Default implementation returns false.- Specified by:
isImmutablein interfaceStruct<Translation2d>- Returns:
- True if object is immutable
-