Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00025
00035
00036 #ifndef THOR_VECTORALGEBRA3D_HPP
00037 #define THOR_VECTORALGEBRA3D_HPP
00038
00039 #include <Thor/Math/Trigonometry.hpp>
00040
00041 #include <SFML/System/Vector2.hpp>
00042 #include <SFML/System/Vector3.hpp>
00043
00044 #include <cassert>
00045
00046
00047 namespace thor
00048 {
00049
00052
00055 template <typename T>
00056 T length(const sf::Vector3<T>& vector);
00057
00060 template <typename T>
00061 T squaredLength(const sf::Vector3<T>& vector);
00062
00065 template <typename T>
00066 sf::Vector3<T> unitVector(const sf::Vector3<T>& vector);
00067
00072 template <typename T>
00073 T polarAngle(const sf::Vector3<T>& vector);
00074
00079 template <typename T>
00080 T elevationAngle(const sf::Vector3<T>& vector);
00081
00082
00083
00084
00087 template <typename T>
00088 T dotProduct(const sf::Vector3<T>& lhs, const sf::Vector3<T>& rhs);
00089
00092 template <typename T>
00093 sf::Vector3<T> crossProduct(const sf::Vector3<T>& lhs, const sf::Vector3<T>& rhs);
00094
00098 template <typename T>
00099 sf::Vector3<T> cwiseProduct(const sf::Vector3<T>& lhs, const sf::Vector3<T>& rhs);
00100
00105 template <typename T>
00106 sf::Vector3<T> cwiseQuotient(const sf::Vector3<T>& lhs, const sf::Vector3<T>& rhs);
00107
00108
00109
00110
00113 template <typename T>
00114 sf::Vector3<T> toVector3(const sf::Vector2<T>& vector2);
00115
00117
00118 }
00119
00120 #include <Thor/Vectors/Detail/VectorAlgebra3D.inl>
00121 #endif // THOR_VECTORALGEBRA3D_HPP