34 .default_value({-1.0f, 0.0f, 0.0f})
37 .make_available(enable_points);
39 .default_value({0.0f, 2.0f, 0.0f})
42 .make_available(enable_points);
44 .default_value({1.0f, 0.0f, 0.0f})
47 .make_available(enable_points);
53 .make_available(enable_radius);
58 .make_available(enable_radius);
60 .default_value(1.75f *
M_PI)
65 .make_available(enable_radius);
70 .make_available(enable_points);
80 .description(
N_(
"The center of the circle described by the three points"))
81 .make_available(enable_points);
83 .description(
N_(
"The normal direction of the plane described by the three points, pointing "
84 "towards the positive Z axis"))
85 .make_available(enable_points);
87 .description(
N_(
"The radius of the circle described by the three points"))
88 .make_available(enable_points);
154 return (
ELEM(
a,
b,
b * -1.0f));
162 const bool connect_center,
163 const bool invert_arc,
168 const int size = connect_center ? resolution + 1 : resolution;
172 const int stepcount = resolution - 1;
173 const int centerpoint = resolution;
184 if (is_colinear ||
a ==
c ||
a ==
b ||
b ==
c || resolution == 2) {
192 if (ab > ac && ab > bc) {
196 else if (bc > ab && bc > ac) {
205 const float step = 1.0f / stepcount;
207 const float factor = step * i;
226 float plane_1[4], plane_2[4], plane_3[4];
248 float angle = (angle_ac > angle_ab) ? angle_ac : angle_ab;
255 const float step =
angle / stepcount;
257 const float factor = step * i + angle_offset;
263 if (connect_center) {
264 curves.cyclic_for_write().first() =
true;
281 const float start_angle,
282 const float sweep_angle,
283 const bool connect_center,
284 const bool invert_arc)
286 const int size = connect_center ? resolution + 1 : resolution;
290 const int stepcount = resolution - 1;
291 const int centerpoint = resolution;
294 const float sweep = (invert_arc) ? -(2.0f *
M_PI - sweep_angle) : sweep_angle;
296 const float theta_step = sweep /
float(stepcount);
298 const float theta = theta_step * i + start_angle;
299 const float x = radius *
cos(theta);
300 const float y = radius *
sin(theta);
304 if (connect_center) {
305 curves.cyclic_for_write().first() =
true;
320 float3 r_center, r_normal;
327 params.extract_input<
float>(
"Offset Angle"),
328 params.extract_input<
bool>(
"Connect Center"),
329 params.extract_input<
bool>(
"Invert Arc"),
334 params.set_output(
"Center", r_center);
335 params.set_output(
"Normal", r_normal);
336 params.set_output(
"Radius", r_radius);
342 params.extract_input<
float>(
"Radius"),
343 params.extract_input<
float>(
"Start Angle"),
344 params.extract_input<
float>(
"Sweep Angle"),
345 params.extract_input<
bool>(
"Connect Center"),
346 params.extract_input<
bool>(
"Invert Arc"));
365 "NodeGeometryCurvePrimitiveArc",
typedef float(TangentPoint)[2]
Low-level operations for curves.
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
#define NODE_STORAGE_FUNCS(StorageT)
void nodeSetSocketAvailability(struct bNodeTree *ntree, struct bNodeSocket *sock, bool is_available)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
#define NODE_CLASS_GEOMETRY
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
#define GEO_NODE_CURVE_PRIMITIVE_ARC
void nodeRegisterType(struct bNodeType *ntype)
void plane_from_point_normal_v3(float r_plane[4], const float plane_co[3], const float plane_no[3])
bool isect_plane_plane_plane_v3(const float plane_a[4], const float plane_b[4], const float plane_c[4], float r_isect_co[3]) ATTR_WARN_UNUSED_RESULT
float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3])
void mul_m3_v3(const float M[3][3], float r[3])
void axis_angle_to_mat3(float R[3][3], const float axis[3], float angle)
float angle_signed_on_axis_v3v3_v3(const float v1[3], const float v2[3], const float axis[3]) ATTR_WARN_UNUSED_RESULT
GeometryNodeCurvePrimitiveArcMode
@ GEO_NODE_CURVE_PRIMITIVE_ARC_TYPE_POINTS
@ GEO_NODE_CURVE_PRIMITIVE_ARC_TYPE_RADIUS
NSNotificationCenter * center
_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
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
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
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
static CurvesGeometry & wrap(::CurvesGeometry &dna_struct)
StringRefNull description() const
IconTextureDrawCall normal
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)
T distance_squared(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
vec_base< T, 3 > cross(const vec_base< T, 3 > &a, const vec_base< T, 3 > &b)
T distance(const T &a, const T &b)
vec_base< T, Size > normalize(const vec_base< T, Size > &v)
T midpoint(const T &a, const T &b)
T interpolate(const T &a, const T &b, const FactorT &t)
static void node_declare(NodeDeclarationBuilder &b)
static Curves * create_arc_curve_from_points(const int resolution, const float3 a, const float3 b, const float3 c, float angle_offset, const bool connect_center, const bool invert_arc, float3 &r_center, float3 &r_normal, float &r_radius)
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
static float3 rotate_vector_around_axis(const float3 vector, const float3 axis, const float angle)
static Curves * create_arc_curve_from_radius(const int resolution, const float radius, const float start_angle, const float sweep_angle, const bool connect_center, const bool invert_arc)
static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3)
static void node_geo_exec(GeoNodeExecParams params)
vec_base< float, 3 > float3
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node)
void register_node_type_geo_curve_primitive_arc()
MutableSpan< float3 > positions
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
static GeometrySet create_with_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
struct bNodeSocket * next
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare