LinearEmitter
A Line that emitts evenly spaced rays parallel to its normal.
-
Visual style for the emitter’s rays
Declaration
Swift
public var style: RayTraceStyle -
Distance between each ray
Declaration
Swift
public var rayStep: Double -
Instantiate a new
Linefrom coordinatesDeclaration
Swift
public init(_ x1: Double, _ y1: Double, _ x2: Double, _ y2: Double, rayStep: Double)Parameters
x1Starting X coordinate
y1Starting Y coordinate
x2Ending X coordinate
y2Ending Y coordinate
-
Process the ray casting operations for this emitter.
This method calculates the paths of the emitter’s rays, but does not draw them. Any previous rays will be overwritten.
Declaration
Swift
public func run(objects: [RayTracable])Parameters
objectsThe objects with which the rays will interact
-
Draw the paths taken by the emitter’s rays.
This method does not perform any ray tracing.
Declaration
Swift
public func draw()
View on GitHub
LinearEmitter Class Reference