Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Visibility ¶
type Visibility[T constraints.Float] struct { // contains filtered or unexported fields }
Visibility holds state for computing a visibility polygon.
func New ¶
func New[T constraints.Float](bounds geom.Rect[T], obstructions []Segment[T], hasNoIntersections bool) *Visibility[T]
New creates a Visibility object. If the obstructions do not intersect each other, pass in true for hasNoIntersections to eliminate the costly pass to break the segments up into smaller parts.
func (*Visibility[T]) SetViewPoint ¶
func (v *Visibility[T]) SetViewPoint(viewPt geom.Point[T]) poly.Polygon[T]
SetViewPoint sets a view point and generates a polygon with the unobstructed visible area.
Click to show internal directories.
Click to hide internal directories.