Blender  V3.3
node_geometry_util.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
5 #include <string.h>
6 
7 #include "BLI_math_vec_types.hh"
8 #include "BLI_utildefines.h"
9 
10 #include "MEM_guardedalloc.h"
11 
12 #include "DNA_node_types.h"
13 
14 #include "BKE_node.h"
15 
16 #include "BLT_translation.h"
17 
18 #include "NOD_geometry.h"
19 #include "NOD_geometry_exec.hh"
22 
23 #include "node_util.h"
24 
25 void geo_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass);
26 bool geo_node_poll_default(struct bNodeType *ntype,
27  struct bNodeTree *ntree,
28  const char **r_disabled_hint);
29 
30 namespace blender::nodes {
31 
33  const float3 translation,
34  const float3 rotation,
35  const float3 scale);
36 
37 void transform_geometry_set(GeoNodeExecParams &params,
38  GeometrySet &geometry,
39  const float4x4 &transform,
40  const Depsgraph &depsgraph);
41 
42 Mesh *create_line_mesh(const float3 start, const float3 delta, int count);
43 
44 Mesh *create_grid_mesh(int verts_x, int verts_y, float size_x, float size_y);
45 
50 };
51 
52 Mesh *create_cylinder_or_cone_mesh(float radius_top,
53  float radius_bottom,
54  float depth,
55  int circle_segments,
56  int side_segments,
57  int fill_segments,
59  ConeAttributeOutputs &attribute_outputs);
60 
65  GeometryComponent &result_component,
66  Span<bool> masks,
67  bool invert);
73 void separate_geometry(GeometrySet &geometry_set,
74  eAttrDomain domain,
76  const Field<bool> &selection_field,
77  bool &r_is_error);
78 
79 std::optional<eCustomDataType> node_data_type_to_custom_data_type(eNodeSocketDatatype type);
80 std::optional<eCustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket);
81 
82 } // namespace blender::nodes
eAttrDomain
Definition: BKE_attribute.h:25
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
GeometryNodeMeshCircleFillType
eNodeSocketDatatype
GeometryNodeDeleteGeometryMode
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
float float4x4[4][4]
Read Guarded memory(de)allocation.
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
const Depsgraph * depsgraph
bNodeTree * ntree
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
int count
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
Definition: invert.h:8
OwnedAnonymousAttributeID< true > StrongAnonymousAttributeID
std::optional< eCustomDataType > node_data_type_to_custom_data_type(const eNodeSocketDatatype type)
Mesh * create_line_mesh(const float3 start, const float3 delta, int count)
void copy_point_attributes_based_on_mask(const GeometryComponent &in_component, GeometryComponent &result_component, Span< bool > masks, bool invert)
void separate_geometry(GeometrySet &geometry_set, eAttrDomain domain, GeometryNodeDeleteGeometryMode mode, const Field< bool > &selection_field, bool &r_is_error)
void transform_geometry_set(GeoNodeExecParams &params, GeometrySet &geometry, const float4x4 &transform, const Depsgraph &depsgraph)
void transform_mesh(Mesh &mesh, const float3 translation, const float3 rotation, const float3 scale)
Mesh * create_grid_mesh(int verts_x, int verts_y, float size_x, float size_y)
Mesh * create_cylinder_or_cone_mesh(float radius_top, float radius_bottom, float depth, int circle_segments, int side_segments, int fill_segments, GeometryNodeMeshCircleFillType fill_type, ConeAttributeOutputs &attribute_outputs)
std::optional< eCustomDataType > node_socket_to_custom_data_type(const bNodeSocket &socket)
void geo_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
bool geo_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree, const char **r_disabled_hint)
Defines a node type.
Definition: BKE_node.h:226
StrongAnonymousAttributeID bottom_id
StrongAnonymousAttributeID side_id