NGL
6.5
The NCCA Graphics Library
|
some useful definitions and functions More...
Go to the source code of this file.
Namespaces | |
ngl | |
implementation files for RibExport class | |
Functions | |
NGL_DLLEXPORT Vec3 | ngl::calcNormal (const Vec4 &_p1, const Vec4 &_p2, const Vec4 &_p3) noexcept |
calculates the normal from 3 points and return the new normal as a Vector More... | |
NGL_DLLEXPORT Vec3 | ngl::calcNormal (const Vec3 &_p1, const Vec3 &_p2, const Vec3 &_p3) noexcept |
calculates the normal from 3 points and return the new normal as a Vector More... | |
NGL_DLLEXPORT Mat4 | ngl::perspective (Real _fovy, Real _aspect, Real _zNear, Real _zFar) noexcept |
computer a perspective projection matrix similar to the one from the GLM library this is to help make prorting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::perspectiveFov (Real const &_fov, Real const &_width, Real const &_height, Real const &_zNear, Real const &_zFar) noexcept |
computer a perspective projection matrix similar to the one from the GLM library this is to help make prorting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::infinitePerspective (Real _fovy, Real _aspect, Real _zNear) noexcept |
computer a perspective projection matrix similar to the one from the GLM library this is to help make prorting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::lookAt (const Vec3 &_eye, const Vec3 &_center, const Vec3 &_up) noexcept |
calculate a look at matrix similar to the one from the GLM library this is to help make porting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::ortho (Real _left, Real _right, Real _bottom, Real _top, Real _zNear, Real _zFar) noexcept |
calculate an ortho graphic projection at matrix similar to the one from the GLM library this is to help make porting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::ortho (Real _left, Real _right, Real _bottom, Real _top) noexcept |
calculate an ortho graphic projection at matrix similar to the one from the GLM library this is to help make porting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Mat4 | ngl::frustum (Real _left, Real _right, Real _bottom, Real _top, Real _nearVal, Real _farVal) noexcept |
calculate frustum matrix similar to the one from the GLM library this is to help make porting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Vec3 | ngl::unProject (const Vec3 &_win, const Mat4 &_model, const Mat4 &_project, const Vec4 &_viewport) noexcept |
unproject points similar to the one from the GLM library this is to help make porting glm code easier http://glm.g-truc.net/ More... | |
NGL_DLLEXPORT Vec3 | ngl::project (const Vec3 &_pos, const Mat4 &_model, const Mat4 &_project, const Vec4 &_viewport) noexcept |
NGL_DLLEXPORT Real | ngl::radians (const Real _deg) noexcept |
converts Degrees to Radians More... | |
NGL_DLLEXPORT Real | ngl::degrees (const Real _rad) noexcept |
converts Radians to Degrees More... | |
NGL_DLLEXPORT bool | ngl::isPowerOfTwo (unsigned int _x) noexcept |
returns if value is a power of 2 More... | |
NGL_DLLEXPORT unsigned int | ngl::nextPow2 (unsigned int _x) noexcept |
rounds up the value to next power of 2 More... | |
NGL_DLLEXPORT void | ngl::NGLCheckGLError (const std::string &_file, const int _line) noexcept |
check for openGL errors and print out. More... | |
template<typename T > | |
T | ngl::lerp (T _a, T _b, Real _t) noexcept |
a simple template function for Linear Interpolation requires that any classes have More... | |
template<typename T > | |
T | ngl::trigInterp (T _a, T _b, Real _t) noexcept |
template<typename T > | |
T | ngl::cubic (T _a, T _b, Real _t) noexcept |
Variables | |
constexpr Real | ngl::TWO_PI = Real(2*M_PI) |
pre-compute the value for value for 2*PI convert to float to suppress windows warning as well More... | |
constexpr Real | ngl::PI =Real(M_PI) |
pre-compute the value for value for PI based on system M_PI More... | |
constexpr Real | ngl::PI2 =Real(M_PI/2.0) |
pre-compute the value for value for PI/2.0 More... | |
constexpr Real | ngl::PI4 =Real(M_PI/4.0) |
pre-compute the value for value for PI/4.0 More... | |
some useful definitions and functions
lots of usful functions for ngl
Definition in file Util.h.