[affine] update docs
This commit is contained in:
parent
dd16f19004
commit
4da3376e63
2 changed files with 5 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ Most functions and classes are documented inline.
|
||||||
Geometry helper input contracts:
|
Geometry helper input contracts:
|
||||||
- `build_tetrahedron()` and `planes_from_tetrahedron()` expect tetrahedron vertices in the helper's documented positive winding.
|
- `build_tetrahedron()` and `planes_from_tetrahedron()` expect tetrahedron vertices in the helper's documented positive winding.
|
||||||
- `build_box()` and `planes_from_box()` expect `box_corners[0]` to be the per-axis minimum and `box_corners[1]` the per-axis maximum.
|
- `build_box()` and `planes_from_box()` expect `box_corners[0]` to be the per-axis minimum and `box_corners[1]` the per-axis maximum.
|
||||||
|
- `adze.transform.affine()` accepts a general 4x4 homogeneous transform and applies the perspective divide using the fourth row, so projective transforms are supported.
|
||||||
|
|
||||||
To read the inline help,
|
To read the inline help,
|
||||||
```python3
|
```python3
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,13 @@ def scale(poly: poly_t, factor: ArrayLike | float) -> poly_t:
|
||||||
|
|
||||||
def affine(poly: poly_t, xform: ArrayLike) -> poly_t:
|
def affine(poly: poly_t, xform: ArrayLike) -> poly_t:
|
||||||
"""
|
"""
|
||||||
Perform arbitrary affine trasnformation on the polyhedron.
|
Perform an arbitrary homogeneous 4x4 transformation on the polyhedron.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
poly: Polyhedron to transform. Changed in-place.
|
poly: Polyhedron to transform. Changed in-place.
|
||||||
xform: 4x4 affine transformation matrix.
|
xform: 4x4 homogeneous transformation matrix. The transformed homogeneous
|
||||||
|
coordinates are divided by the fourth row, so projective transforms are
|
||||||
|
supported in addition to affine ones.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Transformed polyhedron.
|
Transformed polyhedron.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue