RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
Translation3dProto.java
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5package org.wpilib.math.geometry.proto;
6
7import org.wpilib.math.geometry.Translation3d;
8import org.wpilib.math.geometry.proto.detail.ProtobufTranslation3d;
9import org.wpilib.util.protobuf.Protobuf;
10import us.hebi.quickbuf.Descriptors.Descriptor;
11
12public final class Translation3dProto implements Protobuf<Translation3d, ProtobufTranslation3d> {
13 @Override
14 public Class<Translation3d> getTypeClass() {
15 return Translation3d.class;
16 }
17
18 @Override
19 public Descriptor getDescriptor() {
21 }
22
23 @Override
27
28 @Override
29 public Translation3d unpack(ProtobufTranslation3d msg) {
30 return new Translation3d(msg.getX(), msg.getY(), msg.getZ());
31 }
32
33 @Override
34 public void pack(ProtobufTranslation3d msg, Translation3d value) {
35 msg.setX(value.getX());
36 msg.setY(value.getY());
37 msg.setZ(value.getZ());
38 }
39
40 @Override
41 public boolean isImmutable() {
42 return true;
43 }
44}