/// <summary> /// Applies a transform to this transform. /// </summary> public Transform Apply(Transform Transform) { return Transform.ApplyTo(this); }
/// <summary> /// Applies this transform to another, in effect combining them. /// </summary> public Transform ApplyTo(Transform Transform) { return new Transform( this.Offset + this.Rotation.Rotate(Transform.Offset), this.VelocityOffset + this.Rotation.Rotate(Transform.VelocityOffset), this.Rotation.ApplyTo(Transform.Rotation)); }
public TransformedEntity(Entity Source, Transform Transform) { this._Source = Source; this._Transform = Transform; }
public override TransformedEntity Apply(Transform Transform) { return new TransformedEntity(this._Source, this._Transform.Apply(Transform)); }
/// <summary> /// Creates an entity with a transform to this entity. /// </summary> public virtual TransformedEntity Apply(Transform Transform) { return new TransformedEntity(this, Transform); }