summaryrefslogtreecommitdiffstats
path: root/src/math/conv.h
blob: 8b77db90e4ccd22d54c3c54ded4aaba687186e16 (plain)
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
/* math/conv.h

 Temporary conversion functions for D3DVECTOR and FPOINT */

#pragma once

#define STRICT
#define D3D_OVERLOADS
#include <d3d.h>

#include "common/struct.h"
#include "vector.h"
#include "point.h"

inline D3DVECTOR V_TO_D3D(Math::Vector vec)
{
  return D3DVECTOR(vec.x, vec.y, vec.z);
}

inline Math::Vector D3D_TO_V(D3DVECTOR vec)
{
  return Math::Vector(vec.x, vec.y, vec.z);
}

inline FPOINT P_TO_FP(Math::Point pt)
{
  return FPOINT(pt.x, pt.y);
}

inline Math::Point FP_TO_P(FPOINT pt)
{
  return Math::Point(pt.x, pt.y);
}