21 .
description(
N_(
"Radius of the inner circle; can be larger than outer radius"));
26 .
description(
N_(
"Radius of the outer circle; can be smaller than inner radius"));
29 .
description(
N_(
"The counterclockwise rotation of the inner set of points"));
33 .
description(
N_(
"An attribute field with a selection of the outer points"));
37 const float outer_radius,
43 curves.cyclic_for_write().first() =
true;
47 const float theta_step = (2.0f *
M_PI) /
float(points);
49 const float x = outer_radius *
cos(theta_step * i);
50 const float y = outer_radius *
sin(theta_step * i);
53 const float inner_x = inner_radius *
cos(theta_step * i + theta_step * 0.5f + twist);
54 const float inner_y = inner_radius *
sin(theta_step * i + theta_step * 0.5f + twist);
55 positions[i * 2 + 1] = {inner_x, inner_y, 0.0f};
65 component.attributes_for_write()->lookup_or_add_for_write_only_span<
bool>(r_attribute.get(),
67 for (
int i : selection.
span.index_range()) {
68 selection.
span[i] = i % 2 == 0;
77 params.extract_input<
float>(
"Twist"),
81 if (
params.output_is_required(
"Outer Points")) {
84 params.set_output(
"Outer Points",
85 AnonymousAttributeFieldInput::Create<bool>(
86 std::move(attribute_output),
params.attribute_producer_name()));
Low-level operations for curves.
#define GEO_NODE_CURVE_PRIMITIVE_STAR
#define NODE_CLASS_GEOMETRY
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to curves
static CurvesGeometry & wrap(::CurvesGeometry &dna_struct)
StringRefNull description() const
ccl_global KernelShaderEvalInput ccl_global float * output
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
Curves * curves_new_nomain_single(int points_num, CurveType type)
OwnedAnonymousAttributeID< true > StrongAnonymousAttributeID
static Curves * create_star_curve(const float inner_radius, const float outer_radius, const float twist, const int points)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void create_selection_output(CurveComponent &component, StrongAnonymousAttributeID &r_attribute)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_curve_primitive_star()
MutableSpan< float3 > positions
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
static GeometrySet create_with_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare
MutableVArraySpan< T > span