17 "The shortest angle in radians between two faces where they meet at an edge. Flat edges "
18 "and Non-manifold edges have an angle of zero. Computing this value is faster than the "
23 "The signed angle in radians between two faces where they meet at an edge. Flat edges "
24 "and Non-manifold edges have an angle of zero. Concave angles are positive and convex "
25 "angles are negative. Computing this value is slower than the unsigned angle");
36 const int total_edges)
41 const MPoly &mpoly = polys[i_poly];
73 if (
mesh ==
nullptr) {
81 auto angle_fn = [edge_map, polys, loops,
mesh](
const int i) ->
float {
82 if (edge_map[i].face_count != 2) {
85 const MPoly &mpoly_1 = polys[edge_map[i].face_index_1];
86 const MPoly &mpoly_2 = polys[edge_map[i].face_index_2];
94 return component.attributes()->adapt_domain<
float>(
127 if (
mesh ==
nullptr) {
135 auto angle_fn = [edge_map, polys, loops,
mesh](
const int i) ->
float {
136 if (edge_map[i].face_count != 2) {
139 const MPoly &mpoly_1 = polys[edge_map[i].face_index_1];
140 const MPoly &mpoly_2 = polys[edge_map[i].face_index_2];
143 float3 poly_1_normal, poly_2_normal;
157 const float concavity =
math::dot(poly_1_normal, poly_2_tangent);
169 return component.attributes()->adapt_domain<
float>(
187 if (
params.output_is_required(
"Unsigned Angle")) {
188 Field<float> angle_field{std::make_shared<AngleFieldInput>()};
189 params.set_output(
"Unsigned Angle", std::move(angle_field));
191 if (
params.output_is_required(
"Signed Angle")) {
192 Field<float> angle_field{std::make_shared<SignedAngleFieldInput>()};
193 params.set_output(
"Signed Angle", std::move(angle_field));
typedef float(TangentPoint)[2]
@ GEO_COMPONENT_TYPE_MESH
void BKE_mesh_calc_poly_center(const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray, float r_cent[3])
void BKE_mesh_calc_poly_normal(const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray, float r_no[3])
#define GEO_NODE_INPUT_MESH_EDGE_ANGLE
void nodeRegisterType(struct bNodeType *ntype)
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
static uint8 component(Color32 c, uint i)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Mesh * get_for_read() const
constexpr Span slice(int64_t start, int64_t size) const
constexpr IndexRange index_range() const
static VArray ForFunc(const int64_t size, GetFunc get_func)
StringRefNull description() const
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
vec_base< T, Size > normalize(const vec_base< T, Size > &v)
vec_base< float, 3 > float3
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
unsigned __int64 uint64_t
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare