24 #include "../node_shader_util.h"
28 {
SOCK_VECTOR,
N_(
"Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
PROP_NONE,
SOCK_HIDE_VALUE},
30 {
SOCK_VECTOR,
N_(
"Axis"), 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f,
PROP_NONE,
PROP_NONE},
31 {
SOCK_FLOAT,
N_(
"Angle"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX,
PROP_ANGLE,
PROP_NONE},
44 return "node_vector_rotate_axis_angle";
46 return "node_vector_rotate_axis_x";
48 return "node_vector_rotate_axis_y";
50 return "node_vector_rotate_axis_z";
52 return "node_vector_rotate_euler_xyz";
66 if (name !=
nullptr) {
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
void nodeSetSocketAvailability(struct bNodeSocket *sock, bool is_available)
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_update(struct bNodeType *ntype, void(*updatefunc)(struct bNodeTree *ntree, struct bNode *node))
#define SH_NODE_VECTOR_ROTATE
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
#define NODE_CLASS_OP_VECTOR
void nodeRegisterType(struct bNodeType *ntype)
#define BLI_assert_unreachable()
void mul_m3_v3(const float M[3][3], float r[3])
bool invert_m3(float R[3][3])
void eul_to_mat3(float mat[3][3], const float eul[3])
void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
@ NODE_VECTOR_ROTATE_TYPE_AXIS
@ NODE_VECTOR_ROTATE_TYPE_AXIS_Z
@ NODE_VECTOR_ROTATE_TYPE_AXIS_X
@ NODE_VECTOR_ROTATE_TYPE_EULER_XYZ
@ NODE_VECTOR_ROTATE_TYPE_AXIS_Y
NSNotificationCenter * center
GPUNodeLink * GPU_constant(const float *num)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const fn::MultiFunction & get_not_implemented_fn()
void set_matching_fn(const fn::MultiFunction &function)
void sh_fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void register_node_type_sh_vector_rotate(void)
static const char * gpu_shader_get_name(int mode)
static void node_shader_update_vector_rotate(bNodeTree *UNUSED(ntree), bNode *node)
static float3 sh_node_vector_rotate_euler(const float3 vector, const float3 center, const float3 rotation, const bool invert)
static bNodeSocketTemplate sh_node_vector_rotate_in[]
static void sh_node_vector_rotate_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder)
static bNodeSocketTemplate sh_node_vector_rotate_out[]
static int gpu_shader_vector_rotate(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static float3 sh_node_vector_rotate_around_axis(const float3 vector, const float3 center, const float3 axis, const float angle)
static const blender::fn::MultiFunction & get_multi_function(blender::nodes::NodeMFNetworkBuilder &builder)
Compact definition of a node socket.
NodeExpandInMFNetworkFunction expand_in_mf_network
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)