コード例 #1
0
        public override CmdResult ExecuteRequest(CmdRequest args)
        {
            SimPosition pos;

            if (!args.TryGetValue("pos", out pos))
            {
                pos = TheSimAvatar;
            }
            SimPathStore R  = pos.PathStore;
            Vector3      v3 = pos.SimPosition;

            WriteLine("SimZInfo: " + pos + " " + R.GetGroundLevel(v3.X, v3.Y));
            SimWaypoint WP = R.GetWaypointOf(v3);

            WriteLine("WaypointInfo: {0}", WP.OccupiedString(R.GetCollisionPlane(v3.Z)));
            return(Success("Ran " + Name));
        }
コード例 #2
0
        //public static Vector3 RoundPoint(Vector3 vect3, SimPathStore PathStore)
        //{
        //    double POINTS_PER_METER = PathStore.POINTS_PER_METER;
        //    vect3.X = (float)(Math.Round(vect3.X * POINTS_PER_METER, 0) / POINTS_PER_METER);
        //    vect3.Y = (float)(Math.Round(vect3.Y * POINTS_PER_METER, 0) / POINTS_PER_METER);
        //    vect3.Z = (float)(Math.Round(vect3.Z * POINTS_PER_METER, 0) / POINTS_PER_METER);
        //    return vect3;
        //}

        public static SimWaypoint CreateLocal(Vector3 from, SimPathStore PathStore)
        {
            return(CreateLocal(from, PathStore.GetCollisionPlane(from.Z)));
        }