23 #if !defined(OPENNURBS_DEFINES_INC_) 
   24 #define OPENNURBS_DEFINES_INC_ 
   26 #include <pcl/pcl_exports.h> 
   28 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus) || defined(ON_CPLUSPLUS) 
   31 #if !defined(ON_CPLUSPLUS) 
   34 #define ON_EXTERNC extern "C" 
   35 #define ON_BEGIN_EXTERNC extern "C" {
 
   36 #define ON_END_EXTERNC   } 
   43 #define ON_BEGIN_EXTERNC 
   44 #define ON_END_EXTERNC   
   51 #if !defined(ON_DEBUG) 
   66 #if defined(OPENNURBS_EXPORTS) 
   68 #if !defined(ON_DLL_EXPORTS) 
   69 #define ON_DLL_EXPORTS 
   71 #if !defined(ON_COMPILING_OPENNURBS) 
   72 #define ON_COMPILING_OPENNURBS 
   76 #if defined(OPENNURBS_IMPORTS) 
   78 #if !defined(ON_DLL_IMPORTS) 
   79 #define ON_DLL_IMPORTS 
   83 #if defined(ON_DLL_EXPORTS) && defined(ON_DLL_IMPORTS) 
   84 #error At most one of ON_DLL_EXPORTS and ON_DLL_IMPORTS can be defined. 
   88 #if defined(ON_DLL_EXPORTS) 
   90 #if !defined(ON_COMPILING_OPENNURBS) 
   91 #error When compiling an OpenNURBS DLL, ON_DLL_EXPORTS must be defined 
   95 #define ON_CLASS __declspec(dllexport) 
   96 #define ON_DECL __declspec(dllexport) 
   97 #define ON_EXTERN_DECL __declspec(dllexport) 
   98 #define ON_DLL_TEMPLATE 
  100 #elif defined(ON_DLL_IMPORTS) 
  102 #if defined(ON_COMPILING_OPENNURBS) 
  103 #error When compiling an OpenNURBS DLL, ON_DLL_IMPORTS must NOT be defined 
  107 #define ON_CLASS __declspec(dllimport) 
  108 #define ON_DECL __declspec(dllimport) 
  109 #define ON_EXTERN_DECL __declspec(dllimport) 
  110 #define ON_DLL_TEMPLATE extern 
  117 #define ON_EXTERN_DECL 
  119 #if defined(ON_DLL_TEMPLATE) 
  120 #undef ON_DLL_TEMPLATE 
  127 #if defined(ON_COMPILER_MSC) 
  128 #define ON_DEPRECATED  __declspec(deprecated) 
  130 #define ON_DEPRECATED 
  136 #define ON_PI           3.141592653589793238462643 
  139 #define ON_DEGREES_TO_RADIANS ON_PI/180.0 
  140 #define ON_RADIANS_TO_DEGREES 180.0/ON_PI 
  142 #define ON_SQRT2          1.414213562373095048801689 
  143 #define ON_SQRT3          1.732050807568877293527446 
  144 #define ON_SQRT3_OVER_2   0.8660254037844386467637230 
  145 #define ON_1_OVER_SQRT2   0.7071067811865475244008445 
  146 #define ON_SIN_PI_OVER_12 0.2588190451025207623488990 
  147 #define ON_COS_PI_OVER_12 0.9659258262890682867497433 
  149 #define ON_LOG2         0.6931471805599453094172321 
  150 #define ON_LOG10        2.302585092994045684017991 
  152 #define ON_ArrayCount(a) (sizeof(a)/sizeof((a)[0])) 
  155 #define ON_DBL_MAX DBL_MAX 
  157 #define ON_DBL_MAX 1.7976931348623158e+308 
  161 #define ON_DBL_MIN DBL_MIN 
  163 #define ON_DBL_MIN 2.22507385850720200e-308 
  167 #if defined(DBL_EPSILON) 
  168 #define ON_EPSILON DBL_EPSILON 
  170 #define ON_EPSILON 2.2204460492503131e-16 
  172 #define ON_SQRT_EPSILON 1.490116119385000000e-8 
  174 #if defined(FLT_EPSILON) 
  175 #define ON_FLOAT_EPSILON FLT_EPSILON 
  177 #define ON_FLOAT_EPSILON 1.192092896e-07 
  179 #define ON_SQRT_FLOAT_EPSILON 3.452669830725202719e-4 
  203 #define ON_UNSET_VALUE -1.23432101234321e+308 
  212 #define ON_UNSET_FLOAT -1.234321e+38f 
  218 extern ON_EXTERN_DECL 
