scriptup 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +11 -0
- data/README.md +5 -0
- data/ext/attribute_dictionaries.c +45 -0
- data/ext/attribute_dictionaries.h +3 -0
- data/ext/attribute_dictionary.c +156 -0
- data/ext/attribute_dictionary.h +3 -0
- data/ext/behavior.c +10 -0
- data/ext/behavior.h +3 -0
- data/ext/color.c +211 -0
- data/ext/color.h +3 -0
- data/ext/component_definition.c +188 -0
- data/ext/component_definition.h +3 -0
- data/ext/component_instance.c +10 -0
- data/ext/component_instance.h +3 -0
- data/ext/definition_list.c +145 -0
- data/ext/definition_list.h +3 -0
- data/ext/drawing_element.c +10 -0
- data/ext/drawing_element.h +3 -0
- data/ext/entities.c +11 -0
- data/ext/entities.h +3 -0
- data/ext/entity.c +253 -0
- data/ext/entity.h +3 -0
- data/ext/extconf.rb +38 -0
- data/ext/material.c +242 -0
- data/ext/material.h +3 -0
- data/ext/materials.c +80 -0
- data/ext/materials.h +3 -0
- data/ext/model.c +42 -0
- data/ext/model.h +3 -0
- data/ext/sketchup.c +89 -0
- data/ext/sketchup.h +4 -0
- data/ext/texture.c +9 -0
- data/ext/texture.h +3 -0
- data/ext/typed_value.c +84 -0
- data/ext/typed_value.h +5 -0
- data/ext/utils.h +80 -0
- data/lib/sketchup.rb +12 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
- metadata +313 -0
@@ -0,0 +1,178 @@
|
|
1
|
+
// Copyright 2015 Trimble Inc., All rights reserved.
|
2
|
+
// This file is intended for public distribution.
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @file
|
6
|
+
* @brief Generic interfaces for the API types.
|
7
|
+
*/
|
8
|
+
#ifndef SKETCHUP_COMMON_H_
|
9
|
+
#define SKETCHUP_COMMON_H_
|
10
|
+
|
11
|
+
/**
|
12
|
+
@enum SUResult
|
13
|
+
@brief Defines return values used by most API functions.
|
14
|
+
*/
|
15
|
+
enum SUResult {
|
16
|
+
SU_ERROR_NONE = 0, ///< Indicates success.
|
17
|
+
|
18
|
+
SU_ERROR_NULL_POINTER_INPUT, ///< A pointer for a required input was NULL.
|
19
|
+
|
20
|
+
SU_ERROR_INVALID_INPUT, ///< An API object input to the function was not
|
21
|
+
///< created properly.
|
22
|
+
|
23
|
+
SU_ERROR_NULL_POINTER_OUTPUT, ///< A pointer for a required output was NULL.
|
24
|
+
|
25
|
+
SU_ERROR_INVALID_OUTPUT, ///< An API object to be written with output from the
|
26
|
+
///< function was not created properly.
|
27
|
+
|
28
|
+
SU_ERROR_OVERWRITE_VALID, ///< Indicates that an input object reference
|
29
|
+
///< already references an object where it was
|
30
|
+
///< expected to be \ref SU_INVALID.
|
31
|
+
|
32
|
+
SU_ERROR_GENERIC, ///< Indicates an unspecified error.
|
33
|
+
|
34
|
+
SU_ERROR_SERIALIZATION, ///< Indicate an error occurred during loading or
|
35
|
+
///< saving of a file.
|
36
|
+
|
37
|
+
SU_ERROR_OUT_OF_RANGE, ///< An input contained a value that was outside the
|
38
|
+
///< range of allowed values.
|
39
|
+
|
40
|
+
SU_ERROR_NO_DATA, ///< The requested operation has no data to return to the
|
41
|
+
///< user. This usually occurs when a request is made for
|
42
|
+
///< data that is only available conditionally.
|
43
|
+
|
44
|
+
SU_ERROR_INSUFFICIENT_SIZE, ///< Indicates that the size of an output
|
45
|
+
///< parameter is insufficient.
|
46
|
+
|
47
|
+
SU_ERROR_UNKNOWN_EXCEPTION, ///< An unknown exception occurred.
|
48
|
+
|
49
|
+
SU_ERROR_MODEL_INVALID, ///< The model requested is invalid and cannot be loaded.
|
50
|
+
|
51
|
+
SU_ERROR_MODEL_VERSION, ///< The model cannot be loaded or saved due to an
|
52
|
+
///< invalid version
|
53
|
+
|
54
|
+
SU_ERROR_LAYER_LOCKED, ///< The layer that is being modified is locked.
|
55
|
+
|
56
|
+
SU_ERROR_DUPLICATE, ///< The user requested an operation that would result
|
57
|
+
///< in duplicate data.
|
58
|
+
SU_ERROR_PARTIAL_SUCCESS, ///< The requested operation was not fully
|
59
|
+
///< completed but it returned an intermediate
|
60
|
+
///< successful result.
|
61
|
+
|
62
|
+
SU_ERROR_UNSUPPORTED, ///< The requested operation is not supported
|
63
|
+
|
64
|
+
SU_ERROR_INVALID_ARGUMENT, ///< An argument contains invalid information
|
65
|
+
|
66
|
+
SU_ERROR_ENTITY_LOCKED, ///< The entity being modified is locked
|
67
|
+
|
68
|
+
SU_ERROR_INVALID_OPERATION, ///< The requested operation is invalid.
|
69
|
+
};
|
70
|
+
|
71
|
+
// Define a platform-independent UTF16 type.
|
72
|
+
#if defined(__APPLE__) || defined(__LINUX__)
|
73
|
+
#ifndef FOUNDATION_IMPORT
|
74
|
+
typedef unsigned short unichar;
|
75
|
+
#endif // FOUNDATION_IMPORT
|
76
|
+
#else // WIN32
|
77
|
+
#include <wtypes.h>
|
78
|
+
typedef wchar_t unichar; ///< A platform-independent UTF16 type.
|
79
|
+
#endif
|
80
|
+
|
81
|
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
82
|
+
|
83
|
+
#define SU_EXPORT
|
84
|
+
#if defined WIN32 && !defined GSLAPI_NO_EXPORTS
|
85
|
+
#undef SU_EXPORT
|
86
|
+
#ifdef GSLAPI_API_EXPORTS
|
87
|
+
#define SU_EXPORT __declspec(dllexport)
|
88
|
+
#else
|
89
|
+
#define SU_EXPORT __declspec(dllimport)
|
90
|
+
#endif // GSLAPI_API_EXPORTS
|
91
|
+
#endif // WINDOWS
|
92
|
+
|
93
|
+
#if defined __APPLE__
|
94
|
+
#undef SU_EXPORT
|
95
|
+
#ifdef GSLAPI_API_EXPORTS
|
96
|
+
#define SU_EXPORT __attribute__((visibility("default")))
|
97
|
+
#else
|
98
|
+
#define SU_EXPORT __attribute__((visibility("hidden")))
|
99
|
+
#endif
|
100
|
+
#endif // #if defined __APPLE__
|
101
|
+
|
102
|
+
#define DEFINE_SU_TYPE(TYPENAME) \
|
103
|
+
typedef struct { \
|
104
|
+
void* ptr; \
|
105
|
+
} TYPENAME;
|
106
|
+
|
107
|
+
// #define SU_RESULT SU_EXPORT enum SUResult
|
108
|
+
|
109
|
+
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
110
|
+
|
111
|
+
/**
|
112
|
+
@brief Macro shortcut for enum \ref SUResult.
|
113
|
+
*/
|
114
|
+
#define SU_RESULT SU_EXPORT enum SUResult
|
115
|
+
|
116
|
+
/**
|
117
|
+
@brief Use this macro to initialize new reference variables.
|
118
|
+
e.g. \ref SUStringRef str = SU_INVALID;
|
119
|
+
*/
|
120
|
+
#define SU_INVALID \
|
121
|
+
{ 0 }
|
122
|
+
|
123
|
+
/**
|
124
|
+
@brief Use this macro to test for valid SU variables.
|
125
|
+
e.g. if (SUIsValid(result)) return true;
|
126
|
+
*/
|
127
|
+
#define SUIsValid(VARIABLE) ((VARIABLE).ptr != 0)
|
128
|
+
|
129
|
+
/**
|
130
|
+
@brief Use this macro to test for invalid SU variables.
|
131
|
+
e.g. if (SUIsInvalid(result)) return false;
|
132
|
+
*/
|
133
|
+
#define SUIsInvalid(VARIABLE) ((VARIABLE).ptr == 0)
|
134
|
+
|
135
|
+
/**
|
136
|
+
@brief Use this macro to set a reference invalid.
|
137
|
+
*/
|
138
|
+
#define SUSetInvalid(VARIABLE) (VARIABLE).ptr = 0
|
139
|
+
|
140
|
+
/**
|
141
|
+
@brief Use this macro to check if two references are equal.
|
142
|
+
*/
|
143
|
+
#define SUAreEqual(VARIABLE1, VARIABLE2) ((VARIABLE1).ptr == (VARIABLE2).ptr)
|
144
|
+
|
145
|
+
#include <stddef.h> // for size_t
|
146
|
+
|
147
|
+
#if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
|
148
|
+
// The host compiler does not implement C99
|
149
|
+
#ifdef WIN32
|
150
|
+
typedef __int64 int64_t;
|
151
|
+
typedef __int32 int32_t;
|
152
|
+
typedef __int16 int16_t;
|
153
|
+
typedef unsigned __int32 uint32_t;
|
154
|
+
#else
|
155
|
+
#error Unsupported compiler!
|
156
|
+
#endif
|
157
|
+
#else
|
158
|
+
#include <stdint.h>
|
159
|
+
#endif // #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
|
160
|
+
|
161
|
+
/**
|
162
|
+
@brief This macro is used to indicate if functions are intended to be
|
163
|
+
deprecated. If you would like to hide the deprecation warnings simply
|
164
|
+
define SU_SUPPRESS_DEPRECATION_WARNINGS
|
165
|
+
*/
|
166
|
+
#ifndef SU_SUPPRESS_DEPRECATION_WARNINGS
|
167
|
+
#ifdef WIN32
|
168
|
+
#define SU_DEPRECATED_FUNCTION(version_num) \
|
169
|
+
__declspec(deprecated("first deprecated in " version_num))
|
170
|
+
#else
|
171
|
+
#define SU_DEPRECATED_FUNCTION(version_num) \
|
172
|
+
__attribute__((deprecated("first deprecated in " version_num)))
|
173
|
+
#endif
|
174
|
+
#else
|
175
|
+
#define SU_DEPRECATED_FUNCTION(version_num)
|
176
|
+
#endif
|
177
|
+
|
178
|
+
#endif // SKETCHUP_COMMON_H_
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief General types for the API.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_DEFS_H_
|
8
|
+
#define SKETCHUP_DEFS_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
|
12
|
+
#pragma pack(push, 8)
|
13
|
+
|
14
|
+
DEFINE_SU_TYPE(SULengthFormatterRef)
|
15
|
+
DEFINE_SU_TYPE(SUStringRef)
|
16
|
+
|
17
|
+
#pragma pack(pop)
|
18
|
+
|
19
|
+
#endif // SKETCHUP_DEFS_H_
|
@@ -0,0 +1,62 @@
|
|
1
|
+
// Copyright 2014 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUExtensionLicense.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_EXTENSION_LICENSE_H_
|
8
|
+
#define SKETCHUP_EXTENSION_LICENSE_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
|
12
|
+
#pragma pack(push, 8)
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
/**
|
18
|
+
@brief Indicates the current state of an extension license.
|
19
|
+
*/
|
20
|
+
enum SUExtensionLicenseState {
|
21
|
+
SUExtensionLicenseState_Licensed, ///< Extension is licensed to run
|
22
|
+
SUExtensionLicenseState_Expired, ///< License had an expiration date and it expired
|
23
|
+
SUExtensionLicenseState_Trial, ///< Extension is in trial
|
24
|
+
SUExtensionLicenseState_TrialExpired, ///< Trial period has ended
|
25
|
+
SUExtensionLicenseState_NotLicensed ///< Extension is not licensed
|
26
|
+
};
|
27
|
+
|
28
|
+
/**
|
29
|
+
@brief Stores extension license information.
|
30
|
+
*/
|
31
|
+
struct SUExtensionLicense {
|
32
|
+
/// Main flag indicating whether the extension is allowed to run or not.
|
33
|
+
bool is_licensed;
|
34
|
+
/// Additional state information.
|
35
|
+
enum SUExtensionLicenseState state;
|
36
|
+
/// Number of days until license expiration. 0 if permanent or not licensed.
|
37
|
+
size_t days_remaining;
|
38
|
+
/// Error description in case of failure to acquire a license. This is meant
|
39
|
+
/// to aid in debugging only. Extensions should not rely on any exact error
|
40
|
+
/// description.
|
41
|
+
char error_description[512];
|
42
|
+
};
|
43
|
+
|
44
|
+
/**
|
45
|
+
@brief Acquires a license for a given extension.
|
46
|
+
@param[in] extension_id The Extension Warehouse UUID for the extension.
|
47
|
+
@param[out] out_license the licensing retrieved.
|
48
|
+
@related SUExtensionLicense
|
49
|
+
@return
|
50
|
+
- \ref SU_ERROR_NONE on success
|
51
|
+
- \ref SU_ERROR_GENERIC if retrieving the extension license failed
|
52
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if extension_id is NULL
|
53
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_license is NULL
|
54
|
+
*/
|
55
|
+
SU_RESULT SUGetExtensionLicense(const char* extension_id, struct SUExtensionLicense* out_license);
|
56
|
+
|
57
|
+
#ifdef __cplusplus
|
58
|
+
} // extern "C" {
|
59
|
+
#endif
|
60
|
+
#pragma pack(pop)
|
61
|
+
|
62
|
+
#endif // SKETCHUP_EXTENSION_LICENSE_H_
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUBoundingBox3D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_BOUNDING_BOX_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_BOUNDING_BOX_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
|
12
|
+
#ifdef __cplusplus
|
13
|
+
extern "C" {
|
14
|
+
#endif // __cplusplus
|
15
|
+
|
16
|
+
/**
|
17
|
+
@brief Gets the mid point from the given bounding box.
|
18
|
+
@since SketchUp 2018 M0, API 6.0
|
19
|
+
@param[in] bounding_box The bounding box to calculate the mid point from.
|
20
|
+
@param[out] mid_point The mid point to be returned.
|
21
|
+
@related SUBoundingBox3D
|
22
|
+
@return
|
23
|
+
- \ref SU_ERROR_NONE on success
|
24
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if bounding_box is NULL
|
25
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if mid_point NULL
|
26
|
+
*/
|
27
|
+
SU_RESULT SUBoundingBox3DGetMidPoint(
|
28
|
+
const struct SUBoundingBox3D* bounding_box, struct SUPoint3D* mid_point);
|
29
|
+
|
30
|
+
#ifdef __cplusplus
|
31
|
+
} // end extern "C"
|
32
|
+
#endif // __cplusplus
|
33
|
+
|
34
|
+
#endif // SKETCHUP_GEOMETRY_BOUNDING_BOX_H_
|
@@ -0,0 +1,153 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUPlane3D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_PLANE3D_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_PLANE3D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
|
12
|
+
#ifdef __cplusplus
|
13
|
+
extern "C" {
|
14
|
+
#endif // __cplusplus
|
15
|
+
|
16
|
+
/**
|
17
|
+
@brief Sets the plane using three points.
|
18
|
+
@since SketchUp 2018, API 6.0
|
19
|
+
@param[out] plane The plane defined by the three points.
|
20
|
+
@param[in] point1 The first point.
|
21
|
+
@param[in] point2 The second point.
|
22
|
+
@param[in] point3 The third point.
|
23
|
+
@related SUPlane3D
|
24
|
+
@return
|
25
|
+
- \ref SU_ERROR_NONE on success
|
26
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL
|
27
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1, point2, or point3 are NULL
|
28
|
+
*/
|
29
|
+
SU_RESULT SUPlane3DSetWithPoints(
|
30
|
+
struct SUPlane3D* plane, const struct SUPoint3D* point1, const struct SUPoint3D* point2,
|
31
|
+
const struct SUPoint3D* point3);
|
32
|
+
|
33
|
+
/**
|
34
|
+
@brief Sets the plane using a point and normal vector.
|
35
|
+
@since SketchUp 2018, API 6.0
|
36
|
+
@param[out] plane The plane defined by the point and normal.
|
37
|
+
@param[in] point The point.
|
38
|
+
@param[in] normal The normal vector.
|
39
|
+
@related SUPlane3D
|
40
|
+
@return
|
41
|
+
- \ref SU_ERROR_NONE on success
|
42
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL
|
43
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point or normal are NULL
|
44
|
+
*/
|
45
|
+
SU_RESULT SUPlane3DSetWithPointAndNormal(
|
46
|
+
struct SUPlane3D* plane, const struct SUPoint3D* point, const struct SUVector3D* normal);
|
47
|
+
|
48
|
+
/**
|
49
|
+
@brief Sets the plane using equation coefficients.
|
50
|
+
@since SketchUp 2018, API 6.0
|
51
|
+
@param[out] plane The plane defined by the coefficients.
|
52
|
+
@param[in] a The first coefficient.
|
53
|
+
@param[in] b The second coefficient.
|
54
|
+
@param[in] c The third coefficient.
|
55
|
+
@param[in] d The fourth coefficient.
|
56
|
+
@related SUPlane3D
|
57
|
+
@return
|
58
|
+
- \ref SU_ERROR_NONE on success
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL
|
60
|
+
*/
|
61
|
+
SU_RESULT SUPlane3DSetWithCoefficients(
|
62
|
+
struct SUPlane3D* plane, double a, double b, double c, double d);
|
63
|
+
|
64
|
+
/**
|
65
|
+
@brief Gets the position on the plane closest to the origin.
|
66
|
+
@since SketchUp 2016, API 4.0
|
67
|
+
@param[in] plane The plane from which to get the position.
|
68
|
+
@param[out] position The 3D point struct retrieved.
|
69
|
+
@related SUPlane3D
|
70
|
+
@return
|
71
|
+
- \ref SU_ERROR_NONE on success
|
72
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if plane is NULL
|
73
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if position is NULL
|
74
|
+
*/
|
75
|
+
SU_RESULT SUPlane3DGetPosition(const struct SUPlane3D* plane, struct SUPoint3D* position);
|
76
|
+
|
77
|
+
/**
|
78
|
+
@brief Gets the plane's unit normal vector.
|
79
|
+
@since SketchUp 2017, API 5.0
|
80
|
+
@param[in] plane The plane from which to get the normal.
|
81
|
+
@param[out] normal The 3D vector struct retrieved.
|
82
|
+
@related SUPlane3D
|
83
|
+
@return
|
84
|
+
- \ref SU_ERROR_NONE on success
|
85
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if plane is NULL
|
86
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL
|
87
|
+
*/
|
88
|
+
SU_RESULT SUPlane3DGetNormal(const struct SUPlane3D* plane, struct SUVector3D* normal);
|
89
|
+
|
90
|
+
/**
|
91
|
+
@brief Gets whether or not the point is on the plane.
|
92
|
+
@since SketchUp 2018, API 6.0
|
93
|
+
@param[in] plane The plane.
|
94
|
+
@param[in] point The 3D point.
|
95
|
+
@param[out] is_on Whether or not the point is on the plane.
|
96
|
+
@related SUPlane3D
|
97
|
+
@return
|
98
|
+
- \ref SU_ERROR_NONE on success
|
99
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if plane or point are NULL
|
100
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_on is NULL
|
101
|
+
*/
|
102
|
+
SU_RESULT SUPlane3DIsOn(const struct SUPlane3D* plane, const struct SUPoint3D* point, bool* is_on);
|
103
|
+
|
104
|
+
/**
|
105
|
+
@brief Gets the distance from the point to the nearest point on the plane.
|
106
|
+
@since SketchUp 2018, API 6.0
|
107
|
+
@param[in] plane The plane.
|
108
|
+
@param[in] point The 3D point.
|
109
|
+
@param[out] distance The distance between the plane and point.
|
110
|
+
@related SUPlane3D
|
111
|
+
@return
|
112
|
+
- \ref SU_ERROR_NONE on success
|
113
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if plane or point are NULL
|
114
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if distance is NULL
|
115
|
+
*/
|
116
|
+
SU_RESULT SUPlane3DDistanceTo(
|
117
|
+
const struct SUPlane3D* plane, const struct SUPoint3D* point, double* distance);
|
118
|
+
|
119
|
+
/**
|
120
|
+
@brief Projects a point onto the plane.
|
121
|
+
@since SketchUp 2018, API 6.0
|
122
|
+
@param[in] plane The plane.
|
123
|
+
@param[in] point The 3D point to project onto the plane.
|
124
|
+
@param[out] projected_point The point resulting from the projection.
|
125
|
+
@related SUPlane3D
|
126
|
+
@return
|
127
|
+
- \ref SU_ERROR_NONE on success
|
128
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if plane or point are NULL
|
129
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if projected_point is NULL
|
130
|
+
*/
|
131
|
+
SU_RESULT SUPlane3DProjectTo(
|
132
|
+
const struct SUPlane3D* plane, const struct SUPoint3D* point,
|
133
|
+
struct SUPoint3D* projected_point);
|
134
|
+
|
135
|
+
/**
|
136
|
+
@brief Transforms the provided 3D plane by applying the provided 3D
|
137
|
+
transformation.
|
138
|
+
@since SketchUp 2018, API 6.0
|
139
|
+
@param[in] transform The transformation to be applied.
|
140
|
+
@param[in,out] plane The plane to be transformed.
|
141
|
+
@related SUPlane3D
|
142
|
+
@return
|
143
|
+
- \ref SU_ERROR_NONE on success
|
144
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
145
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL
|
146
|
+
*/
|
147
|
+
SU_RESULT SUPlane3DTransform(const struct SUTransformation* transform, struct SUPlane3D* plane);
|
148
|
+
|
149
|
+
#ifdef __cplusplus
|
150
|
+
} // end extern "C"
|
151
|
+
#endif // __cplusplus
|
152
|
+
|
153
|
+
#endif // SKETCHUP_GEOMETRY_PLANE3D_H_
|
@@ -0,0 +1,96 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUPoint2D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_POINT2D_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_POINT2D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
/**
|
18
|
+
@brief Creates a vector between two point objects.
|
19
|
+
@since SketchUp 2017, API 5.0
|
20
|
+
@deprecated The functionality is replaced by SUVector2DCreate.
|
21
|
+
@param[in] point1 The first point object.
|
22
|
+
@param[in] point2 The second point object.
|
23
|
+
@param[out] vector The vector from point1 to point2.
|
24
|
+
@related SUPoint2D
|
25
|
+
@return
|
26
|
+
- \ref SU_ERROR_NONE on success
|
27
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
28
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
|
29
|
+
*/
|
30
|
+
SU_DEPRECATED_FUNCTION("SketchUp API 6.0")
|
31
|
+
SU_RESULT SUPoint2DToSUPoint2D(
|
32
|
+
const struct SUPoint2D* point1, const struct SUPoint2D* point2, struct SUVector2D* vector);
|
33
|
+
|
34
|
+
/**
|
35
|
+
@brief Determines if two points are equal.
|
36
|
+
@since SketchUp 2017, API 5.0
|
37
|
+
@param[in] point1 The first point object.
|
38
|
+
@param[in] point2 The second point object.
|
39
|
+
@param[out] equal Whether the two points are the same.
|
40
|
+
@related SUPoint2D
|
41
|
+
@return
|
42
|
+
- \ref SU_ERROR_NONE on success
|
43
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
44
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if equal is NULL
|
45
|
+
*/
|
46
|
+
SU_RESULT SUPoint2DGetEqual(
|
47
|
+
const struct SUPoint2D* point1, const struct SUPoint2D* point2, bool* equal);
|
48
|
+
|
49
|
+
/**
|
50
|
+
@brief Creates a new point that is offset from another point.
|
51
|
+
@since SketchUp 2017, API 5.0
|
52
|
+
@param[in] point1 The point object.
|
53
|
+
@param[in] vector The offset vector object.
|
54
|
+
@param[out] point2 The new point.
|
55
|
+
@related SUPoint2D
|
56
|
+
@return
|
57
|
+
- \ref SU_ERROR_NONE on success
|
58
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or vector is NULL
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point2 is NULL
|
60
|
+
*/
|
61
|
+
SU_RESULT SUPoint2DOffset(
|
62
|
+
const struct SUPoint2D* point1, const struct SUVector2D* vector, struct SUPoint2D* point2);
|
63
|
+
|
64
|
+
/**
|
65
|
+
@brief Gets the distance between two point objects.
|
66
|
+
@since SketchUp 2017, API 5.0
|
67
|
+
@param[in] point1 The first point object.
|
68
|
+
@param[in] point2 The second point object.
|
69
|
+
@param[out] distance The distance between the two points.
|
70
|
+
@related SUPoint2D
|
71
|
+
@return
|
72
|
+
- \ref SU_ERROR_NONE on success
|
73
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
74
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if distance is NULL
|
75
|
+
*/
|
76
|
+
SU_RESULT SUPoint2DDistanceToSUPoint2D(
|
77
|
+
const struct SUPoint2D* point1, const struct SUPoint2D* point2, double* distance);
|
78
|
+
|
79
|
+
/**
|
80
|
+
@brief Transforms a point by applying a 2D transformation.
|
81
|
+
@since SketchUp 2019, API 7.0
|
82
|
+
@param[in] transform The transformation to be applied.
|
83
|
+
@param[in,out] point The point to be transformed.
|
84
|
+
@related SUPoint2D
|
85
|
+
@return
|
86
|
+
- \ref SU_ERROR_NONE on success
|
87
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
88
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
|
89
|
+
*/
|
90
|
+
SU_RESULT SUPoint2DTransform(const struct SUTransformation2D* transform, struct SUPoint2D* point);
|
91
|
+
|
92
|
+
#ifdef __cplusplus
|
93
|
+
} // extern "C"
|
94
|
+
#endif
|
95
|
+
|
96
|
+
#endif // SKETCHUP_GEOMETRY_POINT2D_H_
|
@@ -0,0 +1,98 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUPoint3D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_POINT3D_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_POINT3D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
|
13
|
+
// Forward declarations
|
14
|
+
struct SUTransformation;
|
15
|
+
|
16
|
+
#ifdef __cplusplus
|
17
|
+
extern "C" {
|
18
|
+
#endif
|
19
|
+
|
20
|
+
/**
|
21
|
+
@brief Determines if two points are equal.
|
22
|
+
@since SketchUp 2018 M0, API 6.0
|
23
|
+
@param[in] point1 The first point object.
|
24
|
+
@param[in] point2 The second point object.
|
25
|
+
@param[out] equal Whether the two points are the same.
|
26
|
+
@related SUPoint3D
|
27
|
+
@return
|
28
|
+
- \ref SU_ERROR_NONE on success
|
29
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
30
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if equal is NULL
|
31
|
+
*/
|
32
|
+
SU_RESULT SUPoint3DGetEqual(
|
33
|
+
const struct SUPoint3D* point1, const struct SUPoint3D* point2, bool* equal);
|
34
|
+
|
35
|
+
/**
|
36
|
+
@brief Determines if point1 is less than point2.
|
37
|
+
@since SketchUp 2018 M0, API 6.0
|
38
|
+
@param[in] point1 The first point object.
|
39
|
+
@param[in] point2 The second point object.
|
40
|
+
@param[out] less_than Whether point1 is less than point2.
|
41
|
+
@related SUPoint3D
|
42
|
+
@return
|
43
|
+
- \ref SU_ERROR_NONE on success
|
44
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
45
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if less_than is NULL
|
46
|
+
*/
|
47
|
+
SU_RESULT SUPoint3DLessThan(
|
48
|
+
const struct SUPoint3D* point1, const struct SUPoint3D* point2, bool* less_than);
|
49
|
+
|
50
|
+
/**
|
51
|
+
@brief Creates a new point that is offset from another point.
|
52
|
+
@since SketchUp 2018 M0, API 6.0
|
53
|
+
@param[in] point1 The point object.
|
54
|
+
@param[in] vector The offset vector object.
|
55
|
+
@param[out] point2 The new point.
|
56
|
+
@related SUPoint3D
|
57
|
+
@return
|
58
|
+
- \ref SU_ERROR_NONE on success
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or vector is NULL
|
60
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point2 is NULL
|
61
|
+
*/
|
62
|
+
SU_RESULT SUPoint3DOffset(
|
63
|
+
const struct SUPoint3D* point1, const struct SUVector3D* vector, struct SUPoint3D* point2);
|
64
|
+
|
65
|
+
/**
|
66
|
+
@brief Gets the distance between two point objects.
|
67
|
+
@since SketchUp 2018 M0, API 6.0
|
68
|
+
@param[in] point1 The first point object.
|
69
|
+
@param[in] point2 The second point object.
|
70
|
+
@param[out] distance The distance between the two points.
|
71
|
+
@related SUPoint3D
|
72
|
+
@return
|
73
|
+
- \ref SU_ERROR_NONE on success
|
74
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point1 or point2 is NULL
|
75
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if distance is NULL
|
76
|
+
*/
|
77
|
+
SU_RESULT SUPoint3DDistanceToSUPoint3D(
|
78
|
+
const struct SUPoint3D* point1, const struct SUPoint3D* point2, double* distance);
|
79
|
+
|
80
|
+
/**
|
81
|
+
@brief Transforms the provided 3D point by applying the provided 3D
|
82
|
+
transformation.
|
83
|
+
@since SketchUp 2016, API 4.0
|
84
|
+
@param[in] transform The transformation to be applied.
|
85
|
+
@param[in,out] point The point to be transformed.
|
86
|
+
@related SUPoint3D
|
87
|
+
@return
|
88
|
+
- \ref SU_ERROR_NONE on success
|
89
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
90
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if point is NULL
|
91
|
+
*/
|
92
|
+
SU_RESULT SUPoint3DTransform(const struct SUTransformation* transform, struct SUPoint3D* point);
|
93
|
+
|
94
|
+
#ifdef __cplusplus
|
95
|
+
} // extern "C"
|
96
|
+
#endif
|
97
|
+
|
98
|
+
#endif // SKETCHUP_GEOMETRY_POINT3D_H_
|