sdf.Translate
sdf.Translate(sdf, offset)
Translate an SDF by a vector offset.
Note: For SDFs, we translate by applying the inverse transform to the query point. This moves the geometry in the opposite direction.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sdf | SDF | The SDF to translate | required |
| offset | Array | Vector | Translation vector (Array or Vector constraint) | required |
Methods
| Name | Description |
|---|---|
| patch_fields | Forward the child’s patch fields through the inverse translation. |
| sdf | Pure function for translation. |
patch_fields
sdf.Translate.patch_fields()
Forward the child’s patch fields through the inverse translation.
Query points map into the child frame exactly as :meth:sdf does (p - offset), so patch ids and feature edges stay exact.
sdf
sdf.Translate.sdf(child_sdf, p, offset)
Pure function for translation.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| child_sdf | SDF function to translate | required | |
| p | Array | Query point(s) | required |
| offset | Array | Translation vector [x, y, z] | required |
Returns
| Name | Type | Description |
|---|---|---|
| Array | Translated SDF value |