File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Assets/MixedRealityToolkit/Definitions/Utilities Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,21 @@ public MixedRealityPose(Quaternion rotation)
5050 public static MixedRealityPose ZeroIdentity { get ; } = new MixedRealityPose ( Vector3 . zero , Quaternion . identity ) ;
5151
5252 [ SerializeField ]
53+ [ Tooltip ( "The position of the pose" ) ]
5354 private Vector3 position ;
5455
56+ /// <summary>
57+ /// The position of the pose.
58+ /// </summary>
5559 public Vector3 Position { get { return position ; } set { position = value ; } }
5660
5761 [ SerializeField ]
62+ [ Tooltip ( "The rotation of the pose." ) ]
5863 private Quaternion rotation ;
5964
65+ /// <summary>
66+ /// The rotation of the pose.
67+ /// </summary>
6068 public Quaternion Rotation { get { return rotation ; } set { rotation = value ; } }
6169
6270 public static MixedRealityPose operator + ( MixedRealityPose left , MixedRealityPose right )
@@ -79,6 +87,21 @@ public override string ToString()
7987 return $ "{ position } | { rotation } ";
8088 }
8189
90+ /// <summary>
91+ /// The Z axis of the pose in world space.
92+ /// </summary>
93+ public Vector3 Forward => rotation * Vector3 . forward ;
94+
95+ /// <summary>
96+ /// The Y axis of the pose in world space.
97+ /// </summary>
98+ public Vector3 Up => rotation * Vector3 . up ;
99+
100+ /// <summary>
101+ /// The X axis of the pose in world space.
102+ /// </summary>
103+ public Vector3 Right => rotation * Vector3 . right ;
104+
82105 #region IEqualityComparer Implementation
83106
84107 bool IEqualityComparer . Equals ( object left , object right )
You can’t perform that action at this time.
0 commit comments