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; }
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; }
public Transformation CopyFrom(ref Transformation transformation) { translation.CopyTo(ref transformation.translation); rotation.CopyTo(ref transformation.rotation); scale.CopyTo(ref transformation.scale); return transformation; }