Exemplo n.º 1
0
        static Offset <FEulerTransform> build_euler_transform(FlatBufferBuilder b, IHasEulerTransform observer)
        {
            Vector3 pos = observer.Position, rot = observer.Rotation, dir = observer.Direction;

            return(FEulerTransform.CreateFEulerTransform(
                       b,
                       pos.x,
                       pos.y,
                       pos.z,
                       rot.x,
                       rot.y,
                       rot.z,
                       dir.x,
                       dir.y,
                       dir.z));
        }
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="b"></param>
        /// <param name="sensor"></param>
        /// <returns></returns>
        static Offset <FETObs> Serialise(FlatBufferBuilder b, IHasEulerTransform sensor)
        {
            FETObs.StartFETObs(b);
            Vector3 pos = sensor.Position, rot = sensor.Rotation, dir = sensor.Direction;

            FETObs.AddTransform(b,
                                FEulerTransform.CreateFEulerTransform(b,
                                                                      pos.x,
                                                                      pos.y,
                                                                      pos.z,
                                                                      rot.x,
                                                                      rot.y,
                                                                      rot.z,
                                                                      dir.x,
                                                                      dir.y,
                                                                      dir.z));

            return(FETObs.EndFETObs(b));
        }