18 #ifndef __H__OCULAR_ENGINE_MATH_UTILS__H__
19 #define __H__OCULAR_ENGINE_MATH_UTILS__H__
21 #include "Vector4.hpp"
44 static Vector2f PointOnCircle(Vector2f
const& center,
float const radius,
float const angle)
46 const float angleRad = DegreesToRadians(angle);
48 Vector2f result = center;
50 result.x += cosf(angleRad) * radius;
51 result.y += sinf(angleRad) * radius;
64 static Vector3f PointOnSphere(Vector3f
const& center,
float const radius,
float const angleX,
float const angleY)
73 const float radX = DegreesToRadians(angleX);
74 const float radY = DegreesToRadians(angleY);
76 Vector3f result = center;
78 result.x += radius * sinf(radX) * cosf(radY);
79 result.y += radius * sinf(radX) * sinf(radY);
80 result.z += radius * cosf(radX);
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70