public void CatchBlock2(Player sender, BlockChangeEventArgs args) { args.Unregister(); Vector3S FirstBlock = (Vector3S)sender.GetDatapass("CmdDatapassExample_FirstBlock"); Vector3S SecondBlock = new Vector3S(args.X, args.Z, args.Y); sender.SendMessage("This is where we would initiate a Cuboid!"); }
public void Use(Entity.Player p, string[] args) { if (args.Length == 1 && args[0] == "stop") { p.OnPlayerRotate.Normal -= OnPlayerRotate_Normal; p.OnPlayerMove.Normal -= OnPlayerMove_Normal; p.OnPlayerBigMove.Normal -= OnPlayerBigMove_Normal; p.OnPlayerBlockChange.Normal -= OnPlayerBlockChange_Normal; if (p.ExtraData["Cursor"] != null) { Vector3S old; if (p.ExtraData["Cursor"].GetType() == typeof(Vector3S)) old = (Vector3S)p.ExtraData["Cursor"]; else { old = new Vector3S(); old.FromString((string)p.ExtraData["Cursor"]); } p.SendBlockChange((ushort)old.x, (ushort)old.z, (ushort)old.y, p.Level.GetBlock(old)); p.ExtraData["Cursor"] = null; } if (p.ExtraData["CursorGlassCenter"] != null) { Vector3S old; if (p.ExtraData["CursorGlassCenter"].GetType() == typeof(Vector3S)) old = (Vector3S)p.ExtraData["CursorGlassCenter"]; else { old = new Vector3S(); old.FromString((string)p.ExtraData["CursorGlassCenter"]); } p.ResendBlockChange(surrounder, old); } return; } p.OnPlayerRotate.Normal += OnPlayerRotate_Normal; p.OnPlayerMove.Normal += OnPlayerMove_Normal; p.OnPlayerBigMove.Normal += OnPlayerBigMove_Normal; p.OnPlayerBlockChange.Normal += OnPlayerBlockChange_Normal; }
static Vector3S[] ReadVector3SArray(this BinaryReader br) { Vector3S[] ret = new Vector3S[br.ReadInt32()]; for (int i = 0; i < ret.Length; i++) { ret[i] = br.ReadVector3S(); } return ret; }
private static void BufferAdd(ICollection <Pos> list, Vector3S type) { Pos pos; pos.pos = type; list.Add(pos); }
//TODO: fix if target is to close at origin IEnumerable<Vector3S> BlockString(string text, Vector3S origin, Vector3S target, Vector3S lvlSize) { Font font = new Font("Sans-serief",12); Image tmp = new Bitmap(1000, 1000); Bitmap img = new Bitmap((int)Graphics.FromImage(tmp).MeasureString(text, font).Width, (int)Graphics.FromImage(tmp).MeasureString(text, font).Height); tmp = null; Graphics g = Graphics.FromImage(img); g.FillRectangle(Brushes.White, 0, 0, img.Width, img.Height); g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixel; g.DrawString(text, font, Brushes.Black, new PointF(0, 0)); List<Vector3S> path = new List<Vector3S>(); foreach (Vector3S p in origin.PathTo(target)) { path.Add(p); } if (path.Count < 2) yield break; for (int x = 0; x < img.Width; x++) { for (int y = 0; y < img.Height; y++) { if (img.GetPixel(x, y).ToArgb() != Color.White.ToArgb()) { Vector3S ret = new Vector3S(); ret.x = (short)(origin.x + ((path[x % path.Count].x - origin.x) + (path[path.Count - 1].x - origin.x + path[1].x - origin.x) * (x / path.Count))); ret.y = (short)(origin.y + ((path[x % path.Count].y - origin.y) + (path[path.Count - 1].y - origin.y + path[1].y - origin.y) * (x / path.Count)) + img.Height - y); ret.z = (short)(origin.z + ((path[x % path.Count].z - origin.z) + (path[path.Count - 1].z - origin.z + path[1].z - origin.z) * (x / path.Count))); if (ret.x < lvlSize.x && ret.y < lvlSize.y && ret.z < lvlSize.z && ret.x >= 0 && ret.y >= 0 && ret.z >= 0) yield return ret; } } } }
static Vector3S ReadVector3S(this BinaryReader br) { Vector3S ret = new Vector3S(); ret.x = br.ReadInt16(); ret.z = br.ReadInt16(); ret.y = br.ReadInt16(); return ret; }
IEnumerable<Utils.Vector3S> IBrush.Draw(Vector3S pos, byte block, int size) { Vector3S mVec = pos - (size / 2); for (ushort x= 0; x < size; x++) for (ushort y = 0; y < size; y++) for (short z = 0; z < size; z++) yield return new Vector3S((ushort)(x + mVec.x),(ushort) (z + mVec.z ) , (ushort)( y + mVec.y)); yield return pos; }
public void CatchBlock(Player sender, BlockChangeEventArgs args) { args.Unregister(); Vector3S FirstBlock = new Vector3S(args.X, args.Z, args.Y); sender.SendMessage("Please place another block..."); sender.SetDatapass("CmdDatapassExample_FirstBlock", FirstBlock); sender.OnPlayerBlockChange.Normal += new BlockChangeEvent.EventHandler(CatchBlock2); }
private Level(Vector3S size) { Size = size; //data = new byte[Size.x, Size.z, Size.y]; Data = new byte[TotalBlocks]; ExtraData = new Dictionary<object, object>(); }
bool onlyAirBetween(Vector3S start, Vector3S end) { Vector3D s = new Vector3D(start); Vector3D e = new Vector3D(end); while ((s - e).Length > 1) { if (AirMap[(int)s.x, (int)s.z, (int)s.y] == TriBool.True) return false; } return true; }
static Vector3S ReadVector3S(this BinaryReader br) { Vector3S ret = new Vector3S(); ret.x = br.ReadInt16(); ret.z = br.ReadInt16(); ret.y = br.ReadInt16(); return(ret); }
static Vector3S[] ReadVector3SArray(this BinaryReader br) { Vector3S[] ret = new Vector3S[br.ReadInt32()]; for (int i = 0; i < ret.Length; i++) { ret[i] = br.ReadVector3S(); } return(ret); }
/// <summary> /// Initializes a new instance of the <see cref="PacketSpawnPlayer"/> class. /// </summary> public PacketSpawnPlayer(byte ID, string Name, Vector3S Location, byte Yaw, byte Pitch) : base(PacketIDs.SpawnPlayer) { this.ID = ID; this.Location = Location; this.Yaw = Yaw; this.Pitch = Pitch; this.Name = Name; }
/// <summary> /// Returns false if the message was only updated /// </summary> /// <param name="l"></param> /// <param name="v"></param> /// <param name="message"></param> /// <returns></returns> public bool Add(Level l, Vector3S v, string message) { bool ret = false; if (!store[l.Name].Contains(v)) { store[l.Name].Add(v); ret = true; } l.ExtraData["MessageBlock" + v] = message; return ret; }
public void Use(Player p, string[] args) { if (args.Count() != 0) { Help(p); return; } Vector3S meep = new Vector3S((short)(p.Level.SpawnPos.x * 32), (short)(p.Level.SpawnPos.z * 32 + 51), (short)(p.Level.SpawnPos.y * 32)); p.SendToPos(meep, p.Level.SpawnRot); }
/// <summary> /// Gets a layer of near blocks. /// </summary> /// <param name="v">The v.</param> /// <param name="radiusX">The radius X.</param> /// <param name="radiusZ">The radius Z.</param> /// <param name="radiusY">The radius Y.</param> /// <returns></returns> public static IEnumerable <Vector3S> GetNearBlocksHollow(this Vector3S v, int radiusX, int radiusZ, int radiusY) { if (radiusX == radiusZ && radiusZ == radiusY) { for (int x = 0; x < radiusX; x++) { for (int z = 0; z < radiusX; z++) { for (int y = 0; y < radiusX; y++) { Vector3S ret = new Vector3S((short)(v.x + x), (short)(v.z + z), (short)(v.y + y)); double l = (v - ret).Distance; if (l <= radiusX && l >= radiusX - 1) { yield return(ret); if (x != 0) { yield return(new Vector3S((short)(v.x - x), (short)(v.z + z), (short)(v.y + y))); if (z != 0) { yield return(new Vector3S((short)(v.x - x), (short)(v.z - z), (short)(v.y + y))); if (y != 0) { yield return(new Vector3S((short)(v.x - x), (short)(v.z - z), (short)(v.y - y))); } } } if (z != 0) { yield return(new Vector3S((short)(v.x + x), (short)(v.z - z), (short)(v.y + y))); if (y != 0) { yield return(new Vector3S((short)(v.x + x), (short)(v.z - z), (short)(v.y - y))); } } if (y != 0) { yield return(new Vector3S((short)(v.x + x), (short)(v.z + z), (short)(v.y - y))); if (x != 0) { yield return(new Vector3S((short)(v.x - x), (short)(v.z + z), (short)(v.y - y))); } } } } } } } }
public static void AddHexString(this List <Vector3S> list, string str) { string[] split = str.Split('\n'); Vector3S[] vectors = new Vector3S[split.Length]; for (int i = 0; i < vectors.Length; i++) { vectors[i] = new Vector3S(); vectors[i].FromHexString(split[i]); } list.AddRange(vectors); //it's faster to add them all i think }
public void Use(Player p, string[] args) { if (args.Count() != 0) { Help(p); return; } Vector3S meep = new Vector3S((short)(p.Pos.x / 32), (short)(p.Pos.z / 32), (short)(p.Pos.y / 32)); p.Level.SpawnPos = meep; p.Level.SpawnRot = p.Rot; p.SendMessage("Spawn location changed."); }
public override void ReadPacket(byte[] data) { Position = new Vector3S(){ x = ReadShort(data, 0), y = ReadShort(data, 2), z = ReadShort(data, 4) }; BlockDeleted = data[5] == 0x00; Block = data[6]; }
public static string GetOwner(Vector3S e, string level) { using (var data = Database.fillData("SELECT * FROM Blocks WHERE X = '" + e.x + "' AND Y = '" + e.y + "' AND Z = '" + e.z + "' AND Level = '" + level.SqlEscape() + "';")) { if (data.Rows.Count == 0) { return null; } using (var playerData = Database.fillData("SELECT * FROM _players WHERE UID = " + data.Rows[0]["UID"].ToString().SqlEscape())) { if (playerData.Rows.Count == 0) return null; return playerData.Rows[0]["Name"].ToString(); } } }
public void BC2(Player p, BlockChangeEventArgs args) { Vector3S _s = new Vector3S(); p.ExtraData["Mark2"] = new Vector3S(args.X, args.Z, args.Y); p.SendMessage("Second coordinate marked. (" + args.X + ", " + args.Z + ", " + args.Y + ")"); args.Unregister(); args.Cancel(); Vector3S m1 = (Vector3S)p.ExtraData["Mark1"]; Vector3S m2 = (Vector3S)p.ExtraData["Mark2"]; p.SendMessage("Marked coordinates:"); p.SendMessage("(" + m1.x + ", " + m1.z + ", " + m1.y + "), (" + m2.x + ", " + m2.z + ", " + m2.y + ")"); p.ExtraData["HasMarked"] = true; }
/// <summary> /// Gets the neighbors. /// </summary> /// <param name="v">The position.</param> /// <returns></returns> public static IEnumerable <Vector3S> GetNeighbors(this Vector3S v) { yield return(new Vector3S((short)(v.x + 1), v.z, v.y)); yield return(new Vector3S(v.x, (short)(v.z + 1), v.y)); yield return(new Vector3S(v.x, v.z, (short)(v.y + 1))); yield return(new Vector3S((short)(v.x - 1), v.z, v.y)); yield return(new Vector3S(v.x, (short)(v.z - 1), v.y)); yield return(new Vector3S(v.x, v.z, (short)(v.y - 1))); }
/// <summary> /// Draws the on level. /// </summary> /// <param name="mLevel">The level to draw on.</param> /// <param name="startPos">The start pos.</param> /// <param name="blockOverlay">A block to set the component as. If it is not already set</param> /// <remarks>if the block in the component is set to 255 a block overlay will be used automaticly, no block change will occur if the block is at 254</remarks> public void DrawOnLevel(Level mLevel, Vector3S startPos, Direction dir, byte blockOverlay = 1) { for (int i = 0; i < components.Length; i++) { var comp = components[i]; if (comp.Block == 254) continue; switch (dir) { case Direction.East: mLevel.SetBlock(comp.Pos + startPos, comp.Block == 255 ? blockOverlay : comp.Block); break; case Direction.West: mLevel.SetBlock(comp.Pos - startPos, comp.Block == 255 ? blockOverlay : comp.Block); break; } } }
/// <summary> /// A robot (entity) that appears in the world. /// </summary> public Bot(string Username, Vector3S Position, byte[] Rotation, Level level, bool FollowPlayers, bool BreakBlocks, bool Jumping) { Player = new Player(); Player.IsBot = true; Player.Username = Username; Player.Pos = Position; Player.oldPos = new Vector3S(Position.x, Position.z, Position.y); Player.Rot = Rotation; Player.Level = level; Player.id = FreeId(); Server.Bots.Add(this); SpawnThisBotToOtherPlayers(this); this.FollowPlayers = FollowPlayers; this.BreakBlocks = BreakBlocks; this.Jumping = Jumping; }
public void Use(Player p, string[] args) { if (args.Count() != 0) { Help(p); return; } Vector3S meep = new Vector3S((short)(16 + p.Level.CWMap.SpawnPos.x * 32), (short)(16 + p.Level.CWMap.SpawnPos.z * 32), (short)(p.Level.CWMap.SpawnPos.y * 32)); Packet pa = new Packet(); pa.Add(Packet.Types.SendTeleport); pa.Add((byte)0xff); pa.Add(meep.x); pa.Add(meep.y); pa.Add(meep.z); pa.Add(new byte[2] { (byte)p.Level.CWMap.SpawnRotation.x, (byte)p.Level.CWMap.SpawnRotation.z }); p.SendPacket(pa); }
public void Use(Player p, string[] args) { if (args.Count() != 0) { Help(p); return; } Vector3S meep = new Vector3S((short)(p.Level.SpawnPos.x * 32), (short)(p.Level.SpawnPos.z * 32 + 51), (short)(p.Level.SpawnPos.y * 32)); Packet pa = new Packet(); pa.Add(Packet.Types.SendTeleport); pa.Add(unchecked((byte)-1)); //If the ID is not greater than one it doesn't work :c pa.Add(meep.x); pa.Add(meep.y); pa.Add(meep.z); pa.Add(p.Rot); p.SendPacket(pa); }
//TODO Make this more customizeable public void Use(Player p, string[] args) { Vector3S size; string type = ""; switch (args.Length) // initialize depending on arguments given { case 1: size = new Vector3S(64, 64, 32); break; case 4: size = new Vector3S(short.Parse(args[1]), short.Parse(args[2]), short.Parse(args[3])); break; case 5: size = new Vector3S(short.Parse(args[1]), short.Parse(args[2]), short.Parse(args[3])); type = args[4]; break; default: Help(p); return; } if (Level.FindLevel(args[0]) != null || !Level.UnloadedLevels.TrueForAll((s) => { return !s.ToLower().Contains(args[0].ToLower()); })) { p.SendMessage("This level already exists!"); return; } Level temp = null; switch (type.ToLower()) // experimental type finding { case "flat": temp = Level.CreateLevel(size, Level.LevelTypes.Flat, args[0]); break; default: temp = Level.CreateLevel(size, Level.LevelTypes.Flat, args[0]); break; } if (temp == null) { p.SendMessage("Level creation failed"); return; } // something is wrong if you get this temp.CWMap.MapName = temp.Name; temp.SaveToBinary(); temp=Level.LoadLevel(args[0]); //calls level load event Level.AddLevel(temp); Player.UniversalChat("Created level " + args[0] + "!"); }
public void Use(Player p, string[] args) //TODO Make this more customizeable { Vector3S size; string type = ""; switch (args.Length) // initialize depending on arguments given { case 1: size = new Vector3S(64, 64, 32); break; case 4: size = new Vector3S(short.Parse(args[1]), short.Parse(args[2]), short.Parse(args[3])); break; case 5: size = new Vector3S(short.Parse(args[1]), short.Parse(args[2]), short.Parse(args[3])); type = args[4]; break; default: Help(p); return; } if (Level.FindLevel(args[0]) != null) { p.SendMessage("This level already exists!"); return; } Level temp = null; switch (type.ToLower()) // experimental type finding { case "flat": temp = Level.CreateLevel(size, Level.LevelTypes.Flat, args[0]); break; default: temp = Level.CreateLevel(size, Level.LevelTypes.Flat, args[0]); break; } if (temp == null) { p.SendMessage("Level creation failed"); return; } // something is wrong if you get this Level.Levels.Add(temp); temp.SaveToBinary(); Player.UniversalChat("Created level " + args[0] + "!"); }
/// <summary> /// A robot (entity) that appears in the world. /// </summary> public Bot(string Username, Vector3S Position, byte[] Rotation, Level level, bool FollowPlayers, bool BreakBlocks, bool Jumping) { Player = new Player(); Player.IsLoggedIn = false; Player.DisplayName = Username; Player.IsBot = true; Player.Username = Username; Player.Pos = Position; Player.oldPos = new Vector3S(Position.x, Position.z, Position.y); Player.Rot = new Vector2S(Rotation[0], Rotation[1]); Player.Level = level; Player.ID = FreeId(); Server.Bots.Add(this); SpawnThisBotToOtherPlayers(this); Player.IsLoggedIn = true; this.FollowPlayers = FollowPlayers; this.BreakBlocks = BreakBlocks; this.Jumping = Jumping; this.LevelMap = new BotMap(level); this.BlackListPlayers = new Dictionary<string, int>(); Player.OnAllPlayersBlockChange.Important += OnBlockChange; }
public BotMap(Level l) { AirMap = new TriBool[l.CWMap.Size.x, l.CWMap.Size.z, l.CWMap.Size.y];//return x + z * Size.x + y * Size.x * Size.z; Size = l.CWMap.Size; for (int i = 0; i < l.CWMap.BlockData.Length; i++) { Vector3S pos = l.IntToPos(i); if (isAir(l.GetBlock(i))) AirMap[pos.x, pos.z, pos.y] = true; else if (Block.IsOPBlock(l.GetBlock(i))) AirMap[pos.x, pos.z, pos.y] = TriBool.Unknown; else AirMap[pos.x, pos.z, pos.y] = false; } /*for (int x = 0; x < AirMap.GetLength(0); x++) { for (int z = 0; z < AirMap.GetLength(1); z++) { for (int y = 0; y < AirMap.GetLength(2); y++) { } } }*/ }
void OnPlayerBlockChange_Normal(Player sender, BlockChangeEventArgs args) { args.Cancel(); if (args.Current == 0 && args.Action == ActionType.Delete) args.Current = 20; sender.OnPlayerBlockChange.Normal -= OnPlayerBlockChange_Normal; if (sender.ExtraData["Cursor"] != null) { Vector3S cursor; if (sender.ExtraData["Cursor"].GetType() == typeof(Vector3S)) cursor = (Vector3S)sender.ExtraData["Cursor"]; else { cursor = new Vector3S(); cursor.FromString((string)sender.ExtraData["Cursor"]); } if (args.Action == ActionType.Place) { sender.Click((ushort)cursor.x, (ushort)cursor.z, (ushort)(cursor.y + 1), args.Holding); } else { sender.Click((ushort)cursor.x, (ushort)cursor.z, (ushort)(cursor.y), args.Holding, false); } } sender.OnPlayerBlockChange.Normal += OnPlayerBlockChange_Normal; Curse(sender); }
/// <summary> /// Empty level with null/default values that need to be assigned after initialized /// </summary> /// <param name="size">Base size of map (can be changed)</param> public Level(Vector3S size) { Size = size; SpawnPos = size / 2; SpawnRot = new byte[] { 128, 128 }; //data = new byte[Size.x, Size.z, Size.y]; Data = new byte[TotalBlocks]; BackupLevel = true; ExtraData = new ExtraData<object, object>(); //if (ServerSettings.HasKey("PhysicsInterval")) { // physicsSleep = ServerSettings.GetSettingInt("PhysicsInterval"); // } //else physicsSleep = 100; physics = new Thread(() => { //while (!Server.ShuttingDown) { // Thread.Sleep(physicsSleep); // MCForge.Interfaces.Blocks.Block.DoTick(this); //} }); physics.Start(); }
void OnAllPlayersBlockChange_Normal(Player sender, BlockChangeEventArgs args) { Vector3S v = new Vector3S(args.X, args.Z, args.Y); if (store[sender.Level.Name].Contains(v)) { object msg = sender.Level.ExtraData["MessageBlock" + v]; if (msg != null && msg.GetType() == typeof(string) && ((string)msg).Length > 0) { if (((string)msg).StartsWith("c")) { if (removeCommandOnAir && (args.Action == ActionType.Delete || args.Holding == 0)) { Remove(sender.Level, v); } else if (protectBlockType) { args.Cancel(); } } else { if (removeMessageOnAir && (args.Action == ActionType.Delete || args.Holding == 0)) { Remove(sender.Level, v); } else if (protectBlockType) { args.Cancel(); } } } } }
/// <summary> /// Gets a vector where every indices has been signed /// </summary> /// <param name="Vector">The vector.</param> /// <returns>A signed Vector</returns> public static Vector3S SignVector(Vector3S Vector) { return(new Vector3S((short)Math.Sign(Vector.x), (short)Math.Sign(Vector.z), (short)Math.Sign(Vector.y))); }
public Vector3F Cross(Vector3S b) { return(new Vector3F((Y * b.z) - (Z * b.y), (Z * b.x) - (X * b.z), (X * b.y) - (Y * b.x))); }
public int CompareTo(Vector3S other) { return(Math.Sign(LengthSquared - LengthSquared)); }
public float Dot(Vector3S b) { return((X * b.x) + (Y * b.y) + (Z * b.z)); }
static void Write(this BinaryWriter bw, Vector3S v) { bw.Write(v.x); bw.Write(v.z); bw.Write(v.y); }
/// <summary> /// Initializes a new instance of the <see cref="Cuboid"/> class. /// </summary> /// <param name="origin">The <see cref="Vector3D"/>.</param> /// <param name="size">The <see cref="Vector3S"/>.</param> /// <remarks></remarks> public Cuboid(Vector3D origin, Vector3S size) : this(origin, origin + size) { }
/// <summary> /// Gets a vector where every indices has been Math.Absoluted. /// </summary> /// <param name="Vector">The vector.</param> /// <returns>A absoluted Vector</returns> public static Vector3S AbsVector(Vector3S Vector) { return(new Vector3S(Math.Abs(Vector.x), Math.Abs(Vector.z), Math.Abs(Vector.y))); }
public static void FromHexString(this Vector3S v, string s) { v.FromString(s.FromHexString()); }
/*public static string ToString(this object o) { * Type t = o.GetType(); * if (t == typeof(string)) { * return ToHexString((string)o); * } * if (t == typeof(List<string>)) { * return ToHexString((List<string>)o); * } * if (t == typeof(List<Vector3S>)) { * return ToHexString((List<Vector3S>)o); * } * if (t == typeof(Vector3S)) { * return ToHexString((Vector3S)o); * } * if (t == typeof(byte) || t == typeof(ushort) || t == typeof(uint) || t == typeof(ulong)) { * return ((ulong)o).ToString(); * } * if (t == typeof(sbyte) || t == typeof(short) || t == typeof(int) || t == typeof(long)) { * return ((long)o).ToString(); * } * if (t == typeof(double)) { * return ((double)o).ToString(); * } * if (t == typeof(float)) { * return ((float)o).ToString(); * } * if (t == typeof(bool)) { * return ((bool)o).ToString(); * } * return o.ToString(); * }*/ #region Vector3S&Strings public static string ToHexString(this Vector3S v) { return(ToHexString(v.ToString())); }
public Vector3D(Vector3S v) : this(v.x, v.z, v.y) { }
public bool InSpawn(Player p, Vector3S Pos) { if (getTeam(p) == "blue") { if (Math.Abs((Pos.x / 32) - blueSpawn.x) <= 5 && Math.Abs((Pos.z / 32) - blueSpawn.z) <= 5 && Math.Abs((Pos.y / 32) - blueSpawn.y) <= 5) { return true; } } if (getTeam(p) == "red") { if (Math.Abs((Pos.x / 32) - redSpawn.x) <= 5 && Math.Abs((Pos.z / 32) - redSpawn.z) <= 5 && Math.Abs((Pos.y / 32) - redSpawn.y) <= 5) { return true; } } return false; }
internal void SetBlock(Vector3S pos, byte block) { SetBlock(pos.x, pos.z, pos.y, block); }
/// <summary> /// Gets a vector where every indices has been Math.Cosined. /// </summary> /// <param name="Vector">The vector.</param> /// <returns>A cosined Vector</returns> public static Vector3S CosVector(Vector3S Vector) { return(new Vector3S((short)Math.Cos(Vector.x), (short)Math.Cos(Vector.z), (short)Math.Cos(Vector.y))); }
protected void BufferAdd(List<Pos> list, Vector3S type) { Pos pos; pos.pos = type; list.Add(pos); }
public Vector3F(Vector3S other) { X = other.x; Y = other.y; Z = other.z; }