-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathfunc.h
More file actions
50 lines (37 loc) · 1023 Bytes
/
func.h
File metadata and controls
50 lines (37 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* func.h
*
* Copyright (c) 2013, Dalian Nationalities University. All Rights Reserved.
* Tianyi Song <[email protected]>
*
* You can use this library in your project, but do not redistribute it and/or modify
* it.
*
*/
#ifndef FUNC_H
#define FUNC_H
#include <string.h>
#include <stdlib.h>
#include "CVector3f.h"
#include "CQuaternion.h"
#include "def.h"
/*
*@brief matrix multiplication
*@input matrix a, row = X col = Y
*@input matrix b, row = Y col = Z
*@output matrix res, row = X col = Z
**/
void __matrixMultiXYZ(FLOAT *res,const FLOAT *a,const FLOAT *b,const int X,const int Y,const int Z);
/*
*
*/
void Pitch(CVector3f tarVec,CVector3f curVec,FLOAT &pitch);//x
void Yaw(CVector3f tarVec,CVector3f curVec,FLOAT &yaw);//y
void Roll(CVector3f tarVec,CVector3f curVec,FLOAT &roll);//z
/*
*@brief Cyclic-Coordinate Descent ,calculate a quaternion
,which can rotate the current vec to target vec
*
*/
CQuaternion CCD(CVector3f root,CVector3f curEnd,CVector3f desireEnd);
#endif