| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MC3DDataFileExport.h
Go to the documentation of this file.
1 /**
2 * @file MC3DDataFileExport.h
3 * @brief Function prototypes for file export functions
4 *
5 * @author LMI Technologies
6 */
7
8 #ifndef _MC3DDataFileExport_h
9 #define _MC3DDataFileExport_h
10
11 #include "MC3DDefs.h"
12
13 #if defined(WIN32) || defined(WIN64)
14 # define MC3D_EXPORT __declspec(dllexport)
15 #else
16 # define MC3D_EXPORT
17 #endif
18
19 #ifdef __cplusplus
20 extern "C"
21 {
22 #endif
23
24 /**
25 Image types
26 */
27 #define MC_DATA_FILE_IMAGE_TYPE_CAMERA (char)0
28 #define MC_DATA_FILE_IMAGE_TYPE_HEIGHT (char)1
29
30 /**
31 A structure for file input parameters
32 */
33 struct TMC3D_DataFileFD3Data
34 {
35 short m_nSizeX; /**< Size in X */
36 short m_nSizeY; /**< Size in Y */
37 double m_dScaleX; /**< Scaling factor in X direction */
38 double m_dScaleY; /**< Scaling factor in Y direction */
39 double m_dScaleZ; /**< Scaling factor in Z direction */
40 char m_cImageType; /**< Image type, see MC_DATA_FILE_IMAGE_TYPE_CAMERA and MC_DATA_FILE_IMAGE_TYPE_HEIGHT */
41 };
42
43
44 /**
45 Returns the version of the MikroCAD 3d library
46
47 @return Version number
48 */
49 MC3D_EXPORT int __cdecl MC3D_Version();
50
51 /**
52 Saves height data in FD3 format
53
54 @param pszFileName File name
55 @param pnData Input data array
56 @param nSizeX Size in X
57 @param nSizeY Size in Y
58 @param fScaleX Scaling factor in x direction
59 @param fScaleY Scaling factor in y direction
60 @param fScaleZ Scaling factor in z direction
61 @param cImageType Image type
62 @return Success (true) or failure
63 */
64 MC3D_EXPORT bool __cdecl MC3D_WriteDataFileFD3(
65 const char *pszFileName,
66 short *pnData,
67 short nSizeX,
68 short nSizeY,
69 float fScaleX = 1.0f,
70 float fScaleY = 1.0f,
71 float fScaleZ = 1.0f,
72 char cImageType = MC_DATA_FILE_IMAGE_TYPE_HEIGHT);
73
74 /**
75 Saves height data with valid array in FD3 format
76
77 @param pszFileName File name
78 @param pnData Input data array
79 @param pbValid Input valid array
80 @param nSizeX Size in X
81 @param nSizeY Size in Y
82 @param fScaleX Scaling factor in x direction
83 @param fScaleY Scaling factor in y direction
84 @param fScaleZ Scaling factor in z direction
85 @param cImageType Image type
86 @return Success (true) or failure
87 */
88 MC3D_EXPORT bool __cdecl MC3D_WriteDataFileFD3Valid(
89 const char *pszFileName,
90 short *pnData,
91 bool *pbValid,
92 short nSizeX,
93 short nSizeY,
94 float fScaleX = 1.0f,
95 float fScaleY = 1.0f,
96 float fScaleZ = 1.0f,
97 char cImageType = MC_DATA_FILE_IMAGE_TYPE_HEIGHT);
98
99 /**
100 Read description from a FD3 file
101
102 @param pszFileName File name
103 @return TMC3D_DataFileFD3Data structure
104 */
105 MC3D_EXPORT TMC3D_DataFileFD3Data * __cdecl MC3D_ReadDescriptionDataFD3(
106 char *pszFileName);
107
108 /**
109 Read data from a FD3 file
110
111 @param pszFileName File name
112 @param pnData Output Data array
113 @return Success (true) or failure
114 */
115 MC3D_EXPORT bool __cdecl MC3D_ReadDataFileFD3(
116 char *pszFileName,
117 short *pnData);
118
119 #ifdef __cplusplus
120 }
121 #endif
122
123 #endif // _MC3DDataFileExport_h
MC3D_Version
MC3D_EXPORT int __cdecl MC3D_Version()
Returns the version of the MikroCAD 3d library.
MC3D_WriteDataFileFD3Valid
MC3D_EXPORT bool __cdecl MC3D_WriteDataFileFD3Valid(const char *pszFileName, short *pnData, bool *pbValid, short nSizeX, short nSizeY, float fScaleX=1.0f, float fScaleY=1.0f, float fScaleZ=1.0f, char cImageType=MC_DATA_FILE_IMAGE_TYPE_HEIGHT)
Saves height data with valid array in FD3 format.
MC3D_ReadDescriptionDataFD3
MC3D_EXPORT TMC3D_DataFileFD3Data *__cdecl MC3D_ReadDescriptionDataFD3(char *pszFileName)
Read description from a FD3 file.
TMC3D_DataFileFD3Data
A structure for file input parameters.
Definition: MC3DDataFileExport.h:33
TMC3D_DataFileFD3Data::m_dScaleY
double m_dScaleY
Scaling factor in Y direction.
Definition: MC3DDataFileExport.h:38
TMC3D_DataFileFD3Data::m_cImageType
char m_cImageType
Image type, see MC_DATA_FILE_IMAGE_TYPE_CAMERA and MC_DATA_FILE_IMAGE_TYPE_HEIGHT.
Definition: MC3DDataFileExport.h:40
TMC3D_DataFileFD3Data::m_dScaleX
double m_dScaleX
Scaling factor in X direction.
Definition: MC3DDataFileExport.h:37
TMC3D_DataFileFD3Data::m_nSizeY
short m_nSizeY
Size in Y.
Definition: MC3DDataFileExport.h:36
MC3D_ReadDataFileFD3
MC3D_EXPORT bool __cdecl MC3D_ReadDataFileFD3(char *pszFileName, short *pnData)
Read data from a FD3 file.
MC3D_WriteDataFileFD3
MC3D_EXPORT bool __cdecl MC3D_WriteDataFileFD3(const char *pszFileName, short *pnData, short nSizeX, short nSizeY, float fScaleX=1.0f, float fScaleY=1.0f, float fScaleZ=1.0f, char cImageType=MC_DATA_FILE_IMAGE_TYPE_HEIGHT)
Saves height data in FD3 format.
TMC3D_DataFileFD3Data::m_dScaleZ
double m_dScaleZ
Scaling factor in Z direction.
Definition: MC3DDataFileExport.h:39
MC3DDefs.h
Common defines for the MikroCAD SDK library.
TMC3D_DataFileFD3Data::m_nSizeX
short m_nSizeX
Size in X.
Definition: MC3DDataFileExport.h:35