Example #1
0
 /// <summary>
 /// Applies a transform to this transform.
 /// </summary>
 public Transform Apply(Transform Transform)
 {
     return Transform.ApplyTo(this);
 }
Example #2
0
 /// <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));
 }
Example #3
0
 public TransformedEntity(Entity Source, Transform Transform)
 {
     this._Source = Source;
     this._Transform = Transform;
 }
Example #4
0
 public override TransformedEntity Apply(Transform Transform)
 {
     return new TransformedEntity(this._Source, this._Transform.Apply(Transform));
 }
Example #5
0
 /// <summary>
 /// Creates an entity with a transform to this entity.
 /// </summary>
 public virtual TransformedEntity Apply(Transform Transform)
 {
     return new TransformedEntity(this, Transform);
 }