RobotCore
1.0
WPILib port to raspberry Pi
Toggle main menu visibility
Loading...
Searching...
No Matches
Rotation3dStruct.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
5
package
org.wpilib.math.geometry.struct;
6
7
import
java.nio.ByteBuffer;
8
import
org.wpilib.math.geometry.Quaternion;
9
import
org.wpilib.math.geometry.Rotation3d;
10
import
org.wpilib.util.struct.Struct;
11
12
public
final
class
Rotation3dStruct
implements
Struct
<Rotation3d> {
13
@Override
14
public
Class<Rotation3d>
getTypeClass
() {
15
return
Rotation3d
.class;
16
}
17
18
@Override
19
public
String
getTypeName
() {
20
return
"Rotation3d"
;
21
}
22
23
@Override
24
public
int
getSize
() {
25
return
Quaternion
.
struct
.
getSize
();
26
}
27
28
@Override
29
public
String
getSchema
() {
30
return
"Quaternion q"
;
31
}
32
33
@Override
34
public
Struct<?>
[]
getNested
() {
35
return
new
Struct<?>
[] {
Quaternion
.
struct
};
36
}
37
38
@Override
39
public
Rotation3d
unpack
(ByteBuffer bb) {
40
Quaternion
q =
Quaternion
.
struct
.
unpack
(bb);
41
return
new
Rotation3d
(q);
42
}
43
44
@Override
45
public
void
pack(ByteBuffer bb,
Rotation3d
value) {
46
Quaternion
.
struct
.pack(bb, value.
getQuaternion
());
47
}
48
49
@Override
50
public
boolean
isImmutable
() {
51
return
true
;
52
}
53
}
org.wpilib.math.geometry.Quaternion
Definition
Quaternion.java:19
org.wpilib.math.geometry.Quaternion.struct
static final QuaternionStruct struct
Definition
Quaternion.java:395
org.wpilib.math.geometry.Rotation3d
Definition
Rotation3d.java:71
org.wpilib.math.geometry.Rotation3d.getQuaternion
Quaternion getQuaternion()
Definition
Rotation3d.java:476
org.wpilib.math.geometry.Rotation3d.Rotation3d
Rotation3d()
Definition
Rotation3d.java:83
org.wpilib.math.geometry.struct.QuaternionStruct.getSize
int getSize()
Definition
QuaternionStruct.java:23
org.wpilib.math.geometry.struct.QuaternionStruct.unpack
Quaternion unpack(ByteBuffer bb)
Definition
QuaternionStruct.java:33
org.wpilib.math.geometry.struct.Rotation3dStruct
Definition
Rotation3dStruct.java:12
org.wpilib.math.geometry.struct.Rotation3dStruct.getSchema
String getSchema()
Definition
Rotation3dStruct.java:29
org.wpilib.math.geometry.struct.Rotation3dStruct.getTypeClass
Class< Rotation3d > getTypeClass()
Definition
Rotation3dStruct.java:14
org.wpilib.math.geometry.struct.Rotation3dStruct.getNested
Struct<?>[] getNested()
Definition
Rotation3dStruct.java:34
org.wpilib.math.geometry.struct.Rotation3dStruct.isImmutable
boolean isImmutable()
Definition
Rotation3dStruct.java:50
org.wpilib.math.geometry.struct.Rotation3dStruct.getSize
int getSize()
Definition
Rotation3dStruct.java:24
org.wpilib.math.geometry.struct.Rotation3dStruct.unpack
Rotation3d unpack(ByteBuffer bb)
Definition
Rotation3dStruct.java:39
org.wpilib.math.geometry.struct.Rotation3dStruct.getTypeName
String getTypeName()
Definition
Rotation3dStruct.java:19
org.wpilib.util.struct.Struct
Definition
Struct.java:22
org
wpilib
math
geometry
struct
Rotation3dStruct.java
Generated by
1.18.0