# Ranges¶

This is the api for all the range objects.

class pyscan.Halfplane(pt)

This is a range representing a halfplane. Internally it uses a homogenous coordinate and is usually oriented downwards.

Parameters: pt – Point
Halfplane.get_coords()

Returns the internal Point representation of this Halfplane.

Return type: Point
Halfplane.contains(pt)

Checks to see if the halfplane contains the point. Internally uses Point.below_closed.

Parameters: pt – Point boolean
Halfplane.intersects_segment(p1, p2)

Checks to see if the halfplane intersects the line segment represented by p1 and p2. Internally uses Point.crosses.

Parameters: p1 – Point p2 – Point boolean
Halfplane.intersects_trajectory(traj)

Checks to see if the halfplane intersects the trajectory represented by traj.

Parameters: traj – Trajectory boolean
class pyscan.Halfspace(pt)

This is a range representing a halfspace in 3d. Internally it uses a homogenous coordinate and is usually oriented downwards.

Parameters: pt – Point3
Halfspace.get_coords()

Returns the internal Point3 representation of this Halfplane.

Return type: Point3
Halfplane.contains(pt)

Checks to see if the halfplane contains the point. Internally uses Point.below_closed.

Parameters: pt – Point3 boolean
Halfspace.intersects_segment(p1, p2)

Checks to see if the halfplane intersects the line segment represented by p1 and p2. Internally uses Point.crosses.

Parameters: p1 – Point3 p2 – Point3 boolean
class pyscan.Disk(origin, radius)

This is a range representing a disk. Internally it uses a point for its center and a radius around that center.

Parameters: origin – Point radius – double
Disk.getOrigin()

Returns the internal Point representation of the disk center.

Return type: Point
Disk.getRadius()

Returns the radius of this disk.

Return type: double
Disk.contains(pt)

Checks to see if the Disk contains the point.

Parameters: pt – Point boolean
Disk.intersects_segment(p1, p2)

Checks to see if the Disk intersects the line segment represented by p1 and p2.

Parameters: p1 – Point p2 – Point boolean
Disk.intersects_trajectory(traj)

Checks to see if the disk intersects the trajectory represented by traj.

Parameters: traj – Trajectory boolean
class pyscan.Rectangle(upX, upY, lowX, lowY)

This is a range representing a rectangle. (upX, upY) is the upper right corner and (lowX, lowY) is the lower left corner.

Parameters: upX – double upY – double lowX – double lowY – double
Rectangle.lowX()
Return type: double
Rectangle.lowY()
Return type: double
Rectangle.upX()
Return type: double
Rectangle.upY()
Return type: double
Rectangle.contains(pt)

Checks to see if the Rectangle contains the point.

Parameters: pt – Point boolean
Rectangle.intersects_segment(p1, p2)

Checks to see if the Rectangle intersects the line segment represented by p1 and p2.

Parameters: p1 – Point p2 – Point boolean
Rectangle.intersects_trajectory(traj)

Checks to see if the rectangle intersects the trajectory represented by traj.

Parameters: traj – Trajectory boolean