예제 #1
0
 public void Set(SObjectStraight Obj_)
 {
     Time = Obj_.Time;
     PosTheta.Set(Obj_.PosTheta);
     Speed = Obj_.Speed;
     Dist  = Obj_.Dist;
 }
예제 #2
0
 public SObjectStraight(SObjectStraight Obj_)
 {
     Time     = Obj_.Time;
     PosTheta = Obj_.PosTheta;
     Speed    = Obj_.Speed;
     Dist     = Obj_.Dist;
 }
예제 #3
0
        public static SPoint GetCurPos(this SObjectStraight ObjectStraight_, float Time_)
        {
            if (ObjectStraight_.Dist == 0.0f)
            {
                return(ObjectStraight_.PosTheta.Pos);
            }

            var CurDist = ObjectStraight_.Speed * (Time_ - ObjectStraight_.Time);

            if (CurDist > ObjectStraight_.Dist)
            {
                CurDist = ObjectStraight_.Dist;
                ObjectStraight_.Dist = 0.0f;
                ObjectStraight_.Time = Time_;
                return(ObjectStraight_.PosTheta.Pos.Add(CBase.Vector(ObjectStraight_.PosTheta.Theta, CurDist)));
            }
            else
            {
                return(ObjectStraight_.PosTheta.Pos.GetAdd(CBase.Vector(ObjectStraight_.PosTheta.Theta, CurDist)));
            }
        }
예제 #4
0
 public static SPosTheta GetCurPosTheta(this SObjectStraight ObjectStraight_, float Time_)
 {
     return(new SPosTheta(GetCurPos(ObjectStraight_, Time_), ObjectStraight_.PosTheta.Theta));
 }
예제 #5
0
 public CObjectStraight(SObjectStraight ObjectStraight_) :
     base(ObjectStraight_)
 {
 }