CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdaCommon.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef _ODA_COMMON_INCLUDED_
25#define _ODA_COMMON_INCLUDED_
26
27#if defined(_MSC_VER) && !defined(_WIN32_WINNT) && !defined(_WINRT)
28#define _WIN32_WINNT 0x0501
29#endif
30
31#if defined(_WINRT) && !defined(_WIN32_WINNT)
32#define _WIN32_WINNT 0x0602
33#endif
34
35#include "TDVersion.h"
36#include "RootExport.h"
37#include "DbRootExport.h"
38
39#include "DebugStuff.h"
40#include "OdaDefs.h"
41#include "OdPlatform.h"
42
43#include "OdModuleNames.h"
44
45/* {NoAutoLink} */
46#define OdaPI 3.14159265358979323846
47/* {NoAutoLink} */
48#define OdaPI2 (OdaPI / 2.0)
49/* {NoAutoLink} */
50#define OdaPI4 (OdaPI / 4.0)
51/* {NoAutoLink} */
52#define Oda2PI (OdaPI+OdaPI)
53
60#define OdaToDegree(rad) ((rad)/OdaPI*180.0)
61
68#define OdaToRadian(deg) ((deg)*OdaPI/180.0)
69
70// SSL:
71// from http://www.ex.ac.uk/cimt/dictunit/dictunit.htm
72//
73// Even as late as the middle of the 20th century there were some differences in UK
74// and US measures which were nominally the same. The UK inch measured 2.53998 cm while
75// the US inch was 2.540005 cm. Both were standardised at 2.54 cm in July 1959.
76
77/* {NoAutoLink} */
78const double kMmPerInch = 25.4;
79
80#ifdef EMCC
81#include <iostream>
82#endif
83
84#endif
85
const double kMmPerInch
Definition OdaCommon.h:78