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,64 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SURay3D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_RAY3D_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_RAY3D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
|
12
|
+
#ifdef __cplusplus
|
13
|
+
extern "C" {
|
14
|
+
#endif // __cplusplus
|
15
|
+
|
16
|
+
/**
|
17
|
+
@brief Gets whether or not the point is on the ray.
|
18
|
+
@since SketchUp 2018, API 6.0
|
19
|
+
@param[in] ray The ray.
|
20
|
+
@param[in] point The 3D point.
|
21
|
+
@param[out] is_on Whether or not the point is on the ray.
|
22
|
+
@related SURay3D
|
23
|
+
@return
|
24
|
+
- \ref SU_ERROR_NONE on success
|
25
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
|
26
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_on is NULL
|
27
|
+
*/
|
28
|
+
SU_RESULT SURay3DIsOn(const struct SURay3D* ray, const struct SUPoint3D* point, bool* is_on);
|
29
|
+
|
30
|
+
/**
|
31
|
+
@brief Gets the distance from the point to the ray.
|
32
|
+
@since SketchUp 2018, API 6.0
|
33
|
+
@param[in] ray The ray.
|
34
|
+
@param[in] point The 3D point.
|
35
|
+
@param[out] distance The distance between the ray and point.
|
36
|
+
@related SURay3D
|
37
|
+
@return
|
38
|
+
- \ref SU_ERROR_NONE on success
|
39
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
|
40
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if distance is NULL
|
41
|
+
*/
|
42
|
+
SU_RESULT SURay3DDistanceTo(
|
43
|
+
const struct SURay3D* ray, const struct SUPoint3D* point, double* distance);
|
44
|
+
|
45
|
+
/**
|
46
|
+
@brief Projects a point onto the ray.
|
47
|
+
@since SketchUp 2018, API 6.0
|
48
|
+
@param[in] ray The ray.
|
49
|
+
@param[in] point The 3D point to project onto the ray.
|
50
|
+
@param[out] projected_point The point resulting from the projection.
|
51
|
+
@related SURay3D
|
52
|
+
@return
|
53
|
+
- \ref SU_ERROR_NONE on success
|
54
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if ray or point are NULL
|
55
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if projected_point is NULL
|
56
|
+
*/
|
57
|
+
SU_RESULT SURay3DProjectTo(
|
58
|
+
const struct SURay3D* ray, const struct SUPoint3D* point, struct SUPoint3D* projected_point);
|
59
|
+
|
60
|
+
#ifdef __cplusplus
|
61
|
+
} // end extern "C"
|
62
|
+
#endif // __cplusplus
|
63
|
+
|
64
|
+
#endif // SKETCHUP_GEOMETRY_RAY3D_H_
|
@@ -0,0 +1,321 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUTransformation.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_TRANSFORMATION_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_TRANSFORMATION_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
|
12
|
+
#pragma pack(push, 8)
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif // __cplusplus
|
17
|
+
|
18
|
+
/**
|
19
|
+
@brief Sets the transformation based on the provided point and z-axis vector.
|
20
|
+
The resulting transformation transforms points/vectors to a new
|
21
|
+
coordinate system where the provided point is the new origin and the
|
22
|
+
vector is the new z-axis. The other two axes in the transformed space
|
23
|
+
are computed using the "Arbitrary axis algorithm".
|
24
|
+
@since SketchUp 2017, API 5.0
|
25
|
+
@param[out] transform The transformation to be set.
|
26
|
+
@param[in] point The point specifying the translation component of the
|
27
|
+
transformation.
|
28
|
+
@param[in] normal The 3D vector specifying the rotation component of the
|
29
|
+
transformation. This is treated as a unit vector, so any
|
30
|
+
scaling will be ignored.
|
31
|
+
@related SUTransformation
|
32
|
+
@return
|
33
|
+
- \ref SU_ERROR_NONE on success
|
34
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
35
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point or normal are NULL
|
36
|
+
*/
|
37
|
+
SU_RESULT SUTransformationSetFromPointAndNormal(
|
38
|
+
struct SUTransformation* transform, const struct SUPoint3D* point,
|
39
|
+
const struct SUVector3D* normal);
|
40
|
+
|
41
|
+
/**
|
42
|
+
@brief Sets the transformation based on the provided origin and axes.
|
43
|
+
@since SketchUp 2018, API 6.0
|
44
|
+
@param[out] transform The transformation to be set.
|
45
|
+
@param[in] point The point specifying the translation component of the
|
46
|
+
transformation.
|
47
|
+
@param[in] x_axis The 3D vector specifying the x-axis for the transformation.
|
48
|
+
This is treated as a unit vector, so any scaling will be
|
49
|
+
ignored.
|
50
|
+
@param[in] y_axis The 3D vector specifying the y-axis for the transformation.
|
51
|
+
This is treated as a unit vector, so any scaling will be
|
52
|
+
ignored.
|
53
|
+
@param[in] z_axis The 3D vector specifying the z-axis for the transformation.
|
54
|
+
This is treated as a unit vector, so any scaling will be
|
55
|
+
ignored.
|
56
|
+
@related SUTransformation
|
57
|
+
@return
|
58
|
+
- \ref SU_ERROR_NONE on success
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
60
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point, x_axis, y_axis, or z_axis are NULL
|
61
|
+
*/
|
62
|
+
SU_RESULT SUTransformationSetFromPointAndAxes(
|
63
|
+
struct SUTransformation* transform, const struct SUPoint3D* point,
|
64
|
+
const struct SUVector3D* x_axis, const struct SUVector3D* y_axis,
|
65
|
+
const struct SUVector3D* z_axis);
|
66
|
+
|
67
|
+
/**
|
68
|
+
@brief Creates a translation transformation using the given vector.
|
69
|
+
@since SketchUp 2018, API 6.0
|
70
|
+
@param[out] transform The transformation to be set.
|
71
|
+
@param[in] vector The 3D vector specifying the translation for the
|
72
|
+
transformation.
|
73
|
+
@related SUTransformation
|
74
|
+
@return
|
75
|
+
- \ref SU_ERROR_NONE on success
|
76
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
77
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
|
78
|
+
*/
|
79
|
+
SU_RESULT SUTransformationTranslation(
|
80
|
+
struct SUTransformation* transform, const struct SUVector3D* vector);
|
81
|
+
|
82
|
+
/**
|
83
|
+
@brief Creates a scale transformation using the given scale value.
|
84
|
+
@since SketchUp 2018, API 6.0
|
85
|
+
@param[out] transform The transformation to be set.
|
86
|
+
@param[in] scale The scale value for the transformation.
|
87
|
+
@related SUTransformation
|
88
|
+
@return
|
89
|
+
- \ref SU_ERROR_NONE on success
|
90
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
91
|
+
*/
|
92
|
+
SU_RESULT SUTransformationScale(struct SUTransformation* transform, double scale);
|
93
|
+
|
94
|
+
/**
|
95
|
+
@brief Creates a scale transformation using the given scale values.
|
96
|
+
@since SketchUp 2018, API 6.0
|
97
|
+
@param[out] transform The transformation to be set.
|
98
|
+
@param[in] x_scale The x-axis scale value for the transformation.
|
99
|
+
@param[in] y_scale The y-axis scale value for the transformation.
|
100
|
+
@param[in] z_scale The z-axis scale value for the transformation.
|
101
|
+
@related SUTransformation
|
102
|
+
@return
|
103
|
+
- \ref SU_ERROR_NONE on success
|
104
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
105
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if x_scale, y_scale, or z_scale are NULL
|
106
|
+
*/
|
107
|
+
SU_RESULT SUTransformationNonUniformScale(
|
108
|
+
struct SUTransformation* transform, double x_scale, double y_scale, double z_scale);
|
109
|
+
|
110
|
+
/**
|
111
|
+
@brief Creates a scale transformation using the given scale value and origin.
|
112
|
+
@since SketchUp 2018, API 6.0
|
113
|
+
@param[out] transform The transformation to be set.
|
114
|
+
@param[in] point The point specifying the translation component of the
|
115
|
+
transformation.
|
116
|
+
@param[in] scale The scale value for the transformation.
|
117
|
+
@related SUTransformation
|
118
|
+
@return
|
119
|
+
- \ref SU_ERROR_NONE on success
|
120
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
121
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point or scale are NULL
|
122
|
+
*/
|
123
|
+
SU_RESULT SUTransformationScaleAboutPoint(
|
124
|
+
struct SUTransformation* transform, const struct SUPoint3D* point, double scale);
|
125
|
+
|
126
|
+
/**
|
127
|
+
@brief Creates a scale transformation using the given scale values and origin.
|
128
|
+
@since SketchUp 2018, API 6.0
|
129
|
+
@param[out] transform The transformation to be set.
|
130
|
+
@param[in] point The point specifying the translation component of the
|
131
|
+
transformation.
|
132
|
+
@param[in] x_scale The x-axis scale value for the transformation.
|
133
|
+
@param[in] y_scale The y-axis scale value for the transformation.
|
134
|
+
@param[in] z_scale The z-axis scale value for the transformation.
|
135
|
+
@related SUTransformation
|
136
|
+
@return
|
137
|
+
- \ref SU_ERROR_NONE on success
|
138
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
139
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point, x_scale, y_scale, or z_scale are
|
140
|
+
NULL
|
141
|
+
*/
|
142
|
+
SU_RESULT SUTransformationNonUniformScaleAboutPoint(
|
143
|
+
struct SUTransformation* transform, const struct SUPoint3D* point, double x_scale,
|
144
|
+
double y_scale, double z_scale);
|
145
|
+
|
146
|
+
/**
|
147
|
+
@brief Creates a transformation given an origin, vector of rotation, and angle.
|
148
|
+
@since SketchUp 2018, API 6.0
|
149
|
+
@param[out] transform The calculated transformation.
|
150
|
+
@param[in] point The point specifying the translation component of the
|
151
|
+
transformation.
|
152
|
+
@param[in] vector The vector about which rotation will occur.
|
153
|
+
@param[in] angle The rotation in radians for the transformation.
|
154
|
+
@related SUTransformation
|
155
|
+
@return
|
156
|
+
- \ref SU_ERROR_NONE on success
|
157
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point or vector is NULL
|
158
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
159
|
+
- \ref SU_ERROR_OUT_OF_RANGE if weight is not between 0.0 and 1.0
|
160
|
+
*/
|
161
|
+
SU_RESULT SUTransformationRotation(
|
162
|
+
struct SUTransformation* transform, const struct SUPoint3D* point,
|
163
|
+
const struct SUVector3D* vector, double angle);
|
164
|
+
|
165
|
+
/**
|
166
|
+
@brief Performs an interpolation between two transformations. The weight
|
167
|
+
determines the amount of interpolation. A weight of 0.0 would return
|
168
|
+
a transformation of t1, while a weight of 1.0 would return a
|
169
|
+
transformation of t2.
|
170
|
+
@since SketchUp 2018, API 6.0
|
171
|
+
@param[out] transform The result of the interpolation.
|
172
|
+
@param[in] t1 The first transformation object.
|
173
|
+
@param[in] t2 The second transformation object.
|
174
|
+
@param[in] weight The weight determines the amount of interpolation from
|
175
|
+
t1 to t2.
|
176
|
+
@related SUTransformation
|
177
|
+
@return
|
178
|
+
- \ref SU_ERROR_NONE on success
|
179
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if t1 or t2 is NULL
|
180
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
181
|
+
- \ref SU_ERROR_OUT_OF_RANGE if weight is not between 0.0 and 1.0
|
182
|
+
*/
|
183
|
+
SU_RESULT SUTransformationInterpolate(
|
184
|
+
struct SUTransformation* transform, const struct SUTransformation* t1,
|
185
|
+
const struct SUTransformation* t2, double weight);
|
186
|
+
|
187
|
+
/**
|
188
|
+
@brief Gets whether the transformation is an identity transformation.
|
189
|
+
@since SketchUp 2018, API 6.0
|
190
|
+
@param[in] transform The transformation object.
|
191
|
+
@param[out] is_identity Whether the transformation is identity.
|
192
|
+
@related SUTransformation
|
193
|
+
@return
|
194
|
+
- \ref SU_ERROR_NONE on success
|
195
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
196
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_identity is NULL
|
197
|
+
*/
|
198
|
+
SU_RESULT SUTransformationIsIdentity(const struct SUTransformation* transform, bool* is_identity);
|
199
|
+
|
200
|
+
/**
|
201
|
+
@brief Gets the inverse transformation of the given transformation object.
|
202
|
+
@since SketchUp 2018, API 6.0
|
203
|
+
@param[in] transform The transformation object.
|
204
|
+
@param[out] inverse The inverse transformation object.
|
205
|
+
@related SUTransformation
|
206
|
+
@return
|
207
|
+
- \ref SU_ERROR_NONE on success
|
208
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
209
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if inverse is NULL
|
210
|
+
- \ref SU_ERROR_INVALID_ARGUMENT if the transform cannot be inverted
|
211
|
+
*/
|
212
|
+
SU_RESULT SUTransformationGetInverse(
|
213
|
+
const struct SUTransformation* transform, struct SUTransformation* inverse);
|
214
|
+
|
215
|
+
/**
|
216
|
+
@brief Gets the origin point of the given transformation object.
|
217
|
+
@since SketchUp 2018, API 6.0
|
218
|
+
@param[in] transform The transformation object.
|
219
|
+
@param[out] origin The origin point to be retrieved.
|
220
|
+
@related SUTransformation
|
221
|
+
@return
|
222
|
+
- \ref SU_ERROR_NONE on success
|
223
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
224
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if origin is NULL
|
225
|
+
*/
|
226
|
+
SU_RESULT SUTransformationGetOrigin(
|
227
|
+
const struct SUTransformation* transform, struct SUPoint3D* origin);
|
228
|
+
|
229
|
+
/**
|
230
|
+
@brief Gets the x axis vector of the given transformation object.
|
231
|
+
@since SketchUp 2018, API 6.0
|
232
|
+
@param[in] transform The transformation object.
|
233
|
+
@param[out] x_axis The x axis vector to be retrieved.
|
234
|
+
@related SUTransformation
|
235
|
+
@return
|
236
|
+
- \ref SU_ERROR_NONE on success
|
237
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
238
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if x_axis is NULL
|
239
|
+
*/
|
240
|
+
SU_RESULT SUTransformationGetXAxis(
|
241
|
+
const struct SUTransformation* transform, struct SUVector3D* x_axis);
|
242
|
+
|
243
|
+
/**
|
244
|
+
@brief Gets the y axis vector of the given transformation object.
|
245
|
+
@since SketchUp 2018, API 6.0
|
246
|
+
@param[in] transform The transformation object.
|
247
|
+
@param[out] y_axis The y axis vector to be retrieved.
|
248
|
+
@related SUTransformation
|
249
|
+
@return
|
250
|
+
- \ref SU_ERROR_NONE on success
|
251
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
252
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if y_axis is NULL
|
253
|
+
*/
|
254
|
+
SU_RESULT SUTransformationGetYAxis(
|
255
|
+
const struct SUTransformation* transform, struct SUVector3D* y_axis);
|
256
|
+
|
257
|
+
/**
|
258
|
+
@brief Gets the z_axis vector of the given transformation object.
|
259
|
+
@since SketchUp 2018, API 6.0
|
260
|
+
@param[in] transform The transformation object.
|
261
|
+
@param[out] z_axis The z_axis vector to be retrieved.
|
262
|
+
@related SUTransformation
|
263
|
+
@return
|
264
|
+
- \ref SU_ERROR_NONE on success
|
265
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
266
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if z_axis is NULL
|
267
|
+
*/
|
268
|
+
SU_RESULT SUTransformationGetZAxis(
|
269
|
+
const struct SUTransformation* transform, struct SUVector3D* z_axis);
|
270
|
+
|
271
|
+
/**
|
272
|
+
@brief Gets the rotation about the z axis from the given transformation object.
|
273
|
+
@since SketchUp 2018, API 6.0
|
274
|
+
@param[in] transform The transformation object.
|
275
|
+
@param[out] z_rotation The rotation to be retrieved.
|
276
|
+
@related SUTransformation
|
277
|
+
@return
|
278
|
+
- \ref SU_ERROR_NONE on success
|
279
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
280
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if z_rotation is NULL
|
281
|
+
*/
|
282
|
+
SU_RESULT SUTransformationGetZRotation(
|
283
|
+
const struct SUTransformation* transform, double* z_rotation);
|
284
|
+
|
285
|
+
/**
|
286
|
+
@brief Multiplies a transformation by another transformation.
|
287
|
+
@since SketchUp 2018, API 6.0
|
288
|
+
@param[in] transform1 The transformation object to be multiplied.
|
289
|
+
@param[in] transform2 The transformation object to multiply by.
|
290
|
+
@param[out] out_transform The result of the matrix multiplication
|
291
|
+
[transform1 * transform2].
|
292
|
+
@related SUTransformation
|
293
|
+
@return
|
294
|
+
- \ref SU_ERROR_NONE on success
|
295
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_transform is NULL
|
296
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform1 or transform2 is NULL
|
297
|
+
*/
|
298
|
+
SU_RESULT SUTransformationMultiply(
|
299
|
+
const struct SUTransformation* transform1, const struct SUTransformation* transform2,
|
300
|
+
struct SUTransformation* out_transform);
|
301
|
+
|
302
|
+
/**
|
303
|
+
@brief Returns true if transformation has been mirrored.
|
304
|
+
@since SketchUp 2019, API 7.0
|
305
|
+
@param[in] transform The transform object.
|
306
|
+
@param[out] is_mirrored Indicates if mirrored.
|
307
|
+
@related SUTransformation
|
308
|
+
@return
|
309
|
+
- \ref SU_ERROR_NONE on success
|
310
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_mirrored is NULL
|
311
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
312
|
+
*/
|
313
|
+
SU_RESULT SUTransformationIsMirrored(const struct SUTransformation* transform, bool* is_mirrored);
|
314
|
+
|
315
|
+
#ifdef __cplusplus
|
316
|
+
} // end extern "C"
|
317
|
+
#endif // __cplusplus
|
318
|
+
|
319
|
+
#pragma pack(pop)
|
320
|
+
|
321
|
+
#endif // SKETCHUP_GEOMETRY_TRANSFORMATION_H_
|
@@ -0,0 +1,163 @@
|
|
1
|
+
// Copyright 2017 Trimble Inc., All rights reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUTransformation2D.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_GEOMETRY_TRANSFORMATION2D_H_
|
8
|
+
#define SKETCHUP_GEOMETRY_TRANSFORMATION2D_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
|
12
|
+
#pragma pack(push, 8)
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif // __cplusplus
|
17
|
+
|
18
|
+
/**
|
19
|
+
@brief Creates a translation transformation using the given vector.
|
20
|
+
@since SketchUp 2019, API 7.0
|
21
|
+
@param[out] transform The transformation to be set.
|
22
|
+
@param[in] vector The 2D vector specifying the translation for the
|
23
|
+
transformation.
|
24
|
+
@related SUTransformation2D
|
25
|
+
@return
|
26
|
+
- \ref SU_ERROR_NONE on success
|
27
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
28
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
|
29
|
+
*/
|
30
|
+
SU_RESULT SUTransformation2DTranslation(
|
31
|
+
struct SUTransformation2D* transform, const struct SUVector2D* vector);
|
32
|
+
|
33
|
+
/**
|
34
|
+
@brief Creates a scale transformation using the given scale value.
|
35
|
+
@since SketchUp 2019, API 7.0
|
36
|
+
@param[out] transform The transformation to be set.
|
37
|
+
@param[in] scale The scale value for the transformation.
|
38
|
+
@related SUTransformation2D
|
39
|
+
@return
|
40
|
+
- \ref SU_ERROR_NONE on success
|
41
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
42
|
+
*/
|
43
|
+
SU_RESULT SUTransformation2DScale(struct SUTransformation2D* transform, double scale);
|
44
|
+
|
45
|
+
/**
|
46
|
+
@brief Creates a scale transformation using the given scale values.
|
47
|
+
@since SketchUp 2019, API 7.0
|
48
|
+
@param[out] transform The transformation to be set.
|
49
|
+
@param[in] x_scale The x-axis scale value for the transformation.
|
50
|
+
@param[in] y_scale The y-axis scale value for the transformation.
|
51
|
+
@related SUTransformation2D
|
52
|
+
@return
|
53
|
+
- \ref SU_ERROR_NONE on success
|
54
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
55
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if x_scale or y_scale are NULL
|
56
|
+
*/
|
57
|
+
SU_RESULT SUTransformation2DNonUniformScale(
|
58
|
+
struct SUTransformation2D* transform, double x_scale, double y_scale);
|
59
|
+
|
60
|
+
/**
|
61
|
+
@brief Creates a scale transformation using the given scale value and origin.
|
62
|
+
@since SketchUp 2019, API 7.0
|
63
|
+
@param[out] transform The transformation to be set.
|
64
|
+
@param[in] point The point specifying the translation component of the
|
65
|
+
transformation.
|
66
|
+
@param[in] scale The scale value for the transformation.
|
67
|
+
@related SUTransformation2D
|
68
|
+
@return
|
69
|
+
- \ref SU_ERROR_NONE on success
|
70
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
71
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point or scale are NULL
|
72
|
+
*/
|
73
|
+
SU_RESULT SUTransformation2DScaleAboutPoint(
|
74
|
+
struct SUTransformation2D* transform, const struct SUPoint2D* point, double scale);
|
75
|
+
|
76
|
+
/**
|
77
|
+
@brief Creates a scale transformation using the given scale values and origin.
|
78
|
+
@since SketchUp 2019, API 7.0
|
79
|
+
@param[out] transform The transformation to be set.
|
80
|
+
@param[in] point The point specifying the translation component of the
|
81
|
+
transformation.
|
82
|
+
@param[in] x_scale The x-axis scale value for the transformation.
|
83
|
+
@param[in] y_scale The y-axis scale value for the transformation.
|
84
|
+
@related SUTransformation2D
|
85
|
+
@return
|
86
|
+
- \ref SU_ERROR_NONE on success
|
87
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
88
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point, x_scale, or y_scale are NULL
|
89
|
+
*/
|
90
|
+
SU_RESULT SUTransformation2DNonUniformScaleAboutPoint(
|
91
|
+
struct SUTransformation2D* transform, const struct SUPoint2D* point, double x_scale,
|
92
|
+
double y_scale);
|
93
|
+
|
94
|
+
/**
|
95
|
+
@brief Creates a transformation given a point and angle.
|
96
|
+
@since SketchUp 2019, API 7.0
|
97
|
+
@param[out] transform The calculated transformation.
|
98
|
+
@param[in] point The point specifying the translation component of the
|
99
|
+
transformation.
|
100
|
+
@param[in] angle The rotation in radians for the transformation.
|
101
|
+
@related SUTransformation2D
|
102
|
+
@return
|
103
|
+
- \ref SU_ERROR_NONE on success
|
104
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
105
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_identity is NULL
|
106
|
+
- \ref SU_ERROR_OUT_OF_RANGE if weight is not between 0.0 and 1.0
|
107
|
+
*/
|
108
|
+
SU_RESULT SUTransformation2DRotation(
|
109
|
+
struct SUTransformation2D* transform, const struct SUPoint2D* point, double angle);
|
110
|
+
|
111
|
+
/**
|
112
|
+
@brief Gets whether the transformation is an identity transformation.
|
113
|
+
@since SketchUp 2019, API 7.0
|
114
|
+
@param[in] transform The transformation object.
|
115
|
+
@param[out] is_identity Whether the transformation is identity.
|
116
|
+
@related SUTransformation2D
|
117
|
+
@return
|
118
|
+
- \ref SU_ERROR_NONE on success
|
119
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
|
120
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if is_identity is NULL
|
121
|
+
*/
|
122
|
+
SU_RESULT SUTransformation2DIsIdentity(
|
123
|
+
const struct SUTransformation2D* transform, bool* is_identity);
|
124
|
+
|
125
|
+
/**
|
126
|
+
@brief Gets the inverse transformation of the given transformation object.
|
127
|
+
@since SketchUp 2019, API 7.0
|
128
|
+
@param[in] transform The transformation object.
|
129
|
+
@param[out] inverse The inverse transformation object.
|
130
|
+
@related SUTransformation2D
|
131
|
+
@return
|
132
|
+
- \ref SU_ERROR_NONE on success
|
133
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL
|
134
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if inverse is NULL
|
135
|
+
- \ref SU_ERROR_INVALID_ARGUMENT if the transform cannot be inverted
|
136
|
+
*/
|
137
|
+
SU_RESULT SUTransformation2DGetInverse(
|
138
|
+
const struct SUTransformation2D* transform, struct SUTransformation2D* inverse);
|
139
|
+
|
140
|
+
/**
|
141
|
+
@brief Multiplies a transformation by another transformation.
|
142
|
+
@since SketchUp 2019, API 7.0
|
143
|
+
@param[in] transform1 The transformation object to be multiplied.
|
144
|
+
@param[in] transform2 The transformation object to multiply by.
|
145
|
+
@param[out] out_transform The result of the matrix multiplication
|
146
|
+
[transform1 * transform2].
|
147
|
+
@related SUTransformation2D
|
148
|
+
@return
|
149
|
+
- \ref SU_ERROR_NONE on success
|
150
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if out_transform is NULL
|
151
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if transform1 or transform2 are NULL
|
152
|
+
*/
|
153
|
+
SU_RESULT SUTransformation2DMultiply(
|
154
|
+
const struct SUTransformation2D* transform1, const struct SUTransformation2D* transform2,
|
155
|
+
struct SUTransformation2D* out_transform);
|
156
|
+
|
157
|
+
#ifdef __cplusplus
|
158
|
+
} // end extern "C"
|
159
|
+
#endif // __cplusplus
|
160
|
+
|
161
|
+
#pragma pack(pop)
|
162
|
+
|
163
|
+
#endif // SKETCHUP_GEOMETRY_TRANSFORMATION2D_H_
|