sdf.Xor
sdf.Xor(*sdfs)
XOR of two SDFs (symmetric difference).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| sdfs | 2-tuple of SDFs | () |
Methods
| Name | Description |
|---|---|
| material_at | An even mix of both children, with the same unspecified-property rule. |
| sdf | Pure function for XOR operation. |
material_at
sdf.Xor.material_at(p)
An even mix of both children, with the same unspecified-property rule.
Uses :func:~cadjoint.sdf.boolean.base.blend_materials rather than a plain lerp: at a fixed weight of 0.5 a plain lerp erases every property the other child leaves unspecified, everywhere.
sdf
sdf.Xor.sdf(child_sdfs, p)
Pure function for XOR operation.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| child_sdfs | 2-tuple of SDF functions | required | |
| p | Array | Query point(s) | required |
Returns
| Name | Type | Description |
|---|---|---|
| Array | XOR SDF value |