Example #1
0
		public Transformation Concat(ref Transformation additionalTransform) {
			Transformation transformation = new Transformation();
			
			translation.Add(ref additionalTransform.translation, ref transformation.translation);
			
			transformation.scale.X = scale.X * additionalTransform.scale.X;
			transformation.scale.Y = scale.Y * additionalTransform.scale.Y;
			transformation.scale.Z = scale.Z * additionalTransform.scale.Z;
			
			rotation.Multiply(ref additionalTransform.rotation, ref transformation.rotation);
			
			return transformation;
		}
Example #2
0
		public Spatial ()
		{
			// TODO: This should have a unique number suffic across all of the same types.
			name = this.GetType ().Name;
			
			parent = null;
			
			localTransformation = new Transformation ();
			worldTransformation = new Transformation ();
			
			spatialState = State.UPDATE_LOCAL_BOUND;
			cullMode = CullMode.INHERIT;
		}
Example #3
0
		public Transformation CopyFrom(ref Transformation transformation)
		{
			translation.CopyTo(ref transformation.translation);
			rotation.CopyTo(ref transformation.rotation);
			scale.CopyTo(ref transformation.scale);
			return transformation;
		}