/// <summary> /// Extends this Laser beam in the specified direction. /// The returned Laser is already initialized. That is, /// its <c>Create()</c> method is invoked. /// </summary> /// <param name="newOrigin">The origin of the new Laser beam.</param> /// <param name="newDirection">The direction of the new Laser beam.</param> /// <returns>The created Laser instance.</returns> public LaserBeam Extend(Vector3 newOrigin, Vector3 newDirection) { LaserBeam laser = new LaserBeam(newOrigin, newDirection, this.emitter); laser.Create(); return(laser); }
/// <summary> /// Initializes a new instance of the <see cref="HitEventArgs"/> class. /// </summary> /// <param name="laser">The Laser beam that Hit the object, not null.</param> /// <param name="point">The position where the Laser Hit the object.</param> /// <param name="normal">The normal of the surface that the Laser beam Hit.</param> /// <param name="receiver">The ILaserReceiver that got Hit.</param> public HitEventArgs(LaserBeam laser, Vector3 point, Vector3 normal, ILaserReceiver receiver) { if (laser == null) { throw new ArgumentNullException("laser"); } this.Laser = laser; this.Point = point; this.Normal = normal; this.Receiver = receiver; }