raygeo.geo.types
Type aliases used throughout the raygeo API.
Point — a 2D coordinate as (x, y).
Point3D — a 3D coordinate as (x, y, z).
Point2DOr3D — union of Point and Point3D for functions that accept both.
Polygon — a list of points forming a closed shape.
Rect — a bounding rectangle as (x_min, y_min, x_max, y_max).
TransformMatrix — a 4x4 affine transformation matrix for 2D/3D transforms.
Edge — a pair of points ((x1, y1), (x2, y2)).
CubicBezier — four control points (p0, p1, p2, p3).
IntPoint / IntPolygon — integer-coordinate variants for Clipper.
Type Aliases
Point
Type: tuple[float, float]
Point2DOr3D
Type: Point | Point3D
Point3D
Type: tuple[float, float, float]
Polygon
Type: list[Point]
Rect
Type: tuple[float, float, float, float]
TransformMatrix
Type: list[list[float]] | numpy.ndarray[tuple[int, int], float]
4x4 affine transformation matrix for 2D/3D coordinate transforms.
Layout (row-major):
[ Rxx Rxy Rxz Tx ] row 0: X basis vector + X translation
[ Ryx Ryy Ryz Ty ] row 1: Y basis vector + Y translation
[ Rzx Rzy Rzz Tz ] row 2: Z basis vector + Z translation
[ 0 0 0 1 ] row 3: homogeneous row (identity)
For 2D transforms, set the Z components to identity:
Rzx = Rzy = 0.0, Rzz = 1.0, Tz = 0.0