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,92 @@
|
|
1
|
+
// Copyright 2015 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUDynamicComponentAttributeRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE_H_
|
8
|
+
#define SKETCHUP_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/unicodestring.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUDynamicComponentAttributeRef
|
20
|
+
@brief References attribute data about a dynamic component.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
@brief Gets the name of the attribute.
|
25
|
+
@since SketchUp 2016, API 4.0
|
26
|
+
@param[in] attribute The dynamic component attribute object.
|
27
|
+
@param[out] name The internal name of the attribute.
|
28
|
+
@related SUDynamicComponentAttributeRef
|
29
|
+
@return
|
30
|
+
- \ref SU_ERROR_NONE on success
|
31
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
32
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
|
33
|
+
- \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
|
34
|
+
SUStringRef object
|
35
|
+
*/
|
36
|
+
SU_RESULT SUDynamicComponentAttributeGetName(
|
37
|
+
SUDynamicComponentAttributeRef attribute, SUStringRef* name);
|
38
|
+
|
39
|
+
/**
|
40
|
+
@brief Gets the display name of the attribute.
|
41
|
+
@since SketchUp 2016, API 4.0
|
42
|
+
@param[in] attribute The dynamic component attribute object.
|
43
|
+
@param[out] display_name The attribute name as it should be displayed to the
|
44
|
+
user.
|
45
|
+
@related SUDynamicComponentAttributeRef
|
46
|
+
@return
|
47
|
+
- \ref SU_ERROR_NONE on success
|
48
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
49
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if display_name is NULL
|
50
|
+
- \ref SU_ERROR_INVALID_OUTPUT if display_name does not point to a valid \ref
|
51
|
+
SUStringRef object
|
52
|
+
*/
|
53
|
+
SU_RESULT SUDynamicComponentAttributeGetDisplayName(
|
54
|
+
SUDynamicComponentAttributeRef attribute, SUStringRef* display_name);
|
55
|
+
|
56
|
+
/**
|
57
|
+
@brief Gets the visibility setting of the attribute.
|
58
|
+
@since SketchUp 2016, API 4.0
|
59
|
+
@param[in] attribute The dynamic component attribute object.
|
60
|
+
@param[out] visible Set to true if the attribute is visible to users and
|
61
|
+
false if it is not.
|
62
|
+
@related SUDynamicComponentAttributeRef
|
63
|
+
@return
|
64
|
+
- \ref SU_ERROR_NONE on success
|
65
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
66
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if visible is NULL
|
67
|
+
*/
|
68
|
+
SU_RESULT SUDynamicComponentAttributeGetVisibility(
|
69
|
+
SUDynamicComponentAttributeRef attribute, bool* visible);
|
70
|
+
|
71
|
+
/**
|
72
|
+
@brief Gets the display value of the attribute.
|
73
|
+
@since SketchUp 2016, API 4.0
|
74
|
+
@param[in] attribute The dynamic component attribute object.
|
75
|
+
@param[out] display_value The value data for the attribute converted to a string
|
76
|
+
formatted as it should be displayed to the user.
|
77
|
+
@related SUDynamicComponentAttributeRef
|
78
|
+
@return
|
79
|
+
- \ref SU_ERROR_NONE on success
|
80
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
81
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if display_value is NULL
|
82
|
+
- \ref SU_ERROR_INVALID_OUTPUT if display_value does not point to a valid \ref
|
83
|
+
SUStringRef object
|
84
|
+
*/
|
85
|
+
SU_RESULT SUDynamicComponentAttributeGetDisplayValue(
|
86
|
+
SUDynamicComponentAttributeRef attribute, SUStringRef* display_value);
|
87
|
+
|
88
|
+
#ifdef __cplusplus
|
89
|
+
} // extern "C" {
|
90
|
+
#endif
|
91
|
+
|
92
|
+
#endif // SKETCHUP_MODEL_DYNAMIC_COMPONENT_ATTRIBUTE_H_
|
@@ -0,0 +1,70 @@
|
|
1
|
+
// Copyright 2015 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUDynamicComponentInfoRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_DYNAMIC_COMPONENT_INFO_H_
|
8
|
+
#define SKETCHUP_MODEL_DYNAMIC_COMPONENT_INFO_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/unicodestring.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUDynamicComponentInfoRef
|
20
|
+
@brief References an object with information about a dynamic component.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
@brief Releases the DC info. DC info objects are created from component instance
|
25
|
+
using SUComponentInstanceCreateDCInfo(), and must be released using
|
26
|
+
this function. This function also invalidates the given DC info.
|
27
|
+
@since SketchUp 2016, API 4.0
|
28
|
+
@param[in,out] dc_info The dynamic component info object.
|
29
|
+
@related SUDynamicComponentInfoRef
|
30
|
+
@return
|
31
|
+
- \ref SU_ERROR_NONE on success
|
32
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if dc_info is NULL
|
33
|
+
- \ref SU_ERROR_INVALID_INPUT if dc_info is not a valid object
|
34
|
+
*/
|
35
|
+
SU_RESULT SUDynamicComponentInfoRelease(SUDynamicComponentInfoRef* dc_info);
|
36
|
+
|
37
|
+
/**
|
38
|
+
@brief Retrieves the number of dynamic component attributes.
|
39
|
+
@param[in] dc_info The dynamic component info object.
|
40
|
+
@param[out] count The number of attributes.
|
41
|
+
@related SUDynamicComponentInfoRef
|
42
|
+
@return
|
43
|
+
- \ref SU_ERROR_NONE on success
|
44
|
+
- \ref SU_ERROR_INVALID_INPUT if dc_info is an invalid object
|
45
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
46
|
+
*/
|
47
|
+
SU_RESULT SUDynamicComponentInfoGetNumDCAttributes(
|
48
|
+
SUDynamicComponentInfoRef dc_info, size_t* count);
|
49
|
+
|
50
|
+
/**
|
51
|
+
@brief Retrieves the dynamic component attributes.
|
52
|
+
@param[in] dc_info The dynamic component info object.
|
53
|
+
@param[in] len The number of attributes to retrieve.
|
54
|
+
@param[out] attributes The attributes retrieved.
|
55
|
+
@param[out] count The number of attributes retrieved.
|
56
|
+
@related SUDynamicComponentInfoRef
|
57
|
+
@return
|
58
|
+
- \ref SU_ERROR_NONE on success
|
59
|
+
- \ref SU_ERROR_INVALID_INPUT if dc_info is an invalid object
|
60
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if attributes or count is NULL
|
61
|
+
*/
|
62
|
+
SU_RESULT SUDynamicComponentInfoGetDCAttributes(
|
63
|
+
SUDynamicComponentInfoRef dc_info, size_t len, SUDynamicComponentAttributeRef attributes[],
|
64
|
+
size_t* count);
|
65
|
+
|
66
|
+
#ifdef __cplusplus
|
67
|
+
} // extern "C" {
|
68
|
+
#endif
|
69
|
+
|
70
|
+
#endif // SKETCHUP_MODEL_DYNAMIC_COMPONENT_INFO_H_
|
@@ -0,0 +1,271 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUEdgeRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_EDGE_H_
|
8
|
+
#define SKETCHUP_MODEL_EDGE_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/color.h>
|
11
|
+
#include <SketchUpAPI/common.h>
|
12
|
+
#include <SketchUpAPI/geometry.h>
|
13
|
+
#include <SketchUpAPI/unicodestring.h>
|
14
|
+
#include <SketchUpAPI/transformation.h>
|
15
|
+
#include <SketchUpAPI/model/defs.h>
|
16
|
+
|
17
|
+
#ifdef __cplusplus
|
18
|
+
extern "C" {
|
19
|
+
#endif
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @struct SUEdgeRef
|
23
|
+
* @extends SUDrawingElementRef
|
24
|
+
* @brief References an edge.
|
25
|
+
*/
|
26
|
+
|
27
|
+
/**
|
28
|
+
@brief Converts from an \ref SUEdgeRef to an \ref SUEntityRef.
|
29
|
+
This is essentially an upcast operation.
|
30
|
+
@param[in] edge The given edge reference.
|
31
|
+
@related SUEdgeRef
|
32
|
+
@return
|
33
|
+
- The converted \ref SUEntityRef if edge is a valid edge
|
34
|
+
- If not, the returned reference will be invalid
|
35
|
+
*/
|
36
|
+
SU_EXPORT SUEntityRef SUEdgeToEntity(SUEdgeRef edge);
|
37
|
+
|
38
|
+
/**
|
39
|
+
@brief Converts from an \ref SUEntityRef to an \ref SUEdgeRef.
|
40
|
+
This is essentially a downcast operation so the given entity must be
|
41
|
+
convertible to an \ref SUEdgeRef.
|
42
|
+
@param[in] entity The given entity reference.
|
43
|
+
@related SUEdgeRef
|
44
|
+
@return
|
45
|
+
- The converted \ref SUEdgeRef if the downcast operation succeeds
|
46
|
+
- If not, the returned reference will be invalid
|
47
|
+
*/
|
48
|
+
SU_EXPORT SUEdgeRef SUEdgeFromEntity(SUEntityRef entity);
|
49
|
+
|
50
|
+
/**
|
51
|
+
@brief Converts from an \ref SUEdgeRef to an \ref SUDrawingElementRef.
|
52
|
+
This is essentially an upcast operation.
|
53
|
+
@param[in] edge The given edge reference.
|
54
|
+
@related SUEdgeRef
|
55
|
+
@return
|
56
|
+
- The converted \ref SUEntityRef if edge is a valid edge
|
57
|
+
- If not, the returned reference will be invalid
|
58
|
+
*/
|
59
|
+
SU_EXPORT SUDrawingElementRef SUEdgeToDrawingElement(SUEdgeRef edge);
|
60
|
+
|
61
|
+
/**
|
62
|
+
@brief Converts from an \ref SUDrawingElementRef to an \ref SUEdgeRef.
|
63
|
+
This is essentially a downcast operation so the given element must be
|
64
|
+
convertible to an \ref SUEdgeRef.
|
65
|
+
@param[in] drawing_elem The given element reference.
|
66
|
+
@related SUEdgeRef
|
67
|
+
@return
|
68
|
+
- The converted \ref SUEdgeRef if the downcast operation succeeds
|
69
|
+
- If not, the returned reference will be invalid.
|
70
|
+
*/
|
71
|
+
SU_EXPORT SUEdgeRef SUEdgeFromDrawingElement(SUDrawingElementRef drawing_elem);
|
72
|
+
|
73
|
+
/**
|
74
|
+
@brief Creates a new edge object.
|
75
|
+
|
76
|
+
The edge object must be subsequently deallocated with \ref SUEdgeRelease() unless
|
77
|
+
the edge object is associated with a parent object.
|
78
|
+
@param[out] edge The edge object.
|
79
|
+
@param[in] start The start position of the edge object.
|
80
|
+
@param[in] end The end position of the edge object.
|
81
|
+
@related SUEdgeRef
|
82
|
+
@return
|
83
|
+
- \ref SU_ERROR_NONE on success
|
84
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if start or end is NULL
|
85
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if edge is NULL
|
86
|
+
- \ref SU_ERROR_GENERIC if start and end specify the same position.
|
87
|
+
*/
|
88
|
+
SU_RESULT SUEdgeCreate(SUEdgeRef* edge, const struct SUPoint3D* start, const struct SUPoint3D* end);
|
89
|
+
|
90
|
+
/**
|
91
|
+
@brief Releases an edge object.
|
92
|
+
|
93
|
+
The edge object must have been created with SUEdgeCreate() and not
|
94
|
+
subsequently associated with a parent object (e.g. SUEntitiesAddEdges()).
|
95
|
+
@param[in] edge The edge object.
|
96
|
+
@related SUEdgeRef
|
97
|
+
@return
|
98
|
+
- \ref SU_ERROR_NONE on success
|
99
|
+
- \ref SU_ERROR_INVALID_INPUT if edge does not reference a valid object
|
100
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if edge is NULL
|
101
|
+
*/
|
102
|
+
SU_RESULT SUEdgeRelease(SUEdgeRef* edge);
|
103
|
+
|
104
|
+
/**
|
105
|
+
@brief Retrieves the associated curve object of an edge object.
|
106
|
+
@param[in] edge The edge object.
|
107
|
+
@param[out] curve The curve object retrieved.
|
108
|
+
@related SUEdgeRef
|
109
|
+
@return
|
110
|
+
- \ref SU_ERROR_NONE on success
|
111
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if curve is NULL
|
112
|
+
- \ref SU_ERROR_NO_DATA if the edge object is not associated with a curve
|
113
|
+
object.
|
114
|
+
*/
|
115
|
+
SU_RESULT SUEdgeGetCurve(SUEdgeRef edge, SUCurveRef* curve);
|
116
|
+
|
117
|
+
/**
|
118
|
+
@brief Retrieves the starting vertex of an edge object.
|
119
|
+
@param[in] edge The edge object.
|
120
|
+
@param[out] vertex The vertex object retrieved.
|
121
|
+
@related SUEdgeRef
|
122
|
+
@return
|
123
|
+
- \ref SU_ERROR_NONE on success.
|
124
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid edge object
|
125
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL.
|
126
|
+
*/
|
127
|
+
SU_RESULT SUEdgeGetStartVertex(SUEdgeRef edge, SUVertexRef* vertex);
|
128
|
+
|
129
|
+
/**
|
130
|
+
@brief Retrieves the end vertex of an edge object.
|
131
|
+
@param[in] edge The edge object.
|
132
|
+
@param[out] vertex The vertex object retrieved.
|
133
|
+
@related SUEdgeRef
|
134
|
+
@return
|
135
|
+
- \ref SU_ERROR_NONE on success
|
136
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
137
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL
|
138
|
+
*/
|
139
|
+
SU_RESULT SUEdgeGetEndVertex(SUEdgeRef edge, SUVertexRef* vertex);
|
140
|
+
|
141
|
+
/**
|
142
|
+
@brief Sets the soft flag of an edge object.
|
143
|
+
@param[in] edge The edge object.
|
144
|
+
@param[in] soft_flag The soft flag to set.
|
145
|
+
@related SUEdgeRef
|
146
|
+
@return
|
147
|
+
- \ref SU_ERROR_NONE on success
|
148
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
149
|
+
*/
|
150
|
+
SU_RESULT SUEdgeSetSoft(SUEdgeRef edge, bool soft_flag);
|
151
|
+
|
152
|
+
/**
|
153
|
+
@brief Retrieves the soft flag of an edge object.
|
154
|
+
@param[in] edge The edge object.
|
155
|
+
@param[out] soft_flag The soft flag retrieved.
|
156
|
+
@related SUEdgeRef
|
157
|
+
@return
|
158
|
+
- \ref SU_ERROR_NONE on success
|
159
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object.
|
160
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if soft_flag is NULL
|
161
|
+
*/
|
162
|
+
SU_RESULT SUEdgeGetSoft(SUEdgeRef edge, bool* soft_flag);
|
163
|
+
|
164
|
+
/**
|
165
|
+
@brief Sets the smooth flag of an edge object.
|
166
|
+
@param[in] edge The edge object.
|
167
|
+
@param[in] smooth_flag The smooth flag to set.
|
168
|
+
@related SUEdgeRef
|
169
|
+
@return
|
170
|
+
- \ref SU_ERROR_NONE on success
|
171
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
172
|
+
*/
|
173
|
+
SU_RESULT SUEdgeSetSmooth(SUEdgeRef edge, bool smooth_flag);
|
174
|
+
|
175
|
+
/**
|
176
|
+
@brief Retrieves the smooth flag of an edge object.
|
177
|
+
@param[in] edge The edge object.
|
178
|
+
@param[out] smooth_flag The smooth flag retrieved.
|
179
|
+
@related SUEdgeRef
|
180
|
+
@return
|
181
|
+
- \ref SU_ERROR_NONE on success
|
182
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
183
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if smooth_flag is NULL
|
184
|
+
*/
|
185
|
+
SU_RESULT SUEdgeGetSmooth(SUEdgeRef edge, bool* smooth_flag);
|
186
|
+
|
187
|
+
/**
|
188
|
+
@brief Retrieves the number of faces that the edge is associated with.
|
189
|
+
@param[in] edge The edge object.
|
190
|
+
@param[out] count The number of faces.
|
191
|
+
@related SUEdgeRef
|
192
|
+
@return
|
193
|
+
- \ref SU_ERROR_NONE on success
|
194
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
195
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
196
|
+
*/
|
197
|
+
SU_RESULT SUEdgeGetNumFaces(SUEdgeRef edge, size_t* count);
|
198
|
+
|
199
|
+
/**
|
200
|
+
@brief Retrieves the face objects associated with an edge object.
|
201
|
+
@param[in] edge The edge object.
|
202
|
+
@param[in] len The number of faces to retrieve.
|
203
|
+
@param[out] faces The faces retrieved.
|
204
|
+
@param[out] count The number of face objects retrieved.
|
205
|
+
@related SUEdgeRef
|
206
|
+
@return
|
207
|
+
- \ref SU_ERROR_NONE on success
|
208
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object
|
209
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if faces or count is NULL
|
210
|
+
*/
|
211
|
+
SU_RESULT SUEdgeGetFaces(SUEdgeRef edge, size_t len, SUFaceRef faces[], size_t* count);
|
212
|
+
|
213
|
+
/**
|
214
|
+
@brief Retrieves the color of an edge object.
|
215
|
+
@param[in] edge The edge object.
|
216
|
+
@param[out] color The color retrieved.
|
217
|
+
@related SUEdgeRef
|
218
|
+
@return
|
219
|
+
- \ref SU_ERROR_NONE on success
|
220
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid object
|
221
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
|
222
|
+
*/
|
223
|
+
SU_RESULT SUEdgeGetColor(SUEdgeRef edge, SUColor* color);
|
224
|
+
|
225
|
+
/**
|
226
|
+
@brief Computes the length of the edge with the provided transformation applied.
|
227
|
+
@param[in] edge The edge object.
|
228
|
+
@param[in] transform A transformation to be appllied to the edge.
|
229
|
+
@param[out] length The length retrieved.
|
230
|
+
@related SUEdgeRef
|
231
|
+
@return
|
232
|
+
- \ref SU_ERROR_NONE on success
|
233
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid object
|
234
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
|
235
|
+
*/
|
236
|
+
SU_RESULT SUEdgeGetLengthWithTransform(
|
237
|
+
SUEdgeRef edge, const struct SUTransformation* transform, double* length);
|
238
|
+
|
239
|
+
/**
|
240
|
+
@brief Sets the color of an edge object.
|
241
|
+
@param[in] edge The edge object.
|
242
|
+
@param[in] color The color object to set.
|
243
|
+
@related SUEdgeRef
|
244
|
+
@return
|
245
|
+
- \ref SU_ERROR_NONE on success
|
246
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is an invalid object.
|
247
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if color is NULL.
|
248
|
+
*/
|
249
|
+
SU_RESULT SUEdgeSetColor(SUEdgeRef edge, const SUColor* color);
|
250
|
+
|
251
|
+
/**
|
252
|
+
@brief Determine if \p edge is reversed in \p face 's bounding loop.
|
253
|
+
@since SketchUp 2021.1, API 9.1
|
254
|
+
@param [in] edge The edge object.
|
255
|
+
@param [in] face The face object.
|
256
|
+
@param [out] reversed The reverse status retrieved.
|
257
|
+
@related SUEdgeRef
|
258
|
+
@return
|
259
|
+
- \ref SU_ERROR_NONE on success
|
260
|
+
- \ref SU_ERROR_INVALID_INPUT if \p edge is an invalid object.
|
261
|
+
- \ref SU_ERROR_INVALID_INPUT if \p face is an invalid object.
|
262
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p reversed is null.
|
263
|
+
- \ref SU_ERROR_INVALID_ARGUMENT if \p edge is not bounding \p face.
|
264
|
+
*/
|
265
|
+
SU_RESULT SUEdgeReversedInFace(SUEdgeRef edge, SUFaceRef face, bool* reversed);
|
266
|
+
|
267
|
+
#ifdef __cplusplus
|
268
|
+
} // extern "C"
|
269
|
+
#endif
|
270
|
+
|
271
|
+
#endif // SKETCHUP_MODEL_EDGE_H_
|
@@ -0,0 +1,214 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUEdgeUseRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_EDGE_USE_H_
|
8
|
+
#define SKETCHUP_MODEL_EDGE_USE_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
/**
|
15
|
+
@struct SUEdgeUseRef
|
16
|
+
@extends SUEntityRef
|
17
|
+
@brief SUEdgeUseRef objects are used to retrieve the topology of the edges of
|
18
|
+
a polygon. The geometry of the polygon being represented by \ref
|
19
|
+
SULoopRef that is already associated with a face object. The typical use
|
20
|
+
of EdgeUse object is to retrieve them from a face object's loop, and then
|
21
|
+
read the topology values from them.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifdef __cplusplus
|
25
|
+
extern "C" {
|
26
|
+
#endif
|
27
|
+
|
28
|
+
/**
|
29
|
+
@brief Converts from an \ref SUEdgeUseRef to an \ref SUEntityRef.
|
30
|
+
This is essentially an upcast operation.
|
31
|
+
@param[in] edgeuse The given edge use reference.
|
32
|
+
@related SUEdgeUseRef
|
33
|
+
@return
|
34
|
+
- The converted \ref SUEntityRef if edgeuse is a valid edge use.
|
35
|
+
- If not, the returned reference will be invalid.
|
36
|
+
*/
|
37
|
+
SU_EXPORT SUEntityRef SUEdgeUseToEntity(SUEdgeUseRef edgeuse);
|
38
|
+
|
39
|
+
/**
|
40
|
+
@brief Converts from an \ref SUEntityRef to an \ref SUEdgeUseRef.
|
41
|
+
This is essentially a downcast operation so the given \ref SUEntityRef
|
42
|
+
must be convertible to an \ref SUEdgeUseRef.
|
43
|
+
@param[in] entity The given entity reference.
|
44
|
+
@related SUEdgeUseRef
|
45
|
+
@return
|
46
|
+
- The converted \ref SUEdgeUseRef if the downcast operation succeeds.
|
47
|
+
- If not, the returned reference will be invalid.
|
48
|
+
*/
|
49
|
+
SU_EXPORT SUEdgeUseRef SUEdgeUseFromEntity(SUEntityRef entity);
|
50
|
+
|
51
|
+
/**
|
52
|
+
@brief Retrieves the edge object the EdgeUse object belongs to.
|
53
|
+
@param[in] edgeuse The EdgeUse object.
|
54
|
+
@param[out] edge The edge object retrieved.
|
55
|
+
@related SUEdgeUseRef
|
56
|
+
@return
|
57
|
+
- \ref SU_ERROR_NONE on success
|
58
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
59
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if edge is NULL.
|
60
|
+
*/
|
61
|
+
SU_RESULT SUEdgeUseGetEdge(SUEdgeUseRef edgeuse, SUEdgeRef* edge);
|
62
|
+
|
63
|
+
/**
|
64
|
+
@brief Retrieves the loop object the EdgeUse object is associated with.
|
65
|
+
@param[in] edgeuse The EdgeUse object.
|
66
|
+
@param[out] loop The loop object retrieved.
|
67
|
+
@related SUEdgeUseRef
|
68
|
+
@return
|
69
|
+
- \ref SU_ERROR_NONE on success
|
70
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
71
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if loop is NULL
|
72
|
+
*/
|
73
|
+
SU_RESULT SUEdgeUseGetLoop(SUEdgeUseRef edgeuse, SULoopRef* loop);
|
74
|
+
|
75
|
+
/**
|
76
|
+
@brief Retrieves the face object the EdgeUse object is associated with.
|
77
|
+
@param[in] edgeuse The EdgeUse object.
|
78
|
+
@param[out] face The face object retrieved.
|
79
|
+
@related SUEdgeUseRef
|
80
|
+
@return
|
81
|
+
- \ref SU_ERROR_NONE on success
|
82
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
83
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if face is NULL
|
84
|
+
*/
|
85
|
+
SU_RESULT SUEdgeUseGetFace(SUEdgeUseRef edgeuse, SUFaceRef* face);
|
86
|
+
|
87
|
+
/**
|
88
|
+
@brief Retrieves the number of EdgeUse objects that are linked to the EdgeUse
|
89
|
+
object.
|
90
|
+
@param[in] edgeuse The EdgeUse object.
|
91
|
+
@param[out] count The number of partners.
|
92
|
+
@related SUEdgeUseRef
|
93
|
+
@return
|
94
|
+
- \ref SU_ERROR_NONE on success
|
95
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
96
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
97
|
+
*/
|
98
|
+
SU_RESULT SUEdgeUseGetNumPartners(SUEdgeUseRef edgeuse, size_t* count);
|
99
|
+
|
100
|
+
/**
|
101
|
+
@brief Retrieves the EdgeUse objects that are linked to the EdgeUse object.
|
102
|
+
@param[in] edgeuse The EdgeUse object.
|
103
|
+
@param[in] len The number of partners to retrieve.
|
104
|
+
@param[out] partners The partners retrieved.
|
105
|
+
@param[out] count The number of partners retrieved.
|
106
|
+
@related SUEdgeUseRef
|
107
|
+
@return
|
108
|
+
- \ref SU_ERROR_NONE on success
|
109
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
110
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if partners or count is NULL
|
111
|
+
*/
|
112
|
+
SU_RESULT SUEdgeUseGetPartners(
|
113
|
+
SUEdgeUseRef edgeuse, size_t len, SUEdgeUseRef partners[], size_t* count);
|
114
|
+
|
115
|
+
/**
|
116
|
+
@brief Retrieves a flag indicating whether this EdgeUse is traversed in the
|
117
|
+
opposite direction as its corresponding edge.
|
118
|
+
@param[in] edgeuse The EdgeUse object.
|
119
|
+
@param[out] reversed The retrieved flag.
|
120
|
+
@related SUEdgeUseRef
|
121
|
+
@return
|
122
|
+
- \ref SU_ERROR_NONE on success
|
123
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
124
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if reversed is NULL.
|
125
|
+
*/
|
126
|
+
SU_RESULT SUEdgeUseIsReversed(SUEdgeUseRef edgeuse, bool* reversed);
|
127
|
+
|
128
|
+
/**
|
129
|
+
@brief Retrieves the EdgeUse object just preceding an EdgeUse object in the
|
130
|
+
collection of linked EdgeUses.
|
131
|
+
@param[in] edgeuse The EdgeUse object.
|
132
|
+
@param[out] prev_edgeuse The EdgeUse retrieved.
|
133
|
+
@related SUEdgeUseRef
|
134
|
+
@return
|
135
|
+
- \ref SU_ERROR_NONE on success
|
136
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
137
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if prev_edgeuse is NULL.
|
138
|
+
*/
|
139
|
+
SU_RESULT SUEdgeUseGetPrevious(SUEdgeUseRef edgeuse, SUEdgeUseRef* prev_edgeuse);
|
140
|
+
|
141
|
+
/**
|
142
|
+
@brief Retrieves the EdgeUse object just following an EdgeUse object in the
|
143
|
+
collection of linked EdgeUses.
|
144
|
+
@param[in] edgeuse The EdgeUse object.
|
145
|
+
@param[out] next_edgeuse The EdgeUse retrieved.
|
146
|
+
@related SUEdgeUseRef
|
147
|
+
@return
|
148
|
+
- \ref SU_ERROR_NONE on success
|
149
|
+
- \ref SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
|
150
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if next_edgeuse is NULL.
|
151
|
+
*/
|
152
|
+
SU_RESULT SUEdgeUseGetNext(SUEdgeUseRef edgeuse, SUEdgeUseRef* next_edgeuse);
|
153
|
+
|
154
|
+
/**
|
155
|
+
@brief Retrieves the start vertex of an EdgeUse object. The start vertex of the
|
156
|
+
EdgeUse object may not be the same as the start vertex of the
|
157
|
+
corresponding edge of the EdgeUse object. An EdgeUse object is part of a
|
158
|
+
face loop whose direction may be the reverse of the direction of the
|
159
|
+
edge.
|
160
|
+
@param[in] edgeuse The EdgeUse object.
|
161
|
+
@param[out] vertex The vertex object retrieved.
|
162
|
+
@related SUEdgeUseRef
|
163
|
+
@return
|
164
|
+
- \ref SU_ERROR_NONE on success
|
165
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid EdgeUse object
|
166
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL
|
167
|
+
*/
|
168
|
+
SU_RESULT SUEdgeUseGetStartVertex(SUEdgeUseRef edgeuse, SUVertexRef* vertex);
|
169
|
+
|
170
|
+
/**
|
171
|
+
@brief Retrieves the end vertex of an EdgeUse object.
|
172
|
+
|
173
|
+
The end vertex of the EdgeUse object may not be the same as the end vertex of
|
174
|
+
the corresponding edge of the EdgeUse object. An EdgeUse object is part of a
|
175
|
+
face loop whose direction may be the reverse of the direction of the edge.
|
176
|
+
@param[in] edgeuse The EdgeUse object.
|
177
|
+
@param[out] vertex The vertex object retrieved.
|
178
|
+
@related SUEdgeUseRef
|
179
|
+
@return
|
180
|
+
- \ref SU_ERROR_NONE on success
|
181
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid EdgeUse object
|
182
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL
|
183
|
+
*/
|
184
|
+
SU_RESULT SUEdgeUseGetEndVertex(SUEdgeUseRef edgeuse, SUVertexRef* vertex);
|
185
|
+
|
186
|
+
/**
|
187
|
+
@brief Retrieves the normal vector at the start vertex of an EdgeUse object.
|
188
|
+
@param[in] edgeuse The EdgeUse object.
|
189
|
+
@param[out] normal The normal vector retrieved.
|
190
|
+
@related SUEdgeUseRef
|
191
|
+
@return
|
192
|
+
- \ref SU_ERROR_NONE on success
|
193
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid object
|
194
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL
|
195
|
+
*/
|
196
|
+
SU_RESULT SUEdgeUseGetStartVertexNormal(SUEdgeUseRef edgeuse, struct SUVector3D* normal);
|
197
|
+
|
198
|
+
/**
|
199
|
+
@brief Retrieves the normal vector at the end vertex of an EdgeUse object.
|
200
|
+
@param[in] edgeuse The EdgeUse object.
|
201
|
+
@param[out] normal The normal vector retrieved.
|
202
|
+
@related SUEdgeUseRef
|
203
|
+
@return
|
204
|
+
- \ref SU_ERROR_NONE on success
|
205
|
+
- \ref SU_ERROR_INVALID_INPUT if edge is not a valid object
|
206
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL.
|
207
|
+
*/
|
208
|
+
SU_RESULT SUEdgeUseGetEndVertexNormal(SUEdgeUseRef edgeuse, struct SUVector3D* normal);
|
209
|
+
|
210
|
+
#ifdef __cplusplus
|
211
|
+
} // extern "C" {
|
212
|
+
#endif
|
213
|
+
|
214
|
+
#endif // SKETCHUP_MODEL_EDGE_USE_H_
|