Esempio n. 1
0
 internal TransformPatchInfo(Guid id, RigidBodyTransform transform, MotionType mType)
 {
     Id                 = id;
     motionType         = mType;
     Transform          = new TransformPatch();
     Transform.Position = new Vector3Patch(transform.Position);
     Transform.Rotation = new QuaternionPatch(transform.Rotation);
 }
Esempio n. 2
0
            public OneActorUpdate(Guid id, Godot.Vector3 localPos, Godot.Quat localQuat,
                                  Godot.Vector3 appPos, Godot.Quat appQuat)
            {
                localTransform = new TransformPatch();
                appTransform   = new TransformPatch();

                localTransform.Position = new Vector3Patch(localPos);
                localTransform.Rotation = new QuaternionPatch(localQuat);

                appTransform.Position = new Vector3Patch(appPos);
                appTransform.Rotation = new QuaternionPatch(appQuat);

                actorGuid = id;
            }
Esempio n. 3
0
            public OneActorUpdate(Guid id, UnityEngine.Vector3 localPos, UnityEngine.Quaternion localQuat,
                                  UnityEngine.Vector3 appPos, UnityEngine.Quaternion appQuat)
            {
                localTransform = new TransformPatch();
                appTransform   = new TransformPatch();

                localTransform.Position = new Vector3Patch(localPos);
                localTransform.Rotation = new QuaternionPatch(localQuat);

                appTransform.Position = new Vector3Patch(appPos);
                appTransform.Rotation = new QuaternionPatch(appQuat);

                actorGuid = id;
            }
Esempio n. 4
0
 /// test if the two actor updates are equal
 public bool isEqual(OneActorUpdate inUpdate, float eps = 0.0001F)
 {
     return((inUpdate.actorGuid == actorGuid) &&
            TransformPatch.areTransformsEqual(localTransform, inUpdate.localTransform, eps) &&
            TransformPatch.areTransformsEqual(appTransform, inUpdate.appTransform, eps));
 }