-
Notifications
You must be signed in to change notification settings - Fork 16
/
GDM_Coord3D.h
70 lines (58 loc) · 3.1 KB
/
GDM_Coord3D.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include "GDM_Define.h"
#include "GDM_Vector3D.h"
#include "GDM_Location.h"
#include "GDM_Matrix4.h"
#include "GDM_Quaternion.h"
#include "gdem_base_global.h"
// | Z축
// | /Y축
// | /
// ***** /
// **** | */***
// **** | / ****
// * | / *
// * |/----------*----------
// * * X축 (경도0 , 위도 0)
// **** ****
// **** ****
// *****
//
//
//
struct GDM_Coord3D
{
CGDM_Point3DF m_org;
CGDM_Vector3DF m_x;
CGDM_Vector3DF m_y;
CGDM_Vector3DF m_z;
};
// 경도 , 위도 좌표변환 모쥴
GDEM_BASE_EXPORT void gdm_GetPosition(GDM_LOCATION *pLoc , CGDM_Point3DF* pPosF);
GDEM_BASE_EXPORT void gdm_GetLocation(IN CGDM_Point3DF* pPosF, OUT GDM_LOCATION *pLoc);
GDEM_BASE_EXPORT void gdm_GetLocation(IN CGDM_Point3DF* pPosF, OUT CGDM_Location3D *pLoc);
// 슷쥴궤멸츰렉솨
/***************************************************************************
鵑늚샅땠쥴궤踞볜 설揭댜 섟능鱇 pCoord슷쥴궤踞듄 꼬괩끊 멸츰촬뒨鱇 懇끊넸.
****************************************************************************/
GDEM_BASE_EXPORT void gdm_MatrixSCStoTCS(GDM_Coord3D *pCoord, CGDM_Matrix4 *pMat);
/***************************************************************************
pCoord踞볜 설揭댜 섟능鱇 鵑늚샅땠쥴궤踞듄 꼬괩끊 멸츰촬뒨鱇 懇끊넸.
****************************************************************************/
GDEM_BASE_EXPORT void gdm_MatrixTCStoSCS(GDM_Coord3D *pCoord, CGDM_Matrix4 *pMat);
GDEM_BASE_EXPORT void gdm_GetAngleBetweenTwoVector(CGDM_Vector3DF vt1, CGDM_Vector3DF vt2 , CGDM_Vector3DF upVt, double &angle);
//鵑늚결간踞볜 설揭댜 奸퇴 솅奸쇨 샅땠쥴궤땋 곽 샅땠쥴궤揭 奸퇴 쐼鱇 춥서쐼襁듄 쬈艱 춥서빱왜넸.
GDEM_BASE_EXPORT void gdm_RotateAroundXAxis(GDM_Coord3D *pCoord, double angle);
GDEM_BASE_EXPORT void gdm_RotateAroundYAxis(GDM_Coord3D *pCoord, double angle);
GDEM_BASE_EXPORT void gdm_RotateAroundZAxis(GDM_Coord3D *pCoord, double angle);
GDEM_BASE_EXPORT void gdm_TCStoSCS(GDM_Coord3D *pCoord, CGDM_Point3DF *pnt);
GDEM_BASE_EXPORT void gdm_VectorTCStoSCS(GDM_Coord3D *pCoord, CGDM_Vector3DF *pVtr);
GDEM_BASE_EXPORT void gdm_SCStoTCS(GDM_Coord3D *pCoord, CGDM_Point3DF* pnt);
GDEM_BASE_EXPORT void gdm_VectorSCStoTCS(GDM_Coord3D *pCoord, CGDM_Vector3DF *pVtr);
GDEM_BASE_EXPORT void gdm_GetQuaternion(IN GDM_Coord3D *pCoord, OUT CGDM_Quaternion* pQuaternion);
GDEM_BASE_EXPORT void gdm_SetQuaternion(CGDM_Quaternion* pQuaternion , GDM_Coord3D *pCoord);
GDEM_BASE_EXPORT void gdm_RotateAroundVector(CGDM_Point3DF *pPt, double angle, CGDM_Vector3DF vt);
GDEM_BASE_EXPORT void gdm_RotateAroundVector(GDM_Coord3D *pCoord, double angle, CGDM_Vector3DF vt);
GDEM_BASE_EXPORT void gdm_RotateAroundLine(GDM_Coord3D *pCoord, double angle, CGDM_Point3DF org , CGDM_Vector3DF vt);
GDEM_BASE_EXPORT void gdm_GetPerpendPt(CGDM_Point3DF* pResult, const CGDM_Point3DF* pPt , const CGDM_Point3DF* pOrg , const CGDM_Vector3DF* pVt);
GDEM_BASE_EXPORT void gdm_RotateAroundLine(CGDM_Point3DF *pPt, double angle, CGDM_Point3DF org , CGDM_Vector3DF vt);