Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}