const double ON_DBL_QNAN;
 
  219 extern ON_EXTERN_DECL 
const double ON_DBL_PINF;
 
  220 extern ON_EXTERN_DECL 
const double ON_DBL_NINF;
 
  222 extern ON_EXTERN_DECL 
const float  ON_FLT_QNAN;
 
  223 extern ON_EXTERN_DECL 
const float  ON_FLT_PINF;
 
  224 extern ON_EXTERN_DECL 
const float  ON_FLT_NINF;
 
  247 void ON_DBL_SNAN( 
double* x );
 
  250 void ON_FLT_SNAN( 
float* x );
 
  259 #define ON_UNSET_COLOR 0xFFFFFFFF 
  272 #define ON_ZERO_TOLERANCE 2.3283064365386962890625e-10 
  284 #define ON_RELATIVE_TOLERANCE 2.27373675443232059478759765625e-13 
  292 #define ON_MAXIMUM_WORLD_COORDINATE_VALUE 1.34217728e8 
  302 #define ON_ZERO_CURVATURE_TOLERANCE 1.0e-8 
  305 #define ON_DEFAULT_ANGLE_TOLERANCE (ON_PI/180.0) 
  306 #define ON_DEFAULT_ANGLE_TOLERANCE_COSINE 0.99984769515639123915701155881391 
  307 #define ON_MINIMUM_ANGLE_TOLERANCE (ON_DEFAULT_ANGLE_TOLERANCE/10.0) 
  359 #if defined(ON_CPLUSPLUS) 
  389   const char* SourceRevision();
 
  392   const char* DocumentationRevision();
 
  395   const char* SourceBranch();
 
  398   const char* DocumentationBranch();
 
  405           const char* filename,
 
  411           const wchar_t* filename,
 
  412           const wchar_t* filemode
 
  436   bool GetFileStats( 
const wchar_t* filename,
 
  437                      std::size_t* filesize,
 
  439                      time_t* lastmodify_time
 
  443   bool GetFileStats( FILE* fp,
 
  444                      std::size_t* filesize,
 
  446                      time_t* lastmodify_time
 
  452   static bool IsDirectory( 
const wchar_t* pathname );
 
  453   static bool IsDirectory( 
const char* utf8pathname );
 
  461   static int IsOpenNURBSFile( 
const wchar_t* pathname );
 
  462   static int IsOpenNURBSFile( 
const char* utf8pathname );
 
  463   static int IsOpenNURBSFile( FILE* fp );
 
  479   static eAnnotationType AnnotationType(
int); 
 
  483   enum eTextDisplayMode
 
  491   static eTextDisplayMode TextDisplayMode( 
int);
 
  501   static active_space ActiveSpace(
int); 
 
  561     custom_unit_system = 11 
 
  564   static unit_system UnitSystem(
int); 
 
  583   static double UnitScale(
 
  584       ON::unit_system us_from,
 
  585       ON::unit_system us_to
 
  587   static double UnitScale(
 
  591   static double UnitScale(
 
  592       ON::unit_system us_from,
 
  595   static double UnitScale(
 
  597       ON::unit_system us_to
 
  599   static double UnitScale(
 
  615   static const wchar_t* NameReferenceDelimiter();
 
  625   static unsigned int NameReferenceDelimiterLength();
 
  647   static const wchar_t* IsNameReferenceDelimiter(
const wchar_t* s);
 
  650   enum distance_display_mode
 
  657   static distance_display_mode DistanceDisplayMode(
int); 
 
  663     unknown_point_style   = 0,
 
  665     homogeneous_rational  = 2,
 
  666     euclidean_rational    = 3,
 
  667     intrinsic_point_style = 4, 
 
  668     point_style_count     = 5
 
  671   static point_style PointStyle(
int); 
 
  676     unknown_knot_style     = 0, 
 
  678     quasi_uniform_knots    = 2, 
 
  679     piecewise_bezier_knots = 3, 
 
  680     clamped_end_knots      = 4, 
 
  681     non_uniform_knots      = 5, 
 
  685   static knot_style KnotStyle(
int); 
 
  690     unknown_continuity = 0,
 
  716     C0_locus_continuous =  6, 
 
  717     C1_locus_continuous =  7, 
 
  718     C2_locus_continuous =  8, 
 
  719     G1_locus_continuous =  9, 
 
  720     G2_locus_continuous = 10, 
 
  722     Cinfinity_continuous = 11, 
 
  723     Gsmooth_continuous = 12    
 
  730   static continuity Continuity(
int);
 
  738   static continuity ParametricContinuity(
int);
 
  747   static continuity PolylineContinuity(
int);
 
  752     unknown_curve_style   =  0,
 
  760     planar_freeform_curve =  8, 
 
  762     curve_style_count     = 10
 
  765   static curve_style CurveStyle(
int); 
 
  770     unknown_surface_style =  0,
 
  772     circular_cylinder     =  2, 
 
  773     elliptical_cylinder   =  3, 
 
  778     surface_of_revolution =  8, 
 
  780     freeform_surface      = 10, 
 
  781     surface_style_count   = 11
 
  784   static surface_style SurfaceStyle(
int); 
 
  793   static sort_algorithm SortAlgorithm(
int); 
 
  801   static endian Endian(
int); 
 
  802   static endian Endian();    
 
  807     unknown_archive_mode = 0,
 
  814   static archive_mode ArchiveMode(
int); 
 
  840   static view_projection ViewProjection(
int i);
 
  848   static bool IsPerspectiveProjection( ON::view_projection projection );
 
  857   static bool IsParallelProjection( ON::view_projection projection );
 
  861   enum coordinate_system 
 
  869   static coordinate_system CoordinateSystem(
int); 
 
  874     unknown_exception = 0,
 
  878     unable_to_write_archive,      
 
  879     unable_to_read_archive,       
 
  880     unable_to_seek_archive,       
 
  881     unexpected_end_of_archive,    
 
  882     unexpected_value_in_archive   
 
  884   static exception_type ExceptionType(
int); 
 
  895   static layer_mode LayerMode(
int); 
 
  906     object_mode_count = 4
 
  908   static object_mode ObjectMode(
int); 
 
  911   enum object_color_source
 
  913     color_from_layer    = 0, 
 
  914     color_from_object   = 1, 
 
  915     color_from_material = 2, 
 
  916     color_from_parent   = 3  
 
  919   static object_color_source ObjectColorSource(
int); 
 
  922   enum plot_color_source
 
  924     plot_color_from_layer   = 0, 
 
  925     plot_color_from_object  = 1, 
 
  926     plot_color_from_display = 2, 
 
  927     plot_color_from_parent  = 3  
 
  930   static plot_color_source PlotColorSource(
int); 
 
  933   enum plot_weight_source
 
  935     plot_weight_from_layer   = 0, 
 
  936     plot_weight_from_object  = 1, 
 
  937     plot_weight_from_parent  = 3  
 
  940   static plot_weight_source PlotWeightSource(
int); 
 
  943   enum object_linetype_source
 
  945     linetype_from_layer  = 0, 
 
  946     linetype_from_object = 1, 
 
  947     linetype_from_parent = 3  
 
  950   static object_linetype_source ObjectLinetypeSource(
int); 
 
  953   enum object_material_source
 
  955     material_from_layer  = 0, 
 
  956     material_from_object = 1, 
 
  957     material_from_parent = 3  
 
  966   static object_material_source ObjectMaterialSource(
int); 
 
  971     unknown_light_style      = 0,
 
  975     camera_directional_light = 4, 
 
  976     camera_point_light       = 5, 
 
  977     camera_spot_light        = 6,
 
  978     world_directional_light  = 7, 
 
  979     world_point_light        = 8, 
 
  980     world_spot_light         = 9,
 
  982     world_linear_light       = 11,
 
  983     world_rectangular_light  = 12,
 
  984     light_style_count        = 13
 
  986   static light_style LightStyle(
int); 
 
  991     unknown_curvature_style = 0,
 
  992     gaussian_curvature = 1,
 
  996     curvature_style_count = 5
 
  998   static curvature_style CurvatureStyle(
int); 
 
 1003     default_display       = 0, 
 
 1004     wireframe_display     = 1, 
 
 1006     renderpreview_display = 3  
 
 1008   static display_mode DisplayMode(
int); 
 
 1013     model_view_type  = 0,       
 
 1019     nested_view_type = 2,       
 
 1023   static view_type ViewType(
int); 
 
 1032     modulate_texture = 1,  
 
 1036   static texture_mode TextureMode(
int); 
 
 1048     unknown_object_type  =          0,
 
 1051     pointset_object      =          2, 
 
 1056     layer_object         =       0x40, 
 
 1057     material_object      =       0x80, 
 
 1058     light_object         =      0x100, 
 
 1059     annotation_object    =      0x200, 
 
 1060     userdata_object      =      0x400, 
 
 1061     instance_definition  =      0x800, 
 
 1062     instance_reference   =     0x1000, 
 
 1064     grip_object          =     0x4000, 
 
 1065     detail_object        =     0x8000, 
 
 1066     hatch_object         =    0x10000, 
 
 1067     morph_control_object =    0x20000, 
 
 1068     loop_object          =    0x80000, 
 
 1069     polysrf_filter       =   0x200000, 
 
 1070     edge_filter          =   0x400000, 
 
 1071     polyedge_filter      =   0x800000, 
 
 1072     meshvertex_object    = 0x01000000, 
 
 1073     meshedge_object      = 0x02000000, 
 
 1074     meshface_object      = 0x04000000, 
 
 1075     cage_object          = 0x08000000, 
 
 1076     phantom_object       = 0x10000000,
 
 1077     clipplane_object     = 0x20000000,
 
 1078     beam_object          = 0x40000000, 
 
 1079     extrusion_object     = 0x40000000, 
 
 1081     any_object           = 0xFFFFFFFF
 
 1086   static object_type ObjectType(
int); 
 
 1091     unknown_bitmap_type = 0,
 
 1096   static bitmap_type BitmapType(
int); 
 
 1098   enum object_decoration
 
 1100     no_object_decoration = 0,
 
 1101     start_arrowhead      = 0x08, 
 
 1102     end_arrowhead        = 0x10, 
 
 1103     both_arrowhead       = 0x18  
 
 1105   static object_decoration ObjectDecoration(
int); 
 
 1115   static mesh_type MeshType(
int); 
 
 1134     os_quadrant      =      0x200,
 
 1135     os_midpoint      =      0x800,
 
 1136     os_intersection  =     0x2000,
 
 1138     os_perpendicular =    0x80000,
 
 1139     os_tangent       =   0x200000,
 
 1140     os_point         = 0x08000000,
 
 1141     os_all_snaps     = 0xFFFFFFFF
 
 1143   static osnap_mode OSnapMode(
int); 
 
 1165   enum cubic_loft_end_condition
 
 1167     cubic_loft_ec_quadratic      = 0,
 
 1168     cubic_loft_ec_linear         = 1,
 
 1169     cubic_loft_ec_cubic          = 2,
 
 1170     cubic_loft_ec_natural        = 3,
 
 1171     cubic_loft_ec_unit_tangent   = 4,
 
 1172     cubic_loft_ec_1st_derivative = 5,
 
 1173     cubic_loft_ec_2nd_derivative = 6,
 
 1174     cubic_loft_ec_free_cv        = 7
 
 1189   cubic_loft_end_condition CubicLoftEndCondition(
int i); 
 
 1205 class ON_CLASS ON_COMPONENT_INDEX
 
 1223     meshtop_vertex     =  12,
 
 1229     polycurve_segment  =  31,
 
 1231     pointcloud_point   =  41,
 
 1236     extrusion_bottom_profile = 61, 
 
 1238     extrusion_top_profile    = 62, 
 
 1240     extrusion_wall_edge      = 63, 
 
 1243     extrusion_wall_surface   = 64, 
 
 1245     extrusion_cap_surface    = 65, 
 
 1247     extrusion_path           = 66, 
 
 1250     dim_linear_point   = 100,
 
 1251     dim_radial_point   = 101,
 
 1252     dim_angular_point  = 102,
 
 1253     dim_ordinate_point = 103,
 
 1254     dim_text_point     = 104,
 
 1256     no_type           = 0xFFFFFFFF
 
 1281   int Compare( 
const ON_COMPONENT_INDEX* a, 
const ON_COMPONENT_INDEX* b);
 
 1287   ON_COMPONENT_INDEX();
 
 1293   ON_COMPONENT_INDEX(TYPE type,
int index);
 
 1295   bool operator==(
const ON_COMPONENT_INDEX& other) 
const;
 
 1296   bool operator!=(
const ON_COMPONENT_INDEX& other) 
const;
 
 1297   bool operator<(
const ON_COMPONENT_INDEX& other) 
const;
 
 1298   bool operator<=(
const ON_COMPONENT_INDEX& other) 
const;
 
 1299   bool operator>(
const ON_COMPONENT_INDEX& other) 
const;
 
 1300   bool operator>=(
const ON_COMPONENT_INDEX& other) 
const;
 
 1302   void Set(TYPE type,
int index);
 
 1322   bool IsMeshComponentIndex() 
const;
 
 1329   bool IsBrepComponentIndex() 
const;
 
 1335   bool IsIDefComponentIndex() 
const;
 
 1341   bool IsPolyCurveComponentIndex() 
const;
 
 1347   bool IsGroupMemberComponentIndex() 
const;
 
 1354   bool IsExtrusionProfileComponentIndex() 
const;
 
 1360   bool IsExtrusionPathComponentIndex() 
const;
 
 1366   bool IsExtrusionWallEdgeComponentIndex() 
const;
 
 1372   bool IsExtrusionWallSurfaceComponentIndex() 
const;
 
 1379   bool IsExtrusionWallComponentIndex() 
const;
 
 1387   bool IsExtrusionComponentIndex() 
const;
 
 1393   bool IsPointCloudComponentIndex() 
const;
 
 1399   bool IsAnnotationComponentIndex() 
const;
 
 1469 unsigned int ON_SetStringConversionWindowsCodePage( 
 
 1470                 unsigned int code_page 
 
 1498 unsigned int ON_GetStringConversionWindowsCodePage();
 
 1519 unsigned int ON_SetStringConversionWindowsLocaleID( 
 
 1520                 unsigned int locale_id, 
 
 1538 unsigned int ON_GetStringConversionWindowsLocaleID();
 
 1543 int on_wcsicmp( 
const wchar_t*, 
const wchar_t* );
 
 1547 wchar_t* on_wcsupr(
wchar_t*);
 
 1551 wchar_t* on_wcslwr(
wchar_t*);
 
 1555 wchar_t* on_wcsrev(
wchar_t*);
 
 1561 int on_stricmp(
const char*, 
const char*); 
 
 1567 int on_strnicmp(
const char * s1, 
const char * s2, 
int n);
 
 1571 char* on_strupr(
char*);
 
 1575 char* on_strlwr(
char*);
 
 1579 char* on_strrev(
char*);
 
 1586 int on_WideCharToMultiByte(
 
 1598 int on_MultiByteToWideChar(
 
 1648 ON_DECL 
void on_splitpath(
 
 1700 ON_DECL 
void on_wsplitpath(
 
 1701   const wchar_t* path,
 
 1702   const wchar_t** drive,
 
 1703   const wchar_t** dir,
 
 1704   const wchar_t** fname,
 
bool operator!=(const OpenNI2VideoMode &video_mode_a, const OpenNI2VideoMode &video_mode_b)
bool operator<(const PersonCluster< PointT > &c1, const PersonCluster< PointT > &c2)
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)