/// <summary> /// Write this packet to a stream. /// </summary> /// <param name="bw">The stream.</param> public override void Write(BinaryWriter bw) { DirX.Write(bw); DirY.Write(bw); DirZ.Write(bw); bw.Write(Color); bw.Write((byte)0); }
/// <summary> /// Write this packet to a stream. /// </summary> /// <param name="bw">The stream.</param> public override void Write(BinaryWriter bw) { if (CameraType == CameraTypes.PositionAndAngle) { if (HasPosAndRef) { TransX.Write(bw); TransY.Write(bw); TransZ.Write(bw); RotX.Write(bw); RotY.Write(bw); RotZ.Write(bw); } if (HasZAngle) { ZAngle.Write(bw); } } else { if (HasRotation) { RotX.Write(bw); RotY.Write(bw); RotZ.Write(bw); } if (HasTranslation) { TransX.Write(bw); TransY.Write(bw); TransZ.Write(bw); } } }