Merge branch 'development' into cmake/SPEC-2513_w4267
This commit is contained in:
@@ -243,6 +243,22 @@ namespace ScriptCanvas
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToPerpendicular, k_categoryName, "{CC4DC102-8B50-4828-BA94-0586F34E0D37}", "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation", "Source");
|
||||
|
||||
AZ_INLINE void DirectionToDefaults(Node& node)
|
||||
{
|
||||
SetDefaultValuesByIndex<0>::_(node, Data::Vector2Type());
|
||||
SetDefaultValuesByIndex<1>::_(node, Data::Vector2Type());
|
||||
SetDefaultValuesByIndex<2>::_(node, Data::NumberType(1.));
|
||||
}
|
||||
|
||||
AZ_INLINE std::tuple<Vector2Type, NumberType> DirectionTo(const Vector2Type from, const Vector2Type to, NumberType optionalScale = 1.f)
|
||||
{
|
||||
Vector2Type r = to - from;
|
||||
float length = r.NormalizeWithLength();
|
||||
r.SetLength(optionalScale);
|
||||
return std::make_tuple(r, length);
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(DirectionTo, DirectionToDefaults, k_categoryName, "{49A2D7F6-6CD3-420E-8A79-D46B00DB6CED}", "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", "From", "To", "Scale");
|
||||
|
||||
using Registrar = RegistrarGeneric <
|
||||
AbsoluteNode
|
||||
, AddNode
|
||||
@@ -295,6 +311,7 @@ namespace ScriptCanvas
|
||||
, SlerpNode
|
||||
, SubtractNode
|
||||
, ToPerpendicularNode
|
||||
, DirectionToNode
|
||||
> ;
|
||||
|
||||
}
|
||||
|
||||
@@ -329,6 +329,23 @@ namespace ScriptCanvas
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ZAxisCross, k_categoryName, "{29206E84-392C-412E-9DD5-781B2759260D}", "returns the vector cross product of Z-Axis X Source", "Source");
|
||||
|
||||
AZ_INLINE void DirectionToDefaults(Node& node)
|
||||
{
|
||||
SetDefaultValuesByIndex<0>::_(node, Data::Vector3Type());
|
||||
SetDefaultValuesByIndex<1>::_(node, Data::Vector3Type());
|
||||
SetDefaultValuesByIndex<2>::_(node, Data::NumberType(1.));
|
||||
}
|
||||
|
||||
AZ_INLINE std::tuple<Vector3Type, NumberType> DirectionTo(const Vector3Type from, const Vector3Type to, NumberType optionalScale = 1.f)
|
||||
{
|
||||
Vector3Type r = to - from;
|
||||
float length = r.NormalizeWithLength();
|
||||
r.SetLength(optionalScale);
|
||||
return std::make_tuple(r, length);
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(DirectionTo, DirectionToDefaults, k_categoryName, "{28FBD529-4C9A-4E34-B8A0-A13B5DB3C331}", "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", "From", "To", "Scale");
|
||||
|
||||
|
||||
using Registrar = RegistrarGeneric <
|
||||
AbsoluteNode
|
||||
, AddNode
|
||||
@@ -403,6 +420,7 @@ namespace ScriptCanvas
|
||||
|
||||
, SlerpNode
|
||||
, SubtractNode
|
||||
, DirectionToNode
|
||||
|
||||
#if ENABLE_EXTENDED_MATH_SUPPORT
|
||||
, XAxisCrossNode
|
||||
|
||||
@@ -214,6 +214,22 @@ namespace ScriptCanvas
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_DEPRECATED(Subtract, k_categoryName, "{A5FA6465-9C39-4A44-BD7C-E8ECF9503E46}", "This node is deprecated, use Subtract (-), it provides contextual type and slots", "A", "B");
|
||||
|
||||
AZ_INLINE void DirectionToDefaults(Node& node)
|
||||
{
|
||||
SetDefaultValuesByIndex<0>::_(node, Data::Vector4Type());
|
||||
SetDefaultValuesByIndex<1>::_(node, Data::Vector4Type());
|
||||
SetDefaultValuesByIndex<2>::_(node, Data::NumberType(1.));
|
||||
}
|
||||
|
||||
AZ_INLINE std::tuple<Vector4Type, NumberType> DirectionTo(const Vector4Type from, const Vector4Type to, NumberType optionalScale = 1.f)
|
||||
{
|
||||
Vector4Type r = to - from;
|
||||
float length = r.NormalizeWithLength();
|
||||
r.SetLength(optionalScale);
|
||||
return std::make_tuple(r, length);
|
||||
}
|
||||
SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(DirectionTo, DirectionToDefaults, k_categoryName, "{463762DE-E541-4AFE-80C2-FED1C5273319}", "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", "From", "To", "Scale");
|
||||
|
||||
using Registrar = RegistrarGeneric <
|
||||
AbsoluteNode,
|
||||
AddNode,
|
||||
@@ -260,7 +276,8 @@ namespace ScriptCanvas
|
||||
#endif
|
||||
|
||||
ReciprocalNode,
|
||||
SubtractNode
|
||||
SubtractNode,
|
||||
DirectionToNode
|
||||
> ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user