Example #1
0
        public void RoomVertexRenderingEffect(UInt16 value, libtr2.RoomRenderingEffect result)
        {
            var basevert = new libtr1.Vertex(0, 0, 0);
            var roomvert = new libtr2.RoomVertex(basevert, 0, value, 0);

            Assert.That(roomvert.Attributes == result);
        }
Example #2
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR1.RoomPortal"/> struct.
		/// </summary>
		/// <param name="adjoiningroom">The id of the adjoining room.</param>
		/// <param name="normal">The normal vertex.</param>
		/// <param name="vertices">The vertices.</param>
		public RoomPortal (UInt16 adjoiningroom, Vertex normal, Vertex [] vertices) : this () {

			// Check array size
			if (vertices.Length != 4)
				throw new ArgumentException ("Vertex array must contain exactly four elements.", "vertices");

			// Set fields
			AdjoiningRoom = adjoiningroom;
			Normal = normal;
			Vertices = new Vertex [4];
			for (var i = 0; i < 4; i++)
				Vertices [i] = vertices [i];
		}
Example #3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR2.RoomVertex"/> struct.
		/// </summary>
		/// <param name="vertex">The vertex.</param>
		/// <param name="lighting1">The first lighting value.</param>
		public RoomVertex (Vertex vertex, Int16 lighting1) : this () {
			Vertex = vertex;
			Lighting1 = lighting1;
		}
Example #4
0
		public void RoomVertexRenderingEffect (UInt16 value, libtr2.RoomRenderingEffect result) {
			var basevert = new libtr1.Vertex (0, 0, 0);
			var roomvert = new libtr2.RoomVertex (basevert, 0, value, 0);
			Assert.That (roomvert.Attributes == result);
		}