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,390 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUTypedValueRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_TYPED_VALUE_H_
|
8
|
+
#define SKETCHUP_MODEL_TYPED_VALUE_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/color.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 SUTypedValueRef
|
21
|
+
@brief Variant object used to represent the value of a key-value attribute
|
22
|
+
pair.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
@enum SUTypedValueType
|
27
|
+
@brief The set of types that a \ref SUTypedValueRef can represent.
|
28
|
+
*/
|
29
|
+
enum SUTypedValueType {
|
30
|
+
SUTypedValueType_Empty = 0, ///< No value set
|
31
|
+
SUTypedValueType_Byte, ///< Byte value type
|
32
|
+
SUTypedValueType_Short, ///< Short value type
|
33
|
+
SUTypedValueType_Int32, ///< Int32 value type
|
34
|
+
SUTypedValueType_Float, ///< Float value type
|
35
|
+
SUTypedValueType_Double, ///< Double value type
|
36
|
+
SUTypedValueType_Bool, ///< Bool value type
|
37
|
+
SUTypedValueType_Color, ///< Color value type
|
38
|
+
SUTypedValueType_Time, ///< Time value type
|
39
|
+
SUTypedValueType_String, ///< String value type
|
40
|
+
SUTypedValueType_Vector3D, ///< Vector3D value type
|
41
|
+
SUTypedValueType_Array ///< Array value type
|
42
|
+
};
|
43
|
+
|
44
|
+
/**
|
45
|
+
@brief Creates a typed value object. The created object must be released
|
46
|
+
with \ref SUTypedValueRelease().
|
47
|
+
@param[out] typed_value The created typed value object.
|
48
|
+
@related SUTypedValueRef
|
49
|
+
@return
|
50
|
+
- \ref SU_ERROR_NONE on success
|
51
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if typed_value is NULL
|
52
|
+
- \ref SU_ERROR_OVERWRITE_VALID if typed_value references a valid object
|
53
|
+
*/
|
54
|
+
SU_RESULT SUTypedValueCreate(SUTypedValueRef* typed_value);
|
55
|
+
|
56
|
+
/**
|
57
|
+
@brief Releases a typed value object that was previously created with
|
58
|
+
\ref SUTypedValueCreate().
|
59
|
+
@param[in] typed_value The typed value object.
|
60
|
+
@related SUTypedValueRef
|
61
|
+
@return
|
62
|
+
- \ref SU_ERROR_NONE on success
|
63
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if typed_value is NULL
|
64
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value references an invalid object
|
65
|
+
*/
|
66
|
+
SU_RESULT SUTypedValueRelease(SUTypedValueRef* typed_value);
|
67
|
+
|
68
|
+
/**
|
69
|
+
@brief Retrieves the type information of a typed value object.
|
70
|
+
@param[in] typed_value The typed value object.
|
71
|
+
@param[out] type The type information retrieved.
|
72
|
+
@related SUTypedValueRef
|
73
|
+
@return
|
74
|
+
- \ref SU_ERROR_NONE on success
|
75
|
+
- \ref SU_ERROR_INVALID_INPUT if type_value is not a valid object
|
76
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
|
77
|
+
*/
|
78
|
+
SU_RESULT SUTypedValueGetType(SUTypedValueRef typed_value, enum SUTypedValueType* type);
|
79
|
+
|
80
|
+
/**
|
81
|
+
@brief Retrieves the byte value of a typed value object.
|
82
|
+
@param[in] typed_value The typed value object.
|
83
|
+
@param[out] byte_value The byte value retrieved.
|
84
|
+
@related SUTypedValueRef
|
85
|
+
@return
|
86
|
+
- \ref SU_ERROR_NONE on success
|
87
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
88
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if byte_value is NULL
|
89
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
90
|
+
*/
|
91
|
+
SU_RESULT SUTypedValueGetByte(SUTypedValueRef typed_value, char* byte_value);
|
92
|
+
|
93
|
+
/**
|
94
|
+
@brief Sets the byte value of a typed value object.
|
95
|
+
@param[in] typed_value The typed value object.
|
96
|
+
@param[in] byte_value The byte value that is assigned.
|
97
|
+
@related SUTypedValueRef
|
98
|
+
@return
|
99
|
+
- \ref SU_ERROR_NONE on success
|
100
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
101
|
+
*/
|
102
|
+
SU_RESULT SUTypedValueSetByte(SUTypedValueRef typed_value, char byte_value);
|
103
|
+
|
104
|
+
/**
|
105
|
+
@brief Retrieves the int16 value of a typed value object.
|
106
|
+
@param[in] typed_value The typed value object.
|
107
|
+
@param[out] int16_value The int16 value retrieved.
|
108
|
+
@related SUTypedValueRef
|
109
|
+
@return
|
110
|
+
- \ref SU_ERROR_NONE on success
|
111
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
112
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if int16_value is NULL
|
113
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
114
|
+
*/
|
115
|
+
SU_RESULT SUTypedValueGetInt16(SUTypedValueRef typed_value, int16_t* int16_value);
|
116
|
+
|
117
|
+
/**
|
118
|
+
@brief Sets the int16 value of a typed value object.
|
119
|
+
@param[in] typed_value The typed value object.
|
120
|
+
@param[in] int16_value The int16 value to set.
|
121
|
+
@related SUTypedValueRef
|
122
|
+
@return
|
123
|
+
- \ref SU_ERROR_NONE on success
|
124
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
125
|
+
*/
|
126
|
+
SU_RESULT SUTypedValueSetInt16(SUTypedValueRef typed_value, int16_t int16_value);
|
127
|
+
|
128
|
+
/**
|
129
|
+
@brief Retrieves the int32 value of a typed value object.
|
130
|
+
@param[in] typed_value The typed value object.
|
131
|
+
@param[out] int32_value The int32 value retrieved.
|
132
|
+
@related SUTypedValueRef
|
133
|
+
@return
|
134
|
+
- \ref SU_ERROR_NONE on success
|
135
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
136
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if int32_value is NULL
|
137
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
138
|
+
*/
|
139
|
+
SU_RESULT SUTypedValueGetInt32(SUTypedValueRef typed_value, int32_t* int32_value);
|
140
|
+
|
141
|
+
/**
|
142
|
+
@brief Sets the int32 value of a typed value object.
|
143
|
+
@param[in] typed_value The typed value object.
|
144
|
+
@param[in] int32_value The int32 value to set.
|
145
|
+
@related SUTypedValueRef
|
146
|
+
@return
|
147
|
+
- \ref SU_ERROR_NONE on success
|
148
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
149
|
+
*/
|
150
|
+
SU_RESULT SUTypedValueSetInt32(SUTypedValueRef typed_value, int32_t int32_value);
|
151
|
+
|
152
|
+
/**
|
153
|
+
@brief Retrieves the float value of a typed value object.
|
154
|
+
@param[in] typed_value The typed value object.
|
155
|
+
@param[out] float_value The float value retrieved.
|
156
|
+
@related SUTypedValueRef
|
157
|
+
@return
|
158
|
+
- \ref SU_ERROR_NONE on success
|
159
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
160
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if float_value is NULL
|
161
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
162
|
+
*/
|
163
|
+
SU_RESULT SUTypedValueGetFloat(SUTypedValueRef typed_value, float* float_value);
|
164
|
+
|
165
|
+
/**
|
166
|
+
@brief Sets the float value of a typed value object.
|
167
|
+
@param[in] typed_value The typed value object.
|
168
|
+
@param[in] float_value The float value to set.
|
169
|
+
@related SUTypedValueRef
|
170
|
+
@return
|
171
|
+
- \ref SU_ERROR_NONE on success
|
172
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
173
|
+
*/
|
174
|
+
SU_RESULT SUTypedValueSetFloat(SUTypedValueRef typed_value, float float_value);
|
175
|
+
|
176
|
+
/**
|
177
|
+
@brief Retrieves the double value of a typed value object.
|
178
|
+
@param[in] typed_value The typed value object.
|
179
|
+
@param[out] double_value The double value retrieved.
|
180
|
+
@related SUTypedValueRef
|
181
|
+
@return
|
182
|
+
- \ref SU_ERROR_NONE on success
|
183
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
184
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if double_value is NULL
|
185
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
186
|
+
*/
|
187
|
+
SU_RESULT SUTypedValueGetDouble(SUTypedValueRef typed_value, double* double_value);
|
188
|
+
|
189
|
+
/**
|
190
|
+
@brief Sets the double value of a typed value object.
|
191
|
+
@param[in] typed_value The typed value object.
|
192
|
+
@param[in] double_value The double value to set.
|
193
|
+
@related SUTypedValueRef
|
194
|
+
@return
|
195
|
+
- \ref SU_ERROR_NONE on success
|
196
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
197
|
+
*/
|
198
|
+
SU_RESULT SUTypedValueSetDouble(SUTypedValueRef typed_value, double double_value);
|
199
|
+
|
200
|
+
/**
|
201
|
+
@brief Retrieves the boolean value of a typed value object.
|
202
|
+
@param[in] typed_value The typed value object.
|
203
|
+
@param[out] bool_value The boolean value retrieved.
|
204
|
+
@related SUTypedValueRef
|
205
|
+
@return
|
206
|
+
- \ref SU_ERROR_NONE on success
|
207
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
208
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if bool_value is NULL
|
209
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
210
|
+
*/
|
211
|
+
SU_RESULT SUTypedValueGetBool(SUTypedValueRef typed_value, bool* bool_value);
|
212
|
+
|
213
|
+
/**
|
214
|
+
@brief Sets the boolean value of a typed value object.
|
215
|
+
@param[in] typed_value The typed value object.
|
216
|
+
@param[in] bool_value The boolean value to set.
|
217
|
+
@related SUTypedValueRef
|
218
|
+
@return
|
219
|
+
- \ref SU_ERROR_NONE on success
|
220
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
221
|
+
*/
|
222
|
+
SU_RESULT SUTypedValueSetBool(SUTypedValueRef typed_value, bool bool_value);
|
223
|
+
|
224
|
+
/**
|
225
|
+
@brief Retrieves the color value of a typed value object.
|
226
|
+
@param[in] typed_value The typed value object.
|
227
|
+
@param[out] color The color value retrieved.
|
228
|
+
@related SUTypedValueRef
|
229
|
+
@return
|
230
|
+
- \ref SU_ERROR_NONE on success
|
231
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
232
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
|
233
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
234
|
+
*/
|
235
|
+
SU_RESULT SUTypedValueGetColor(SUTypedValueRef typed_value, SUColor* color);
|
236
|
+
|
237
|
+
/**
|
238
|
+
@brief Sets the color value of a typed value object.
|
239
|
+
@param[in] typed_value The typed value object.
|
240
|
+
@param[in] color The color value to set.
|
241
|
+
@related SUTypedValueRef
|
242
|
+
@return
|
243
|
+
- \ref SU_ERROR_NONE on success
|
244
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
245
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if color is NULL
|
246
|
+
*/
|
247
|
+
SU_RESULT SUTypedValueSetColor(SUTypedValueRef typed_value, const SUColor* color);
|
248
|
+
|
249
|
+
/**
|
250
|
+
@brief Retrieves the time value of a typed value object. The time value is in
|
251
|
+
seconds since January 1, 1970.
|
252
|
+
@param[in] typed_value The typed value object.
|
253
|
+
@param[out] time_value The time value retrieved.
|
254
|
+
@related SUTypedValueRef
|
255
|
+
@return
|
256
|
+
- \ref SU_ERROR_NONE on success
|
257
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
258
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if time_value is NULL
|
259
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
260
|
+
*/
|
261
|
+
SU_RESULT SUTypedValueGetTime(SUTypedValueRef typed_value, int64_t* time_value);
|
262
|
+
|
263
|
+
/**
|
264
|
+
@brief Sets the time value of a typed value object. The time value is in
|
265
|
+
seconds since January 1, 1970.
|
266
|
+
@param[in] typed_value The typed value object.
|
267
|
+
@param[in] time_value The time value that is set.
|
268
|
+
@related SUTypedValueRef
|
269
|
+
@return
|
270
|
+
- \ref SU_ERROR_NONE on success
|
271
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
272
|
+
*/
|
273
|
+
SU_RESULT SUTypedValueSetTime(SUTypedValueRef typed_value, int64_t time_value);
|
274
|
+
|
275
|
+
/**
|
276
|
+
@brief Retrieves the string value of a typed value object.
|
277
|
+
@param[in] typed_value The typed value object.
|
278
|
+
@param[out] string_value The string value retrieved.
|
279
|
+
@related SUTypedValueRef
|
280
|
+
@return
|
281
|
+
- \ref SU_ERROR_NONE on success
|
282
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
283
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
284
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if string_value is NULL
|
285
|
+
- \ref SU_ERROR_INVALID_OUTPUT if string_value does not point to a valid \ref
|
286
|
+
SUStringRef object
|
287
|
+
*/
|
288
|
+
SU_RESULT SUTypedValueGetString(SUTypedValueRef typed_value, SUStringRef* string_value);
|
289
|
+
|
290
|
+
/**
|
291
|
+
@brief Sets the string value of a typed value object.
|
292
|
+
@param[in] typed_value The typed value object.
|
293
|
+
@param[in] string_value The string value to set. Assumed to be UTF-8 encoded.
|
294
|
+
@related SUTypedValueRef
|
295
|
+
@return
|
296
|
+
- \ref SU_ERROR_NONE on success
|
297
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
298
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if string_value is NULL
|
299
|
+
*/
|
300
|
+
SU_RESULT SUTypedValueSetString(SUTypedValueRef typed_value, const char* string_value);
|
301
|
+
|
302
|
+
/**
|
303
|
+
@brief Retrieves the 3-element vector value of a typed value object
|
304
|
+
@param[in] typed_value The typed value object.
|
305
|
+
@param[out] vector3d_value The 3-element vector value retrieved.
|
306
|
+
@related SUTypedValueRef
|
307
|
+
@return
|
308
|
+
- \ref SU_ERROR_NONE on success
|
309
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
310
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if vector3d_value is NULL
|
311
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
312
|
+
*/
|
313
|
+
SU_RESULT SUTypedValueGetVector3d(SUTypedValueRef typed_value, double vector3d_value[3]);
|
314
|
+
|
315
|
+
/**
|
316
|
+
@brief Sets the 3-element vector value of a typed value object.
|
317
|
+
@param[in] typed_value The typed value object.
|
318
|
+
@param[in] vector3d_value The 3-element vector value to set.
|
319
|
+
@related SUTypedValueRef
|
320
|
+
@return
|
321
|
+
- \ref SU_ERROR_NONE on success
|
322
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
323
|
+
*/
|
324
|
+
SU_RESULT SUTypedValueSetVector3d(SUTypedValueRef typed_value, const double vector3d_value[3]);
|
325
|
+
|
326
|
+
/**
|
327
|
+
@brief Sets the 3D unit vector value of a typed value object.
|
328
|
+
@param[in] typed_value The typed value object.
|
329
|
+
@param[in] vector3d_value The 3 vector components. Magnitude is ignored.
|
330
|
+
@related SUTypedValueRef
|
331
|
+
@return
|
332
|
+
- \ref SU_ERROR_NONE on success
|
333
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
334
|
+
*/
|
335
|
+
SU_RESULT SUTypedValueSetUnitVector3d(SUTypedValueRef typed_value, const double vector3d_value[3]);
|
336
|
+
|
337
|
+
/**
|
338
|
+
@brief Retrieves the array of typed value objects from a typed value of type
|
339
|
+
\ref SUTypedValueType_Array. Note that the returned \ref SUTypedValueRef
|
340
|
+
objects will still be owned by their parent typed value array and therefore
|
341
|
+
they must not be released by the caller.
|
342
|
+
@param[in] typed_value The typed value object.
|
343
|
+
@param[in] len The length of the array to retrieve.
|
344
|
+
@param[out] values The typed value objects retrieved.
|
345
|
+
@param[out] count The actual number of typed value objects retrieved.
|
346
|
+
@related SUTypedValueRef
|
347
|
+
@return
|
348
|
+
- \ref SU_ERROR_NONE on success
|
349
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
350
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if values or count is NULL
|
351
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of the requested type
|
352
|
+
*/
|
353
|
+
SU_RESULT SUTypedValueGetArrayItems(
|
354
|
+
SUTypedValueRef typed_value, size_t len, SUTypedValueRef values[], size_t* count);
|
355
|
+
|
356
|
+
/**
|
357
|
+
@brief Sets the array of typed value objects of a typed value object. The
|
358
|
+
elements of the given array are copied to the type value object.
|
359
|
+
@param[in] typed_value The typed value object.
|
360
|
+
@param[in] len The number of typed value objects to set.
|
361
|
+
@param[in] values The array of typed value objects to set.
|
362
|
+
@related SUTypedValueRef
|
363
|
+
@return
|
364
|
+
- \ref SU_ERROR_NONE on success
|
365
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
366
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if values is NULL
|
367
|
+
*/
|
368
|
+
SU_RESULT SUTypedValueSetArrayItems(
|
369
|
+
SUTypedValueRef typed_value, size_t len, SUTypedValueRef values[]);
|
370
|
+
|
371
|
+
/**
|
372
|
+
@brief Retrieves the number of typed value objects from a typed value of type
|
373
|
+
\ref SUTypedValueType_Array.
|
374
|
+
@param[in] typed_value The typed value object.
|
375
|
+
@param[out] count The number of typed value objects in the array.
|
376
|
+
@related SUTypedValueRef
|
377
|
+
@return
|
378
|
+
- \ref SU_ERROR_NONE on success
|
379
|
+
- \ref SU_ERROR_INVALID_INPUT if typed_value is not a valid object
|
380
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
381
|
+
- \ref SU_ERROR_NO_DATA if typed_value is not of type
|
382
|
+
\ref SUTypedValueType_Array.
|
383
|
+
*/
|
384
|
+
SU_RESULT SUTypedValueGetNumArrayItems(SUTypedValueRef typed_value, size_t* count);
|
385
|
+
|
386
|
+
#ifdef __cplusplus
|
387
|
+
} // extern "C"
|
388
|
+
#endif
|
389
|
+
|
390
|
+
#endif // SKETCHUP_MODEL_TYPED_VALUE_H_
|
@@ -0,0 +1,79 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUUVHelperRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_UV_HELPER_H_
|
8
|
+
#define SKETCHUP_MODEL_UV_HELPER_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/model/defs.h>
|
12
|
+
|
13
|
+
#pragma pack(push, 8)
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUUVHelperRef
|
20
|
+
@brief Used to compute UV texture coordinates for a particular face.
|
21
|
+
*/
|
22
|
+
|
23
|
+
/**
|
24
|
+
@struct SUUVQ
|
25
|
+
@brief Stores UV texture coordinates.
|
26
|
+
*/
|
27
|
+
struct SUUVQ {
|
28
|
+
double u; ///< U coordinate
|
29
|
+
double v; ///< V coordinate
|
30
|
+
double q; ///< Q coordinate
|
31
|
+
};
|
32
|
+
|
33
|
+
/**
|
34
|
+
@brief Releases a UVHelper object that was obtained from a face.
|
35
|
+
@param[in] uvhelper The UV helper object.
|
36
|
+
@related SUUVHelperRef
|
37
|
+
@return
|
38
|
+
- \ref SU_ERROR_NONE on success
|
39
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if uvhelper is NULL
|
40
|
+
- \ref SU_ERROR_INVALID_INPUT if uvhelper is an invalid object
|
41
|
+
*/
|
42
|
+
SU_RESULT SUUVHelperRelease(SUUVHelperRef* uvhelper);
|
43
|
+
|
44
|
+
/**
|
45
|
+
@brief Retrieves the UVQ point at the given point for the front of the face.
|
46
|
+
@param[in] uvhelper The UV helper object.
|
47
|
+
@param[in] point The point where the coordinates are to be computed.
|
48
|
+
@param[out] uvq The coordinates retrieved.
|
49
|
+
@related SUUVHelperRef
|
50
|
+
@return
|
51
|
+
- \ref SU_ERROR_NONE on success
|
52
|
+
- \ref SU_ERROR_INVALID_INPUT if uvhelper is an invalid object
|
53
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point is NULL
|
54
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if uvq is NULL
|
55
|
+
*/
|
56
|
+
SU_RESULT SUUVHelperGetFrontUVQ(
|
57
|
+
SUUVHelperRef uvhelper, const struct SUPoint3D* point, struct SUUVQ* uvq);
|
58
|
+
|
59
|
+
/**
|
60
|
+
@brief Retrieves the UVQ point at the given point for the back of the face.
|
61
|
+
@param[in] uvhelper The UVHelper object.
|
62
|
+
@param[in] point The point where the coordinates are to be computed.
|
63
|
+
@param[out] uvq The coordinates retrieved.
|
64
|
+
@related SUUVHelperRef
|
65
|
+
@return
|
66
|
+
- \ref SU_ERROR_NONE on success
|
67
|
+
- \ref SU_ERROR_INVALID_INPUT if uvhelper is an invalid object
|
68
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if point is NULL
|
69
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if uvq is NULL
|
70
|
+
*/
|
71
|
+
SU_RESULT SUUVHelperGetBackUVQ(
|
72
|
+
SUUVHelperRef uvhelper, const struct SUPoint3D* point, struct SUUVQ* uvq);
|
73
|
+
|
74
|
+
#ifdef __cplusplus
|
75
|
+
} // extern "C" {
|
76
|
+
#endif
|
77
|
+
#pragma pack(pop)
|
78
|
+
|
79
|
+
#endif // SKETCHUP_MODEL_UV_HELPER_H_
|
@@ -0,0 +1,154 @@
|
|
1
|
+
// Copyright 2013 Trimble Inc. All Rights Reserved.
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @file
|
5
|
+
* @brief Interfaces for SUVertexRef.
|
6
|
+
*/
|
7
|
+
#ifndef SKETCHUP_MODEL_VERTEX_H_
|
8
|
+
#define SKETCHUP_MODEL_VERTEX_H_
|
9
|
+
|
10
|
+
#include <SketchUpAPI/common.h>
|
11
|
+
#include <SketchUpAPI/geometry.h>
|
12
|
+
#include <SketchUpAPI/model/defs.h>
|
13
|
+
|
14
|
+
#ifdef __cplusplus
|
15
|
+
extern "C" {
|
16
|
+
#endif
|
17
|
+
|
18
|
+
/**
|
19
|
+
@struct SUVertexRef
|
20
|
+
@extends SUEntityRef
|
21
|
+
@brief A vertex type that has a position and is associated with other geometry
|
22
|
+
like edges, faces, and loops.
|
23
|
+
*/
|
24
|
+
|
25
|
+
/**
|
26
|
+
@brief Converts from an \ref SUVertexRef to an \ref SUEntityRef. This is
|
27
|
+
essentially an upcast operation.
|
28
|
+
@param[in] vertex The vertex object.
|
29
|
+
@related SUVertexRef
|
30
|
+
@return
|
31
|
+
- The converted \ref SUEntityRef if vertex is a valid object
|
32
|
+
- If not, the returned reference will be invalid
|
33
|
+
*/
|
34
|
+
SU_EXPORT SUEntityRef SUVertexToEntity(SUVertexRef vertex);
|
35
|
+
|
36
|
+
/**
|
37
|
+
@brief Converts from an \ref SUEntityRef to an \ref SUVertexRef. This is
|
38
|
+
essentially a downcast operation so the given \ref SUEntityRef must be
|
39
|
+
convertible to an \ref SUVertexRef.
|
40
|
+
@param[in] entity The entity object.
|
41
|
+
@related SUVertexRef
|
42
|
+
@return
|
43
|
+
- The converted \ref SUVertexRef if the downcast operation succeeds
|
44
|
+
- If the downcast operation fails, the returned reference will be invalid
|
45
|
+
*/
|
46
|
+
SU_EXPORT SUVertexRef SUVertexFromEntity(SUEntityRef entity);
|
47
|
+
|
48
|
+
/**
|
49
|
+
@brief Retrieves the position of a vertex object.
|
50
|
+
@param[in] vertex The vertex object.
|
51
|
+
@param[out] position The vertex position.
|
52
|
+
@related SUVertexRef
|
53
|
+
@return
|
54
|
+
- \ref SU_ERROR_NONE on success
|
55
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
56
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if position is NULL
|
57
|
+
*/
|
58
|
+
SU_RESULT SUVertexGetPosition(SUVertexRef vertex, struct SUPoint3D* position);
|
59
|
+
|
60
|
+
/**
|
61
|
+
@brief Sets the position of a vertex object.
|
62
|
+
@param[in] vertex The vertex object.
|
63
|
+
@param[in] position The value used to set the vertex position.
|
64
|
+
@related SUVertexRef
|
65
|
+
@return
|
66
|
+
- \ref SU_ERROR_NONE on success
|
67
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
68
|
+
- \ref SU_ERROR_NULL_POINTER_INPUT if position is NULL
|
69
|
+
*/
|
70
|
+
SU_RESULT SUVertexSetPosition(SUVertexRef vertex, const struct SUPoint3D* position);
|
71
|
+
|
72
|
+
/**
|
73
|
+
@brief Retrieves the number of edges that the vertex is associated with.
|
74
|
+
@param[in] vertex The vertex object.
|
75
|
+
@param[out] count The number of edges.
|
76
|
+
@related SUVertexRef
|
77
|
+
@return
|
78
|
+
- \ref SU_ERROR_NONE on success
|
79
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
80
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
81
|
+
*/
|
82
|
+
SU_RESULT SUVertexGetNumEdges(SUVertexRef vertex, size_t* count);
|
83
|
+
|
84
|
+
/**
|
85
|
+
@brief Retrieves the edge objects associated with a vertex object.
|
86
|
+
@param[in] vertex The vertex object.
|
87
|
+
@param[in] len The number of edges to retrieve.
|
88
|
+
@param[out] edges The edges retrieved.
|
89
|
+
@param[out] count The number of edges retrieved.
|
90
|
+
@related SUVertexRef
|
91
|
+
@return
|
92
|
+
- \ref SU_ERROR_NONE on success
|
93
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
94
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if edges or count is NULL
|
95
|
+
*/
|
96
|
+
SU_RESULT SUVertexGetEdges(SUVertexRef vertex, size_t len, SUEdgeRef edges[], size_t* count);
|
97
|
+
|
98
|
+
/**
|
99
|
+
@brief Retrieves the number of faces that the vertex is associated with.
|
100
|
+
@param[in] vertex The vertex object.
|
101
|
+
@param[out] count The number of faces.
|
102
|
+
@related SUVertexRef
|
103
|
+
@return
|
104
|
+
- \ref SU_ERROR_NONE on success
|
105
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
106
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
107
|
+
*/
|
108
|
+
SU_RESULT SUVertexGetNumFaces(SUVertexRef vertex, size_t* count);
|
109
|
+
|
110
|
+
/**
|
111
|
+
@brief Retrieves the face objects associated with a vertex object.
|
112
|
+
@param[in] vertex The vertex object.
|
113
|
+
@param[in] len The number of faces to retrieve.
|
114
|
+
@param[out] faces The faces retrieved.
|
115
|
+
@param[out] count The number of faces retrieved.
|
116
|
+
@related SUVertexRef
|
117
|
+
@return
|
118
|
+
- \ref SU_ERROR_NONE on success
|
119
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
120
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if faces or count is NULL
|
121
|
+
*/
|
122
|
+
SU_RESULT SUVertexGetFaces(SUVertexRef vertex, size_t len, SUFaceRef faces[], size_t* count);
|
123
|
+
|
124
|
+
/**
|
125
|
+
@brief Retrieves the number of loops that the vertex is associated with.
|
126
|
+
@param[in] vertex The vertex object.
|
127
|
+
@param[out] count The number of loops.
|
128
|
+
@related SUVertexRef
|
129
|
+
@return
|
130
|
+
- \ref SU_ERROR_NONE on success
|
131
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
132
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
|
133
|
+
*/
|
134
|
+
SU_RESULT SUVertexGetNumLoops(SUVertexRef vertex, size_t* count);
|
135
|
+
|
136
|
+
/**
|
137
|
+
@brief Retrieves the loop objects associated with a vertex object.
|
138
|
+
@param[in] vertex The vertex object.
|
139
|
+
@param[in] len The number of loops to retrieve.
|
140
|
+
@param[out] loops The loops retrieved.
|
141
|
+
@param[out] count The number of loops retrieved.
|
142
|
+
@related SUVertexRef
|
143
|
+
@return
|
144
|
+
- \ref SU_ERROR_NONE on success
|
145
|
+
- \ref SU_ERROR_INVALID_INPUT if vertex is an invalid object
|
146
|
+
- \ref SU_ERROR_NULL_POINTER_OUTPUT if loops or count is NULL
|
147
|
+
*/
|
148
|
+
SU_RESULT SUVertexGetLoops(SUVertexRef vertex, size_t len, SULoopRef loops[], size_t* count);
|
149
|
+
|
150
|
+
#ifdef __cplusplus
|
151
|
+
} // extern "C"
|
152
|
+
#endif
|
153
|
+
|
154
|
+
#endif // SKETCHUP_MODEL_VERTEX_H_
|