Add support for spline point duplicate via Transform gizmo
This commit is contained in:
@@ -169,6 +169,12 @@ float Spline::GetSplineLength() const
|
||||
return Math::Sqrt(sum);
|
||||
}
|
||||
|
||||
float Spline::GetSplineTime(int32 index) const
|
||||
{
|
||||
CHECK_RETURN(index >= 0 && index < GetSplinePointsCount(), 0.0f)
|
||||
return Curve[index].Time;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
void FindTimeClosestToPoint(const Vector3& point, const Spline::Keyframe& start, const Spline::Keyframe& end, float& bestDistanceSquared, float& bestTime)
|
||||
|
||||
@@ -171,6 +171,13 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() float GetSplineLength() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time of the spline keyframe.
|
||||
/// </summary>
|
||||
/// <param name="index">The curve keyframe index. Zero-based, smaller than GetSplinePointsCount().</param>
|
||||
/// <returns>The spline time.</returns>
|
||||
API_FUNCTION() float GetSplineTime(int32 index) const;
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the closest point to the given location and returns the spline time at that point.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user