00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00027
#ifndef SHLIBGEOMETRY_HPP
00028
#define SHLIBGEOMETRY_HPP
00029
00030
#include "ShGeneric.hpp"
00031
#include "ShLib.hpp"
00032
00033
namespace SH {
00034
00046
template<
typename T>
00047 ShGeneric<3, T>
cross(
const ShGeneric<3, T>& left,
const ShGeneric<3, T>& right);
00048
00050
template<
int N,
typename T>
00051 ShGeneric<3, T>
operator^(
const ShGeneric<3, T>& left,
const ShGeneric<3, T>& right);
00052
00056
template<
int N,
typename T>
00057 ShGeneric<N, T>
normalize(
const ShGeneric<N, T>& var);
00058
00062
template<
int N,
typename T>
00063 ShGeneric<N, T>
reflect(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b);
00064
00068
template<
int N,
typename T>
00069 ShGeneric<N, T>
refract(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b,
00070
const ShGeneric<1, T>& c);
00071
00076
template<
int N,
typename T>
00077 ShGeneric<N, T>
faceforward(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b);
00078
00086
template<
typename T>
00087 ShGeneric<4, T>
lit(
const ShGeneric<1, T>& a,
00088
const ShGeneric<1, T>& b,
00089
const ShGeneric<1, T>& c);
00090
00093
template<
int N,
typename T>
00094 ShGeneric<1, T>
dot(
const ShGeneric<N, T>& left,
const ShGeneric<N, T>& right);
00095
00096
template<
int N,
typename T>
00097 ShGeneric<1, T>
operator|(
const ShGeneric<N, T>& left,
const ShGeneric<N, T>& right);
00098
00099 SH_SHLIB_CONST_N_OP_RETSIZE_BOTH(dot, 1);
00100
00106
template<
int N,
typename T>
00107 ShGeneric<1, T>
distance(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b);
00108
00112
template<
int N,
typename T>
00113 ShGeneric<1, T>
distance_1(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b);
00114
00118
template<
int N,
typename T>
00119 ShGeneric<1, T>
distance_inf(
const ShGeneric<N, T>& a,
const ShGeneric<N, T>& b);
00120
00124
template<
int N,
typename T>
00125 ShGeneric<1, T>
length(
const ShGeneric<N, T>& a);
00126
00127 }
00128
00129
#include "ShLibGeometryImpl.hpp"
00130
00131
#endif