Hermes
|
Geometric normal classes. More...
Go to the source code of this file.
Classes | |
class | hermes::Normal2< T > |
Geometric 2-dimensional normal (nx, ny) More... | |
class | hermes::Normal3< T > |
Geometric 3-dimensional normal (nx, ny, nz) More... | |
Typedefs | |
using | hermes::normal2 = Normal2< real_t > |
using | hermes::normal2f = Normal2< float > |
using | hermes::normal2d = Normal2< double > |
using | hermes::normal3 = Normal3< real_t > |
using | hermes::normal3f = Normal3< float > |
using | hermes::normal3d = Normal3< double > |
Functions | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Vector2< T > | hermes::reflect (const Vector2< T > &a, const Normal2< T > &n) |
reflects a on n More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Vector2< T > | hermes::project (const Vector2< T > &v, const Normal2< T > &n) |
projects v on the surface with normal n More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Normal3< T > | hermes::normalize (const Normal3< T > &normal) |
Computes normalized copy. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Normal3< T > | hermes::abs (const Normal3< T > &normal) |
Computes absolute normal components. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Vector3< T > | hermes::reflect (const Vector3< T > &a, const Normal3< T > &n) |
reflects a on n More... | |
template<typename S > | |
HERMES_DEVICE_CALLABLE Vector3< S > | hermes::project (const Vector3< S > &v, const Normal3< S > &n) |
projects v on the surface with normal n More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE T | hermes::dot (const Normal3< T > &n, const Vector3< T > &v) |
Computes dot product with vector. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE T | hermes::dot (const Vector3< T > &v, const Normal3< T > &n) |
Computes dot product with vector. More... | |
template<typename T > | |
HERMES_DEVICE_CALLABLE Vector3< T > | hermes::faceForward (const Vector3< T > &v, const Normal3< T > &n) |
template<typename T > | |
std::ostream & | hermes::operator<< (std::ostream &os, const Normal2< T > &n) |
Normal's support for std::ostream::<< operator. More... | |
template<typename T > | |
std::ostream & | hermes::operator<< (std::ostream &os, const Normal3< T > &n) |
Normal's support for std::ostream::<< operator. More... | |
Geometric normal classes.
Copyright (c) 2017, FilipeCN.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
HERMES_DEVICE_CALLABLE Normal3<T> hermes::abs | ( | const Normal3< T > & | normal | ) |
Computes absolute normal components.
T |
normal |
HERMES_DEVICE_CALLABLE T hermes::dot | ( | const Normal3< T > & | n, |
const Vector3< T > & | v | ||
) |
Computes dot product with vector.
T |
n | |
v |
HERMES_DEVICE_CALLABLE T hermes::dot | ( | const Vector3< T > & | v, |
const Normal3< T > & | n | ||
) |
Computes dot product with vector.
T |
v | |
n |
HERMES_DEVICE_CALLABLE Vector3<T> hermes::faceForward | ( | const Vector3< T > & | v, |
const Normal3< T > & | n | ||
) |
T |
v | |
n |
HERMES_DEVICE_CALLABLE Normal3<T> hermes::normalize | ( | const Normal3< T > & | normal | ) |
Computes normalized copy.
T |
normal |
std::ostream& hermes::operator<< | ( | std::ostream & | os, |
const Normal2< T > & | n | ||
) |
Normal's support for std::ostream::<<
operator.
T |
os | |
n |
std::ostream& hermes::operator<< | ( | std::ostream & | os, |
const Normal3< T > & | n | ||
) |
Normal's support for std::ostream::<<
operator.
T |
os | |
n |
HERMES_DEVICE_CALLABLE Vector2<T> hermes::project | ( | const Vector2< T > & | v, |
const Normal2< T > & | n | ||
) |
projects v on the surface with normal n
v | vector |
n | surface's normal |
HERMES_DEVICE_CALLABLE Vector3<S> hermes::project | ( | const Vector3< S > & | v, |
const Normal3< S > & | n | ||
) |
projects v on the surface with normal n
v | vector |
n | surface's normal |
HERMES_DEVICE_CALLABLE Vector2<T> hermes::reflect | ( | const Vector2< T > & | a, |
const Normal2< T > & | n | ||
) |
reflects a on n
a | vector to be reflected |
n | axis of reflection |
HERMES_DEVICE_CALLABLE Vector3<T> hermes::reflect | ( | const Vector3< T > & | a, |
const Normal3< T > & | n | ||
) |
reflects a on n
a | vector to be reflected |
n | axis of reflection |