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
00024 #pragma once
00025
00026 #include "cinder/Cinder.h"
00027 #include "cinder/CinderMath.h"
00028 #include "cinder/Matrix22.h"
00029 #include "cinder/MatrixAffine2.h"
00030 #include "cinder/Matrix33.h"
00031 #include "cinder/Matrix44.h"
00032 #include "cinder/MatrixAlgo.h"
00033
00034 namespace cinder {
00035
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 template< typename T >
00059 Matrix44<T> firstFrame(
00060 const Vec3<T> &firstPoint,
00061 const Vec3<T> &secondPoint,
00062 const Vec3<T> &thirdPoint
00063 );
00064
00065 template< typename T >
00066 Matrix44<T> nextFrame(
00067 const Matrix44<T> &prevMatrix,
00068 const Vec3<T> &prevPoint,
00069 const Vec3<T> &curPoint,
00070 Vec3<T> &prevTangent,
00071 Vec3<T> &curTangent
00072 );
00073
00074 template< typename T >
00075 Matrix44<T> lastFrame(
00076 const Matrix44<T> &prevMatrix,
00077 const Vec3<T> &prevPoint,
00078 const Vec3<T> &lastPoint
00079 );
00080
00081
00082 template< typename T >
00083 Matrix44<T> firstFrame(
00084 const Vec4<T> &firstPoint,
00085 const Vec4<T> &secondPoint,
00086 const Vec4<T> &thirdPoint
00087 )
00088 {
00089 return firstFrame( firstPoint.xyz(), secondPoint.xyz(), thirdPoint.xyz() );
00090 }
00091
00092 template< typename T >
00093 Matrix44<T> nextFrame(
00094 const Matrix44<T> &prevMatrix,
00095 const Vec4<T> &prevPoint,
00096 const Vec4<T> &curPoint,
00097 Vec4<T> &prevTangent,
00098 Vec4<T> &curTangent
00099 )
00100 {
00101 Vec3<T> aPrevTangent = prevTangent.xyz();
00102 Vec3<T> aCurTangent = curTangent.xyz();
00103 return nextFrame( prevMatrix, prevPoint.xyz(), curPoint.xyz(), aPrevTangent, aCurTangent );
00104 }
00105
00106 template< typename T >
00107 Matrix44<T> lastFrame(
00108 const Matrix44<T> &prevMatrix,
00109 const Vec4<T> &prevPoint,
00110 const Vec4<T> &lastPoint
00111 )
00112 {
00113 return lastFrame( prevMatrix, prevPoint.xyz(), lastPoint.xyz() );
00114 }
00115
00116 }