19 .
description(
N_(
"The distance a point can be from the surface before the face is no longer "
46 if (
mesh ==
nullptr) {
52 evaluator.add(threshold_);
54 const VArray<float> thresholds = evaluator.get_evaluated<
float>(0);
58 auto planar_fn = [
mesh, thresholds, poly_normals](
const int i_poly) ->
bool {
65 float3 reference_normal = poly_normals[i_poly];
80 return max -
min < thresholds[i_poly] / 2.0f;
83 return component.attributes()->adapt_domain<
bool>(
103 params.set_output(
"Planar", std::move(planar_field));
@ GEO_COMPONENT_TYPE_MESH
const float(* BKE_mesh_poly_normals_ensure(const struct Mesh *mesh))[3]
#define GEO_NODE_INPUT_MESH_FACE_IS_PLANAR
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
const Mesh * get_for_read() const
constexpr IndexRange index_range() const
static VArray ForFunc(const int64_t size, GetFunc get_func)
StringRefNull description() const
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
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)
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