Blender  V2.93
node_geometry_util.hh
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
19 #include <string.h>
20 
21 #include "BLI_float3.hh"
22 #include "BLI_utildefines.h"
23 
24 #include "MEM_guardedalloc.h"
25 
26 #include "DNA_node_types.h"
27 
28 #include "BKE_node.h"
29 
30 #include "BLT_translation.h"
31 
32 #include "NOD_geometry.h"
33 #include "NOD_geometry_exec.hh"
34 
35 #include "node_util.h"
36 
38  struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
39 bool geo_node_poll_default(struct bNodeType *ntype,
40  struct bNodeTree *ntree,
41  const char **r_disabled_hint);
42 
43 namespace blender::nodes {
45  const StringRef name,
47  const bool name_is_available = true);
48 
50  const AttributeDomain domain);
51 
53  const float3 translation,
54  const float3 rotation,
55  const float3 scale);
56 
57 Mesh *create_cylinder_or_cone_mesh(const float radius_top,
58  const float radius_bottom,
59  const float depth,
60  const int verts_num,
61  const GeometryNodeMeshCircleFillType fill_type);
62 
63 Mesh *create_cube_mesh(const float size);
64 
65 } // namespace blender::nodes
AttributeDomain
Definition: BKE_attribute.h:41
static uint8 component(Color32 c, uint i)
Definition: ColorBlock.cpp:126
GeometryNodeMeshCircleFillType
GeometryNodeAttributeInputMode
_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
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
OperationNode * node
bNodeTree * ntree
void transform_mesh(Mesh *mesh, const float3 translation, const float3 rotation, const float3 scale)
Mesh * create_cylinder_or_cone_mesh(const float radius_top, const float radius_bottom, const float depth, const int verts_num, const GeometryNodeMeshCircleFillType fill_type)
void update_attribute_input_socket_availabilities(bNode &node, const StringRef name, const GeometryNodeAttributeInputMode mode, const bool name_is_available)
Mesh * create_cube_mesh(const float size)
Array< uint32_t > get_geometry_element_ids_as_uints(const GeometryComponent &component, const AttributeDomain domain)
void geo_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
bool geo_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree, const char **r_disabled_hint)
Defines a node type.
Definition: BKE_node.h:221