The rectangular bounds of this polygon
The configuration of this polygon.
The origin point of the source polygon.
Static
WALL_Customize how wall direction of one-way walls is applied
An indicator for whether this polygon is constrained by some boundary shape?
Apply a constraining boundary shape to an existing PointSourcePolygon. Return a new instance of the polygon with the constraint applied. The new instance is only a "shallow clone", as it shares references to component properties with the original.
The constraining boundary shape
Optional
intersectionOptions: object = {}Options passed to the shape intersection method
A new constrained polygon
Create a clone of this polygon. This overrides the default PIXI.Polygon#clone behavior.
A cloned instance
Compute the polygon using the origin and configuration options.
The computed polygon
Customize the provided configuration object for this polygon type.
The provided polygon origin. The elevation defaults to the elevation of config.source if passed and otherwise 0.
The provided configuration object
Determine if the shape is a complete circle. The config object must have an angle and a radius properties.
Visualize the polygon, displaying its computed area and applied boundary shapes.
The rendered debugging shape
Protected
_computeProtected
Perform the implementation-specific computation
Protected
_constrainProtected
Constrain polygon points by applying boundary shapes.
Protected
Abstract
_testProtected
Determine the set of collisions which occurs for a Ray.
The Ray to test
The collision mode being tested
The destination
The collision test result
Static
applyAugment a PointSourcePolygon by adding additional coverage for shapes permitted by threshold walls.
The computed polygon
The augmented polygon
Static
benchmarkBenchmark the performance of polygon computation for this source
The number of test iterations to perform
The origin point to benchmark
The polygon configuration to benchmark
Static
createCompute the polygon given a point origin and radius
The origin source point. The elevation defaults to the elevation of config.source if passed and otherwise 0.
Optional
config: any = {}Configuration options which customize the polygon computation
The computed polygon instance
Static
testTest whether a Ray between the origin and destination points would collide with a boundary of this Polygon. A valid wall restriction type is compulsory and must be passed into the config options.
An origin point. The elevation defaults to the elevation of config.source if passed and otherwise 0.
A destination point. The elevation defaults to the elevation of the origin.
The configuration that defines a certain Polygon type
The collision mode to test: "any", "all", or "closest"
The collision result depends on the mode of the test: * any: returns a boolean for whether any collision occurred * all: returns a sorted array of PolygonVertex instances * closest: returns a PolygonVertex instance or null
An extension of Polygon which is used to represent the line of sight for a point source.