diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2021-06-17 11:31:53 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2021-06-17 23:11:32 +0300 |
commit | 4b673ebb990684af4a429d963a1026ddf3f2552f (patch) | |
tree | e5914b52a95fb60ed3ba3fcc63ceb71c3e2499ad /source/blender/makesdna | |
parent | 577d6d3f872206c99dc95c8afaff47ca0339d7fc (diff) |
Raycast geometry node.
The //Raycast// node intersects rays from one geometry onto another.
It computes hit points on the target mesh and returns normals, distances
and any surface attribute specified by the user.
A ray starts on each point of the input //Geometry//. Rays continue
in the //Ray Direction// until they either hit the //Target Geometry//
or reach the //Ray Length// limit. If the target is hit, the value of the
//Is Hit// attribute in the output mesh will be true. //Hit Position//,
//Hit Normal//, //Hit Distance// and //Hit Index// are the properties of the
target mesh at the intersection point. In addition, a //Target Attribute//
can be specified that is interpolated at the hit point and the result
stored in //Hit Attribute//.
Docs: D11620
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D11619
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 2a5b59f03b1..12625d3408d 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -1379,6 +1379,15 @@ typedef struct NodeGeometryAttributeTransfer { uint8_t mapping; } NodeGeometryAttributeTransfer; +typedef struct NodeGeometryRaycast { + /* GeometryNodeRaycastMapMode. */ + uint8_t mapping; + + uint8_t input_type_ray_direction; + uint8_t input_type_ray_length; + char _pad[1]; +} NodeGeometryRaycast; + /* script node mode */ #define NODE_SCRIPT_INTERNAL 0 #define NODE_SCRIPT_EXTERNAL 1 @@ -1891,6 +1900,11 @@ typedef enum GeometryNodeAttributeTransferMapMode { GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST = 1, } GeometryNodeAttributeTransferMapMode; +typedef enum GeometryNodeRaycastMapMode { + GEO_NODE_RAYCAST_INTERPOLATED = 0, + GEO_NODE_RAYCAST_NEAREST = 1, +} GeometryNodeRaycastMapMode; + #ifdef __cplusplus } #endif |