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,398 @@
|
|
1
|
+
// Copyright 2013-2020 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUCameraRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_CAMERA_H_
|
8
|
+
#define SKETCHUP_MODEL_CAMERA_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/geometry.h>
|
11
|
+
#include <SketchUpAPI/common.h>
|
12
|
+
#include <SketchUpAPI/unicodestring.h>
|
13
|
+
#include <SketchUpAPI/model/defs.h>
|
14
|
+
|
15
|
+
#ifdef __cplusplus
|
16
|
+
extern "C" {
|
17
|
+
#endif
|
18
|
+
|
19
|
+
/**
|
20
|
+
@struct SUCameraRef
|
21
|
+
@brief References the camera object of a SketchUp model.
|
22
|
+
*/
|
23
|
+
|
24
|
+
/**
|
25
|
+
@brief Creates a default camera object.
|
26
|
+
@since SketchUp 2015, API 3.0
|
27
|
+
@param[out] camera The camera object created.
|
28
|
+
@related SUCameraRef
|
29
|
+
@return
|
30
|
+
- \ref SU_ERROR_NONE on success
|
31
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if camera is NULL
|
32
|
+
- \ref SU_ERROR_OVERWRITE_VALID if camera already refers to a valid object
|
33
|
+
*/
|
34
|
+
SU_RESULT SUCameraCreate(SUCameraRef* camera);
|
35
|
+
|
36
|
+
/**
|
37
|
+
@brief Releases a camera object created by SUCameraCreate.
|
38
|
+
@since SketchUp 2015, API 3.0
|
39
|
+
@param[in] camera The camera object.
|
40
|
+
@related SUCameraRef
|
41
|
+
@return
|
42
|
+
- \ref SU_ERROR_NONE on success
|
43
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is an invalid object
|
44
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if camera is NULL
|
45
|
+
*/
|
46
|
+
SU_RESULT SUCameraRelease(SUCameraRef* camera);
|
47
|
+
|
48
|
+
/**
|
49
|
+
@brief Retrieves the orientation of a camera object.
|
50
|
+
@param[in] camera The camera object.
|
51
|
+
@param[out] position The position retrieved.
|
52
|
+
@param[out] target The target retrieved.
|
53
|
+
@param[out] up_vector The up direction retrieved.
|
54
|
+
@related SUCameraRef
|
55
|
+
@return
|
56
|
+
- \ref SU_ERROR_NONE on success
|
57
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
58
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if position, target, or up_vector is NULL
|
59
|
+
*/
|
60
|
+
SU_RESULT SUCameraGetOrientation(
|
61
|
+
SUCameraRef camera, struct SUPoint3D* position, struct SUPoint3D* target,
|
62
|
+
struct SUVector3D* up_vector);
|
63
|
+
|
64
|
+
/**
|
65
|
+
@brief Sets the position of a camera object.
|
66
|
+
@param[in] camera The camera object.
|
67
|
+
@param[in] position The new eye position.
|
68
|
+
@param[in] target The new target position.
|
69
|
+
@param[in] up_vector The new up direction.
|
70
|
+
@related SUCameraRef
|
71
|
+
@return
|
72
|
+
- \ref SU_ERROR_NONE on success
|
73
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
74
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if position, target or up_vector is NULL
|
75
|
+
*/
|
76
|
+
SU_RESULT SUCameraSetOrientation(
|
77
|
+
SUCameraRef camera, const struct SUPoint3D* position, const struct SUPoint3D* target,
|
78
|
+
const struct SUVector3D* up_vector);
|
79
|
+
|
80
|
+
/**
|
81
|
+
@brief Retrieves the look at matrix of the camera object.
|
82
|
+
@since SketchUp 2017, API 5.0
|
83
|
+
@param[in] camera The camera object.
|
84
|
+
@param[out] transformation The look at matrix retrieved.
|
85
|
+
@related SUCameraRef
|
86
|
+
@return
|
87
|
+
- \ref SU_ERROR_NONE on success.
|
88
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
89
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if transformation is NULL
|
90
|
+
*/
|
91
|
+
SU_RESULT SUCameraGetViewTransformation(
|
92
|
+
SUCameraRef camera, struct SUTransformation* transformation);
|
93
|
+
|
94
|
+
/**
|
95
|
+
@brief Sets the field of view angle of a camera object. If the camera object is
|
96
|
+
an orthographic camera, the camera object subsequently becomes a
|
97
|
+
perspective camera. The field of view is measured along the vertical
|
98
|
+
direction of the camera.
|
99
|
+
@param[in] camera The camera object.
|
100
|
+
@param[in] fov The field of view angle in degrees.
|
101
|
+
@related SUCameraRef
|
102
|
+
@return
|
103
|
+
- \ref SU_ERROR_NONE on success
|
104
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
105
|
+
*/
|
106
|
+
SU_RESULT SUCameraSetPerspectiveFrustumFOV(SUCameraRef camera, double fov);
|
107
|
+
|
108
|
+
/**
|
109
|
+
@brief Retrieves the field of view in degrees of a camera object. The field of
|
110
|
+
view is measured along the vertical direction of the camera.
|
111
|
+
@param[in] camera The camera object.
|
112
|
+
@param[out] fov The field of view retrieved.
|
113
|
+
@related SUCameraRef
|
114
|
+
@return
|
115
|
+
- \ref SU_ERROR_NONE on success
|
116
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
117
|
+
- \ref SU_ERROR_NO_DATA if camera is not a perspective camera (orthographic
|
118
|
+
camera)
|
119
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if fov is NULL
|
120
|
+
*/
|
121
|
+
SU_RESULT SUCameraGetPerspectiveFrustumFOV(SUCameraRef camera, double* fov);
|
122
|
+
|
123
|
+
/**
|
124
|
+
@brief Sets the aspect ratio of a camera object.
|
125
|
+
@since SketchUp 2017, API 5.0
|
126
|
+
@param[in] camera The camera object.
|
127
|
+
@param[out] aspect_ratio The aspect ratio to be set.
|
128
|
+
@related SUCameraRef
|
129
|
+
@return
|
130
|
+
- \ref SU_ERROR_NONE on success
|
131
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
132
|
+
- \ref SU_ERROR_OUT_OF_RANGE is aspect_ratio < 0.0
|
133
|
+
*/
|
134
|
+
SU_RESULT SUCameraSetAspectRatio(SUCameraRef camera, double aspect_ratio);
|
135
|
+
|
136
|
+
/**
|
137
|
+
@brief Retrieves the aspect ratio of a camera object.
|
138
|
+
@param[in] camera The camera object.
|
139
|
+
@param[out] aspect_ratio The aspect ratio retrieved.
|
140
|
+
@related SUCameraRef
|
141
|
+
@return
|
142
|
+
- \ref SU_ERROR_NONE on success
|
143
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
144
|
+
- \ref SU_ERROR_NO_DATA if the camera uses the screen aspect ratio
|
145
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if aspect_ratio is NULL
|
146
|
+
*/
|
147
|
+
SU_RESULT SUCameraGetAspectRatio(SUCameraRef camera, double* aspect_ratio);
|
148
|
+
|
149
|
+
/**
|
150
|
+
@brief Sets the height of a camera object which is used to calculate the
|
151
|
+
orthographic projection of a camera object. If the camera object is a
|
152
|
+
perspective camera, the camera subsequently becomes an orthographic
|
153
|
+
camera.
|
154
|
+
@param[in] camera The camera object.
|
155
|
+
@param[in] height The height of the camera view.
|
156
|
+
@related SUCameraRef
|
157
|
+
@return
|
158
|
+
- \ref SU_ERROR_NONE on success
|
159
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
160
|
+
*/
|
161
|
+
SU_RESULT SUCameraSetOrthographicFrustumHeight(SUCameraRef camera, double height);
|
162
|
+
|
163
|
+
/**
|
164
|
+
@brief Retrieves the height of an orthographic camera object.
|
165
|
+
@param[in] camera The camera object.
|
166
|
+
@param[out] height The height retrieved.
|
167
|
+
@related SUCameraRef
|
168
|
+
@return
|
169
|
+
- \ref SU_ERROR_NONE on success
|
170
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
171
|
+
- \ref SU_ERROR_NO_DATA if camera is not an orthographic camera (perspective
|
172
|
+
camera)
|
173
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if height is NULL
|
174
|
+
*/
|
175
|
+
SU_RESULT SUCameraGetOrthographicFrustumHeight(SUCameraRef camera, double* height);
|
176
|
+
|
177
|
+
/**
|
178
|
+
@brief Sets a camera object perspective or orthographic.
|
179
|
+
@param[in] camera The camera object.
|
180
|
+
@param[in] perspective The perspective flag.
|
181
|
+
@related SUCameraRef
|
182
|
+
@return
|
183
|
+
- \ref SU_ERROR_NONE on success
|
184
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
185
|
+
*/
|
186
|
+
SU_RESULT SUCameraSetPerspective(SUCameraRef camera, bool perspective);
|
187
|
+
|
188
|
+
/**
|
189
|
+
@brief Retrieves whether a camera object is a perspective camera or not
|
190
|
+
(i.e. orthographic).
|
191
|
+
@param[in] camera The camera object.
|
192
|
+
@param[out] perspective The perspective flag retrieved.
|
193
|
+
@related SUCameraRef
|
194
|
+
@return
|
195
|
+
- \ref SU_ERROR_NONE on success
|
196
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is an invalid object
|
197
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT perspective is NULL
|
198
|
+
*/
|
199
|
+
SU_RESULT SUCameraGetPerspective(SUCameraRef camera, bool* perspective);
|
200
|
+
|
201
|
+
/**
|
202
|
+
@brief Retrieves the near and far clipping distances of the camera object.
|
203
|
+
@since SketchUp 2017, API 5.0
|
204
|
+
@param[in] camera The camera object.
|
205
|
+
@param[out] znear The near clipping distance.
|
206
|
+
@param[out] zfar The far clipping distance.
|
207
|
+
@related SUCameraRef
|
208
|
+
@return
|
209
|
+
- \ref SU_ERROR_NONE on success
|
210
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is an invalid object
|
211
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if znear or zfar is NULL
|
212
|
+
*/
|
213
|
+
SU_RESULT SUCameraGetClippingDistances(SUCameraRef camera, double* znear, double* zfar);
|
214
|
+
|
215
|
+
/**
|
216
|
+
@brief Sets whether the field of view value represents the camera view height.
|
217
|
+
@since SketchUp 2017, API 5.0
|
218
|
+
@param[in] camera The camera object.
|
219
|
+
@param[in] is_fov_height The field of view flag set.
|
220
|
+
@related SUCameraRef
|
221
|
+
@return
|
222
|
+
- \ref SU_ERROR_NONE on success
|
223
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
224
|
+
*/
|
225
|
+
SU_RESULT SUCameraSetFOVIsHeight(SUCameraRef camera, bool is_fov_height);
|
226
|
+
|
227
|
+
/**
|
228
|
+
@brief Retrieves whether the field of view value represents the camera view
|
229
|
+
height.
|
230
|
+
@since SketchUp 2017, API 5.0
|
231
|
+
@param[in] camera The camera object.
|
232
|
+
@param[out] is_fov_height The field of view flag retrieved.
|
233
|
+
@related SUCameraRef
|
234
|
+
@return
|
235
|
+
- \ref SU_ERROR_NONE on success
|
236
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
237
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT is_fov_height is NULL
|
238
|
+
*/
|
239
|
+
SU_RESULT SUCameraGetFOVIsHeight(SUCameraRef camera, bool* is_fov_height);
|
240
|
+
|
241
|
+
/**
|
242
|
+
@brief Sets the size of the image on the "film" for a perspective camera. The
|
243
|
+
value is given in millimeters. It is used in the conversions between
|
244
|
+
field of view and focal length.
|
245
|
+
@since SketchUp 2017, API 5.0
|
246
|
+
@param[in] camera The camera object.
|
247
|
+
@param[in] width The width set in millimeters.
|
248
|
+
@related SUCameraRef
|
249
|
+
@return
|
250
|
+
- \ref SU_ERROR_NONE on success
|
251
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
252
|
+
*/
|
253
|
+
SU_RESULT SUCameraSetImageWidth(SUCameraRef camera, double width);
|
254
|
+
|
255
|
+
/**
|
256
|
+
@brief Retrieves the size of the image on the image plane of the Camera. By
|
257
|
+
default, this value is not set. If it is set, it is used in the
|
258
|
+
calculation of the focal length from the field of view. Unlike most
|
259
|
+
length values in SketchUp, this width is specified in millimeters rather
|
260
|
+
than in inches.
|
261
|
+
@since SketchUp 2017, API 5.0
|
262
|
+
@param[in] camera The camera object.
|
263
|
+
@param[out] width The image width retrieved.
|
264
|
+
@related SUCameraRef
|
265
|
+
@return
|
266
|
+
- \ref SU_ERROR_NONE on success
|
267
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
268
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT width is NULL
|
269
|
+
*/
|
270
|
+
SU_RESULT SUCameraGetImageWidth(SUCameraRef camera, double* width);
|
271
|
+
|
272
|
+
/**
|
273
|
+
@brief Sets the description of a camera object.
|
274
|
+
@since SketchUp 2017, API 5.0
|
275
|
+
@param[in] camera The camera object.
|
276
|
+
@param[in] desc The description to be set.
|
277
|
+
Assumed to be UTF-8 encoded.
|
278
|
+
@related SUCameraRef
|
279
|
+
@return
|
280
|
+
- \ref SU_ERROR_NONE on success
|
281
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
282
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if desc is NULL
|
283
|
+
*/
|
284
|
+
SU_RESULT SUCameraSetDescription(SUCameraRef camera, const char* desc);
|
285
|
+
|
286
|
+
/**
|
287
|
+
@brief Retrieves the description of a camera object.
|
288
|
+
@since SketchUp 2017, API 5.0
|
289
|
+
@param[in] camera The camera object.
|
290
|
+
@param[out] desc The description retrieved.
|
291
|
+
@related SUCameraRef
|
292
|
+
@return
|
293
|
+
- \ref SU_ERROR_NONE on success
|
294
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
295
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if desc is NULL
|
296
|
+
- \ref SU_ERROR_INVALID_OUTPUT if desc does not point to a valid \ref
|
297
|
+
SUStringRef object
|
298
|
+
*/
|
299
|
+
SU_RESULT SUCameraGetDescription(SUCameraRef camera, SUStringRef* desc);
|
300
|
+
|
301
|
+
/**
|
302
|
+
@brief Retrieves the camera's direction vector.
|
303
|
+
@since SketchUp 2017, API 5.0
|
304
|
+
@param[in] camera The camera object.
|
305
|
+
@param[out] direction The direction vector retrieved.
|
306
|
+
@related SUCameraRef
|
307
|
+
@return
|
308
|
+
- \ref SU_ERROR_NONE on success
|
309
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
310
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if direction is NULL
|
311
|
+
*/
|
312
|
+
SU_RESULT SUCameraGetDirection(SUCameraRef camera, struct SUVector3D* direction);
|
313
|
+
|
314
|
+
/**
|
315
|
+
@brief Sets whether a camera is two dimensional. 2 point perspective mode and
|
316
|
+
PhotoMatch mode are 2d cameras.
|
317
|
+
@since SketchUp 2017, API 5.0
|
318
|
+
@param[in] camera The camera object.
|
319
|
+
@param[in] make_2d The flag for specifying if the camera should be 2D.
|
320
|
+
@related SUCameraRef
|
321
|
+
@return
|
322
|
+
- \ref SU_ERROR_NONE on success
|
323
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
324
|
+
*/
|
325
|
+
SU_RESULT SUCameraSet2D(SUCameraRef camera, bool make_2d);
|
326
|
+
|
327
|
+
/**
|
328
|
+
@brief Retrieves whether a camera object is two dimensional.
|
329
|
+
@since SketchUp 2017, API 5.0
|
330
|
+
@param[in] camera The camera object.
|
331
|
+
@param[out] is_2d The 2D flag retrieved.
|
332
|
+
@related SUCameraRef
|
333
|
+
@return
|
334
|
+
- \ref SU_ERROR_NONE on success
|
335
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is an invalid object
|
336
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT is_2d is NULL
|
337
|
+
*/
|
338
|
+
SU_RESULT SUCameraGet2D(SUCameraRef camera, bool* is_2d);
|
339
|
+
|
340
|
+
/**
|
341
|
+
@brief Sets the camera's 2D scale factor.
|
342
|
+
@since SketchUp 2017, API 5.0
|
343
|
+
@param[in] camera The camera object.
|
344
|
+
@param[in] scale The scale to be set.
|
345
|
+
@related SUCameraRef
|
346
|
+
@return
|
347
|
+
- \ref SU_ERROR_NONE on success
|
348
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
349
|
+
*/
|
350
|
+
SU_RESULT SUCameraSetScale2D(SUCameraRef camera, double scale);
|
351
|
+
|
352
|
+
/**
|
353
|
+
@brief Retrieves the camera's 2D scale factor.
|
354
|
+
@since SketchUp 2017, API 5.0
|
355
|
+
@param[in] camera The camera object.
|
356
|
+
@param[out] scale The scale factor retrieved.
|
357
|
+
@related SUCameraRef
|
358
|
+
@return
|
359
|
+
- \ref SU_ERROR_NONE on success
|
360
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
361
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if scale is NULL
|
362
|
+
*/
|
363
|
+
SU_RESULT SUCameraGetScale2D(SUCameraRef camera, double* scale);
|
364
|
+
|
365
|
+
/**
|
366
|
+
@brief Sets the camera's 2D center point. The point coordinates are in screen
|
367
|
+
space. Since this is setting the 2D center point the z component of the
|
368
|
+
provided point is ignored.
|
369
|
+
@since SketchUp 2017, API 5.0
|
370
|
+
@param[in] camera The camera object.
|
371
|
+
@param[in] center The center to be set.
|
372
|
+
@related SUCameraRef
|
373
|
+
@return
|
374
|
+
- \ref SU_ERROR_NONE on success
|
375
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
376
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if center is NULL
|
377
|
+
*/
|
378
|
+
SU_RESULT SUCameraSetCenter2D(SUCameraRef camera, const struct SUPoint3D* center);
|
379
|
+
|
380
|
+
/**
|
381
|
+
@brief Retrieves the camera's 2D center point. Since this is accessing a 2D
|
382
|
+
point with a 3D point structure the z coordinate is always set to 0.0.
|
383
|
+
@since SketchUp 2017, API 5.0
|
384
|
+
@param[in] camera The camera object.
|
385
|
+
@param[out] center The center point retrieved.
|
386
|
+
@related SUCameraRef
|
387
|
+
@return
|
388
|
+
- \ref SU_ERROR_NONE on success
|
389
|
+
- \ref SU_ERROR_INVALID_INPUT if camera is not a valid object
|
390
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if center is NULL
|
391
|
+
*/
|
392
|
+
SU_RESULT SUCameraGetCenter2D(SUCameraRef camera, struct SUPoint3D* center);
|
393
|
+
|
394
|
+
#ifdef __cplusplus
|
395
|
+
} // extern "C"
|
396
|
+
#endif
|
397
|
+
|
398
|
+
#endif // SKETCHUP_MODEL_CAMERA_H_
|
data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
// Copyright 2016-2020 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUClassificationAttributeRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_CLASSIFICATION_ATTRIBUTE_H_
|
8
|
+
#define SKETCHUP_MODEL_CLASSIFICATION_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 SUClassificationAttributeRef
|
20
|
+
@brief References attribute data about a classified component.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
@brief Retrieves the value of the attribute.
|
25
|
+
@since SketchUp 2017, API 5.0
|
26
|
+
@param[in] attribute The classification attribute object.
|
27
|
+
@param[out] value The value of the attribute.
|
28
|
+
@related SUClassificationAttributeRef
|
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 value is NULL
|
33
|
+
- \ref SU_ERROR_INVALID_OUTPUT if value does not point to a valid \ref
|
34
|
+
SUTypedValueRef object
|
35
|
+
*/
|
36
|
+
SU_RESULT SUClassificationAttributeGetValue(
|
37
|
+
SUClassificationAttributeRef attribute, SUTypedValueRef* value);
|
38
|
+
|
39
|
+
/**
|
40
|
+
@brief Retrieves the path to the attribute.
|
41
|
+
@since SketchUp 2017, API 5.0
|
42
|
+
@param[in] attribute The classification attribute object.
|
43
|
+
@param[out] path The attribute name as it should be displayed to the
|
44
|
+
user.
|
45
|
+
@related SUClassificationAttributeRef
|
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 path is NULL
|
50
|
+
- \ref SU_ERROR_INVALID_OUTPUT if path does not point to a valid \ref
|
51
|
+
SUStringRef object
|
52
|
+
*/
|
53
|
+
SU_RESULT SUClassificationAttributeGetPath(
|
54
|
+
SUClassificationAttributeRef attribute, SUStringRef* path);
|
55
|
+
|
56
|
+
/**
|
57
|
+
@brief Retrieves the number of children setting of the attribute.
|
58
|
+
@since SketchUp 2017, API 5.0
|
59
|
+
@param[in] attribute The classification attribute object.
|
60
|
+
@param[out] count The number of children this attribute contains.
|
61
|
+
@related SUClassificationAttributeRef
|
62
|
+
@return
|
63
|
+
- \ref SU_ERROR_NONE on success
|
64
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
65
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
66
|
+
*/
|
67
|
+
SU_RESULT SUClassificationAttributeGetNumChildren(
|
68
|
+
SUClassificationAttributeRef attribute, size_t* count);
|
69
|
+
|
70
|
+
/**
|
71
|
+
@brief Retrieves the child attribute at the given index.
|
72
|
+
@since SketchUp 2017, API 5.0
|
73
|
+
@param[in] attribute The classification attribute object.
|
74
|
+
@param[in] index The index of the child attribute to get.
|
75
|
+
@param[out] child The child attribute retrieved.
|
76
|
+
@related SUClassificationAttributeRef
|
77
|
+
@return
|
78
|
+
- \ref SU_ERROR_NONE on success
|
79
|
+
- \ref SU_ERROR_INVALID_INPUT if attribute is not a valid object
|
80
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if child is NULL
|
81
|
+
*/
|
82
|
+
SU_RESULT SUClassificationAttributeGetChild(
|
83
|
+
SUClassificationAttributeRef attribute, size_t index, SUClassificationAttributeRef* child);
|
84
|
+
|
85
|
+
#ifdef __cplusplus
|
86
|
+
} // extern "C" {
|
87
|
+
#endif
|
88
|
+
|
89
|
+
#endif // SKETCHUP_MODEL_CLASSIFICATION_ATTRIBUTE_H_
|
@@ -0,0 +1,125 @@
|
|
1
|
+
// Copyright 2016-2020 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUClassificationInfoRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_CLASSIFICATION_INFO_H_
|
8
|
+
#define SKETCHUP_MODEL_CLASSIFICATION_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 SUClassificationInfoRef
|
20
|
+
@brief References an object with classification information. Each
|
21
|
+
SUClassificationInfoRef contains the names of the schemas and the schema
|
22
|
+
types, and the types attributes. See SUClassificationAttributeRef for
|
23
|
+
details on the type attributes.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/**
|
27
|
+
@brief Releases the classification info. Classification info objects are created
|
28
|
+
from component instance using
|
29
|
+
SUComponentInstanceCreateClassificationInfo(), and must be released using
|
30
|
+
this function. This function also invalidates the given
|
31
|
+
SUClassificationInfoRef.
|
32
|
+
@since SketchUp 2017, API 5.0
|
33
|
+
@param[in,out] classification_info The classification info object.
|
34
|
+
@related SUClassificationInfoRef
|
35
|
+
@return
|
36
|
+
- \ref SU_ERROR_NONE on success
|
37
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if classification_info is NULL
|
38
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is not a valid object
|
39
|
+
*/
|
40
|
+
SU_RESULT SUClassificationInfoRelease(SUClassificationInfoRef* classification_info);
|
41
|
+
|
42
|
+
/**
|
43
|
+
@brief Retrieves the number of schemas that have been applied to the
|
44
|
+
component instance.
|
45
|
+
@since SketchUp 2017, API 5.0
|
46
|
+
@param[in] classification_info The classification info object.
|
47
|
+
@param[out] count The number of classifications.
|
48
|
+
@related SUClassificationInfoRef
|
49
|
+
@return
|
50
|
+
- \ref SU_ERROR_NONE on success
|
51
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is not a valid object
|
52
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
53
|
+
*/
|
54
|
+
SU_RESULT SUClassificationInfoGetNumSchemas(
|
55
|
+
SUClassificationInfoRef classification_info, size_t* count);
|
56
|
+
|
57
|
+
/**
|
58
|
+
@brief Retrieves the schema name for the classification at the given index.
|
59
|
+
@param[in] classification_info The classification info object.
|
60
|
+
@param[in] index The classification index.
|
61
|
+
@param[out] schema_name The name of the schema.
|
62
|
+
@related SUClassificationInfoRef
|
63
|
+
@return
|
64
|
+
- \ref SU_ERROR_NONE on success
|
65
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is an invalid object
|
66
|
+
- \ref SU_ERROR_OUT_OF_RANGE if index is larger than the number of schemas
|
67
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if schema_name is NULL
|
68
|
+
- \ref SU_ERROR_INVALID_OUTPUT if *schema_name is not a valid object
|
69
|
+
*/
|
70
|
+
SU_RESULT SUClassificationInfoGetSchemaName(
|
71
|
+
SUClassificationInfoRef classification_info, size_t index, SUStringRef* schema_name);
|
72
|
+
|
73
|
+
/**
|
74
|
+
@brief Retrieves the schema type for the classification at the given index.
|
75
|
+
@param[in] classification_info The classification info object.
|
76
|
+
@param[in] index The classification index.
|
77
|
+
@param[out] schema_type The applied type from the schema.
|
78
|
+
@related SUClassificationInfoRef
|
79
|
+
@return
|
80
|
+
- \ref SU_ERROR_NONE on success
|
81
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is an invalid object
|
82
|
+
- \ref SU_ERROR_OUT_OF_RANGE if index is larger than the number of schemas
|
83
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if schema_type is NULL
|
84
|
+
- \ref SU_ERROR_INVALID_OUTPUT if *schema_type is not a valid object
|
85
|
+
*/
|
86
|
+
SU_RESULT SUClassificationInfoGetSchemaType(
|
87
|
+
SUClassificationInfoRef classification_info, size_t index, SUStringRef* schema_type);
|
88
|
+
|
89
|
+
/**
|
90
|
+
@brief Retrieves the classification attribute for the classification at the
|
91
|
+
given index.
|
92
|
+
@param[in] classification_info The classification info object.
|
93
|
+
@param[in] index The classification index.
|
94
|
+
@param[out] attribute The attribute retrieved.
|
95
|
+
@related SUClassificationInfoRef
|
96
|
+
@return
|
97
|
+
- \ref SU_ERROR_NONE on success
|
98
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is an invalid object
|
99
|
+
- \ref SU_ERROR_OUT_OF_RANGE if index is larger than the number of schemas
|
100
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if attribute is NULL
|
101
|
+
*/
|
102
|
+
SU_RESULT SUClassificationInfoGetSchemaAttribute(
|
103
|
+
SUClassificationInfoRef classification_info, size_t index,
|
104
|
+
SUClassificationAttributeRef* attribute);
|
105
|
+
|
106
|
+
/**
|
107
|
+
@brief Retrieves the classification attribute with the given path.
|
108
|
+
@param[in] classification_info The classification info object.
|
109
|
+
@param[in] path The path of the classification attribute to get.
|
110
|
+
@param[out] attribute The attribute retrieved.
|
111
|
+
@related SUClassificationInfoRef
|
112
|
+
@return
|
113
|
+
- \ref SU_ERROR_NONE on success
|
114
|
+
- \ref SU_ERROR_INVALID_INPUT if classification_info is an invalid object
|
115
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if attribute is NULL
|
116
|
+
*/
|
117
|
+
SU_RESULT SUClassificationInfoGetSchemaAttributeByPath(
|
118
|
+
SUClassificationInfoRef classification_info, SUStringRef path,
|
119
|
+
SUClassificationAttributeRef* attribute);
|
120
|
+
|
121
|
+
#ifdef __cplusplus
|
122
|
+
} // extern "C" {
|
123
|
+
#endif
|
124
|
+
|
125
|
+
#endif // SKETCHUP_MODEL_CLASSIFICATION_INFO_H_
|
@@ -0,0 +1,86 @@
|
|
1
|
+
// Copyright 2014-2021 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUClassificationsRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_CLASSIFICATIONS_H_
|
8
|
+
#define SKETCHUP_MODEL_CLASSIFICATIONS_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/model/defs.h>
|
12
|
+
|
13
|
+
#ifdef __cplusplus
|
14
|
+
extern "C" {
|
15
|
+
#endif
|
16
|
+
|
17
|
+
/**
|
18
|
+
@struct SUClassificationsRef
|
19
|
+
@brief Used to manage a Classifications object
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
@brief Loads a schema into a classifications object.
|
24
|
+
@param[in] classifications The classificationss object.
|
25
|
+
@param[in] schema_file_name The full path of the schema to load.
|
26
|
+
@related SUClassificationsRef
|
27
|
+
@return
|
28
|
+
- \ref SU_ERROR_NONE on success
|
29
|
+
- \ref SU_ERROR_INVALID_INPUT if classifications is not a valid object
|
30
|
+
- \ref SU_ERROR_INVALID_INPUT if schema_file_name is not a valid path to a schema
|
31
|
+
or is NULL
|
32
|
+
*/
|
33
|
+
SU_RESULT SUClassificationsLoadSchema(
|
34
|
+
SUClassificationsRef classifications, const char* schema_file_name);
|
35
|
+
|
36
|
+
/**
|
37
|
+
@brief Gets a schema from a classifications object.
|
38
|
+
@param[in] classifications The classifications object.
|
39
|
+
@param[in] schema_name The name of the schema to get.
|
40
|
+
@param[out] schema_ref The schema retrieved.
|
41
|
+
@related SUClassificationsRef
|
42
|
+
@return
|
43
|
+
- \ref SU_ERROR_NONE on success
|
44
|
+
- \ref SU_ERROR_INVALID_INPUT if classifications is not a valid object
|
45
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if schema_name is NULL
|
46
|
+
- \ref SU_ERROR_INVALID_INPUT if schema_name is not a loaded schema
|
47
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if schema_ref is NULL
|
48
|
+
*/
|
49
|
+
SU_RESULT SUClassificationsGetSchema(
|
50
|
+
SUClassificationsRef classifications, const char* schema_name, SUSchemaRef* schema_ref);
|
51
|
+
|
52
|
+
/**
|
53
|
+
@brief Gets the number of schemata from a classifications object.
|
54
|
+
@since SketchUp 2022.0, API 10.0
|
55
|
+
@param[in] classifications The classifications object.
|
56
|
+
@param[out] num_schemas The number of schemas in the classifications object.
|
57
|
+
@related SUClassificationsRef
|
58
|
+
@return
|
59
|
+
- \ref SU_ERROR_NONE on success
|
60
|
+
- \ref SU_ERROR_INVALID_INPUT if \p classifications is not a valid object
|
61
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p num_schemas is NULL
|
62
|
+
*/
|
63
|
+
SU_RESULT SUClassificationsGetNumSchemas(SUClassificationsRef classifications, size_t* num_schemas);
|
64
|
+
|
65
|
+
/**
|
66
|
+
@brief Retrieves the schemas in the classifications object.
|
67
|
+
@since SketchUp 2022.0, API 10.0
|
68
|
+
@param[in] classifications The classifications object.
|
69
|
+
@param[in] len The number of schemas to retrieve.
|
70
|
+
@param[out] schemas The schemas retrieved.
|
71
|
+
@param[out] count The number of schemas retrieved.
|
72
|
+
@related SUClassificationsRef
|
73
|
+
@return
|
74
|
+
- \ref SU_ERROR_NONE on success
|
75
|
+
- \ref SU_ERROR_INVALID_INPUT if \p classifications is not a valid object
|
76
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p schemas or \p count is NULL
|
77
|
+
- \ref SU_ERROR_NO_DATA if \p len is greater than 0, but no schemas were found in \p classifications
|
78
|
+
*/
|
79
|
+
SU_RESULT SUClassificationsGetSchemas(
|
80
|
+
SUClassificationsRef classifications, size_t len, SUSchemaRef schemas[], size_t* count);
|
81
|
+
|
82
|
+
#ifdef __cplusplus
|
83
|
+
}
|
84
|
+
#endif
|
85
|
+
|
86
|
+
#endif // SKETCHUP_MODEL_CLASSIFICATIONS_H_
|