IBezierLogic.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //### Bezier Logic Interface
  2. //Describes public functions of any BezierLogic component
  3. //
  4. //It controlls only particles path, it does not controll any other aspect ot their behaviour or loock.
  5. //
  6. //License information: [ASSET STORE TERMS OF SERVICE AND EULA](https://unity3d.com/legal/as_terms)
  7. //
  8. //Developed by [MathArtCode](https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:8738) team, 2015
  9. using UnityEngine;
  10. namespace Assets.Scripts.BezierCurvedParticlesFlow.Interfaces {
  11. public interface IBezierLogic {
  12. // Returns a coordinate point relative to curve 'time' where 0 is bezier curve beginning and 1 is end of the bezier curve (length vise)
  13. Vector3 GetPoint(float t);
  14. // Returns a velocity point relative to curve 'time' where 0 is bezier curve beginning and 1 is end of the bezier curve (length vise)
  15. Vector3 GetVelocity(float t);
  16. // Returns a normalized velocity point relative to curve 'time' where 0 is bezier curve beginning and 1 is end of the bezier curve (length vise)
  17. Vector3 GetDirection(float t);
  18. // Sets a value of a point
  19. //- positioning (end points) have indexes 0, 3, 6, ...
  20. //- angles (control points) have indexes 1,2, 4,5, ...
  21. void SetControlPoint(int index, Vector3 point);
  22. //Gets a point value
  23. //- positioning (end points) have indexes 0, 3, 6, ...
  24. //- angles (control points) have indexes 1,2, 4,5, ...
  25. Vector3 GetControlPoint(int index);
  26. //Gets all avaliable points ammount (including end points)
  27. int ControlPointCount { get; }
  28. //Removes
  29. void RemovePoint(int selectedIndex);
  30. }
  31. }