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.
Files changed (241) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +11 -0
  3. data/README.md +5 -0
  4. data/ext/attribute_dictionaries.c +45 -0
  5. data/ext/attribute_dictionaries.h +3 -0
  6. data/ext/attribute_dictionary.c +156 -0
  7. data/ext/attribute_dictionary.h +3 -0
  8. data/ext/behavior.c +10 -0
  9. data/ext/behavior.h +3 -0
  10. data/ext/color.c +211 -0
  11. data/ext/color.h +3 -0
  12. data/ext/component_definition.c +188 -0
  13. data/ext/component_definition.h +3 -0
  14. data/ext/component_instance.c +10 -0
  15. data/ext/component_instance.h +3 -0
  16. data/ext/definition_list.c +145 -0
  17. data/ext/definition_list.h +3 -0
  18. data/ext/drawing_element.c +10 -0
  19. data/ext/drawing_element.h +3 -0
  20. data/ext/entities.c +11 -0
  21. data/ext/entities.h +3 -0
  22. data/ext/entity.c +253 -0
  23. data/ext/entity.h +3 -0
  24. data/ext/extconf.rb +38 -0
  25. data/ext/material.c +242 -0
  26. data/ext/material.h +3 -0
  27. data/ext/materials.c +80 -0
  28. data/ext/materials.h +3 -0
  29. data/ext/model.c +42 -0
  30. data/ext/model.h +3 -0
  31. data/ext/sketchup.c +89 -0
  32. data/ext/sketchup.h +4 -0
  33. data/ext/texture.c +9 -0
  34. data/ext/texture.h +3 -0
  35. data/ext/typed_value.c +84 -0
  36. data/ext/typed_value.h +5 -0
  37. data/ext/utils.h +80 -0
  38. data/lib/sketchup.rb +12 -0
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
  56. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
  57. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
  58. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
  59. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
  60. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
  61. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
  62. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
  63. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
  64. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
  65. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
  66. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
  67. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
  68. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
  69. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
  70. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
  71. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
  72. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
  73. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
  74. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
  75. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
  76. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
  77. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
  78. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
  79. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
  80. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
  81. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
  82. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
  83. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
  84. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
  85. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
  86. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
  87. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
  88. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
  89. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
  90. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
  91. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
  92. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
  93. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
  94. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
  95. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
  96. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
  97. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
  98. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
  99. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
  100. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
  101. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
  102. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
  103. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
  104. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
  105. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
  106. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
  107. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
  108. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
  109. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
  110. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
  111. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
  112. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
  113. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
  114. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
  115. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
  116. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
  117. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
  118. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
  119. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
  120. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
  121. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
  122. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
  123. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
  124. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
  125. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
  126. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
  127. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
  128. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
  129. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
  130. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
  131. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
  132. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
  133. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  134. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
  135. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
  136. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  137. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  138. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  139. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  140. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
  141. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  142. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
  143. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  144. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  145. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  146. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  147. data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
  148. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
  149. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
  150. data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
  151. data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
  152. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
  153. data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
  154. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
  155. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
  156. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
  157. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
  158. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
  159. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
  160. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
  161. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
  162. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
  163. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
  164. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
  165. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
  166. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
  167. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
  168. data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
  169. data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
  170. data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
  171. data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
  172. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
  173. data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
  174. data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
  175. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
  176. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
  177. data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
  178. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
  179. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
  180. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
  181. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
  182. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
  183. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
  184. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
  185. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
  186. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
  187. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
  188. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
  189. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
  190. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
  191. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
  192. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
  193. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
  194. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
  195. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
  196. data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
  197. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
  198. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
  199. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
  200. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
  201. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
  202. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
  203. data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
  204. data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
  205. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
  206. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
  207. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
  208. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
  209. data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
  210. data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
  211. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
  212. data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
  213. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
  214. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
  215. data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
  216. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
  217. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
  218. data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
  219. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
  220. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
  221. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
  222. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
  223. data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
  224. data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
  225. data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
  226. data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
  227. data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
  228. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
  229. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
  230. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
  231. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
  232. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
  233. data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
  234. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
  235. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
  236. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
  237. data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
  238. data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
  239. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
  240. data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
  241. metadata +313 -0
@@ -0,0 +1,235 @@
1
+ // Copyright 2017 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUVector2D.
6
+ */
7
+ #ifndef SKETCHUP_GEOMETRY_VECTOR2D_H_
8
+ #define SKETCHUP_GEOMETRY_VECTOR2D_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/geometry.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @brief Creates a vector between two point objects.
19
+ @since SketchUp 2018 M0, API 6.0
20
+ @param[in] from The first point object.
21
+ @param[in] to The second point object.
22
+ @param[out] vector The vector from from to to.
23
+ @related SUVector2D
24
+ @return
25
+ - \ref SU_ERROR_NONE on success
26
+ - \ref SU_ERROR_NULL_POINTER_INPUT if from or to is NULL
27
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
28
+ */
29
+ SU_RESULT SUVector2DCreate(
30
+ struct SUVector2D* vector, const struct SUPoint2D* from, const struct SUPoint2D* to);
31
+
32
+ /**
33
+ @brief Determines if a vector is valid. A vector is invalid if its length is
34
+ zero.
35
+ @since SketchUp 2017, API 5.0
36
+ @param[in] vector The vector object.
37
+ @param[out] valid Whether the vector is valid.
38
+ @related SUVector2D
39
+ @return
40
+ - \ref SU_ERROR_NONE on success
41
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
42
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if valid is NULL
43
+ */
44
+ SU_RESULT SUVector2DIsValid(const struct SUVector2D* vector, bool* valid);
45
+
46
+ /**
47
+ @brief Determines if two vectors are parallel.
48
+ @since SketchUp 2017, API 5.0
49
+ @param[in] vector1 The first vector object.
50
+ @param[in] vector2 The second vector object.
51
+ @param[out] parallel Whether the vectors are parallel.
52
+ @related SUVector2D
53
+ @return
54
+ - \ref SU_ERROR_NONE on success
55
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
56
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if parallel is NULL
57
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
58
+ */
59
+ SU_RESULT SUVector2DIsParallelTo(
60
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, bool* parallel);
61
+
62
+ /**
63
+ @brief Determines if two vectors are perpendicular.
64
+ @since SketchUp 2017, API 5.0
65
+ @param[in] vector1 The first vector object.
66
+ @param[in] vector2 The second vector object.
67
+ @param[out] perpendicular Whether the vectors are perpendicular.
68
+ @related SUVector2D
69
+ @return
70
+ - \ref SU_ERROR_NONE on success
71
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
72
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if perpendicular is NULL
73
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
74
+ */
75
+ SU_RESULT SUVector2DIsPerpendicularTo(
76
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, bool* perpendicular);
77
+
78
+ /**
79
+ @brief Determines if two vectors are parallel and pointing the same direction.
80
+ @since SketchUp 2017, API 5.0
81
+ @param[in] vector1 The first vector object.
82
+ @param[in] vector2 The second vector object.
83
+ @param[out] same_direction Whether the vectors are pointing in the same direction.
84
+ @related SUVector2D
85
+ @return
86
+ - \ref SU_ERROR_NONE on success
87
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
88
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if same_direction is NULL
89
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
90
+ */
91
+ SU_RESULT SUVector2DIsSameDirectionAs(
92
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, bool* same_direction);
93
+
94
+ /**
95
+ @brief Determines if two vectors are equal.
96
+ @since SketchUp 2018, API 6.0
97
+ @param[in] vector1 The first vector object.
98
+ @param[in] vector2 The second vector object.
99
+ @param[out] equal Whether the vectors are equal.
100
+ @related SUVector2D
101
+ @return
102
+ - \ref SU_ERROR_NONE on success
103
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
104
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if equal is NULL
105
+ */
106
+ SU_RESULT SUVector2DIsEqual(
107
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, bool* equal);
108
+
109
+ /**
110
+ @brief Normalizes a vector.
111
+ @since SketchUp 2017, API 5.0
112
+ @param[in,out] vector The vector object.
113
+ @related SUVector2D
114
+ @return
115
+ - \ref SU_ERROR_NONE on success
116
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
117
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector is not a valid vector
118
+ */
119
+ SU_RESULT SUVector2DNormalize(struct SUVector2D* vector);
120
+
121
+ /**
122
+ @brief Reverses a vector.
123
+ @since SketchUp 2017, API 5.0
124
+ @param[in] vector The vector object.
125
+ @related SUVector2D
126
+ @return
127
+ - \ref SU_ERROR_NONE on success
128
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
129
+ */
130
+ SU_RESULT SUVector2DReverse(struct SUVector2D* vector);
131
+
132
+ /**
133
+ @brief Computes the dot product of two vectors.
134
+ @since SketchUp 2017, API 5.0
135
+ @param[in] vector1 The first vector object.
136
+ @param[in] vector2 The second vector object.
137
+ @param[out] dot The value of the dot product.
138
+ @related SUVector2D
139
+ @return
140
+ - \ref SU_ERROR_NONE on success
141
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
142
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if dot is NULL
143
+ */
144
+ SU_RESULT SUVector2DDot(
145
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, double* dot);
146
+
147
+ /**
148
+ @brief Computes the cross product of two vectors.
149
+ @since SketchUp 2017, API 5.0
150
+ @param[in] vector1 The first vector object.
151
+ @param[in] vector2 The second vector object.
152
+ @param[out] cross The value of the cross product.
153
+ @related SUVector2D
154
+ @return
155
+ - \ref SU_ERROR_NONE on success
156
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
157
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if cross is NULL
158
+ */
159
+ SU_RESULT SUVector2DCross(
160
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, double* cross);
161
+
162
+ /**
163
+ @brief Determines if a vector has a length of one.
164
+ @since SketchUp 2017, API 5.0
165
+ @param[in] vector The vector object.
166
+ @param[out] is_unit_vector Whether the vector has a length of one.
167
+ @related SUVector2D
168
+ @return
169
+ - \ref SU_ERROR_NONE on success
170
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
171
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_unit_vector is NULL
172
+ */
173
+ SU_RESULT SUVector2DIsUnitVector(const struct SUVector2D* vector, bool* is_unit_vector);
174
+
175
+ /**
176
+ @brief Gets the length of a vector.
177
+ @since SketchUp 2017, API 5.0
178
+ @param[in] vector The vector object.
179
+ @param[out] length The length of the vector.
180
+ @related SUVector2D
181
+ @return
182
+ - \ref SU_ERROR_NONE on success
183
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
184
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if length is NULL
185
+ */
186
+ SU_RESULT SUVector2DGetLength(const struct SUVector2D* vector, double* length);
187
+
188
+ /**
189
+ @brief Sets the length of a vector.
190
+ @since SketchUp 2017, API 5.0
191
+ @param[in,out] vector The vector object.
192
+ @param[in] length The new length the vector should be.
193
+ @related SUVector2D
194
+ @return
195
+ - \ref SU_ERROR_NONE on success
196
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
197
+ - \ref SU_ERROR_OUT_OF_RANGE if length is zero
198
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector is not a valid vector
199
+ */
200
+ SU_RESULT SUVector2DSetLength(struct SUVector2D* vector, double length);
201
+
202
+ /**
203
+ @brief Gets the angle between two vectors.
204
+ @since SketchUp 2017, API 5.0
205
+ @param[in] vector1 The first vector object.
206
+ @param[in] vector2 The second vector object.
207
+ @param[out] angle The angle between the vectors.
208
+ @related SUVector2D
209
+ @return
210
+ - \ref SU_ERROR_NONE on success
211
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
212
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if angle is NULL
213
+ */
214
+ SU_RESULT SUVector2DAngleBetween(
215
+ const struct SUVector2D* vector1, const struct SUVector2D* vector2, double* angle);
216
+
217
+ /**
218
+ @brief Transforms a vector by applying a 2D transformation.
219
+ @since SketchUp 2019, API 7.0
220
+ @param[in] transform The transformation to be applied.
221
+ @param[in,out] vector The vector to be transformed.
222
+ @related SUVector2D
223
+ @return
224
+ - \ref SU_ERROR_NONE on success
225
+ - \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
226
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
227
+ */
228
+ SU_RESULT SUVector2DTransform(
229
+ const struct SUTransformation2D* transform, struct SUVector2D* vector);
230
+
231
+ #ifdef __cplusplus
232
+ } // extern "C"
233
+ #endif
234
+
235
+ #endif // SKETCHUP_GEOMETRY_VECTOR2D_H_
@@ -0,0 +1,285 @@
1
+ // Copyright 2017 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUVector3D.
6
+ */
7
+ #ifndef SKETCHUP_GEOMETRY_VECTOR3D_H_
8
+ #define SKETCHUP_GEOMETRY_VECTOR3D_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/geometry.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @brief Creates a vector between two point objects.
19
+ @since SketchUp 2018, API 6.0
20
+ @param[in] from The first point object.
21
+ @param[in] to The second point object.
22
+ @param[out] vector The vector from from to to.
23
+ @related SUVector3D
24
+ @return
25
+ - \ref SU_ERROR_NONE on success
26
+ - \ref SU_ERROR_NULL_POINTER_INPUT if from or to is NULL
27
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
28
+ */
29
+ SU_RESULT SUVector3DCreate(
30
+ struct SUVector3D* vector, const struct SUPoint3D* from, const struct SUPoint3D* to);
31
+
32
+ /**
33
+ @brief Determines if a vector is valid. A vector is invalid if its length is
34
+ zero.
35
+ @since SketchUp 2018, API 6.0
36
+ @param[in] vector The vector object.
37
+ @param[out] valid Whether the vector is valid.
38
+ @related SUVector3D
39
+ @return
40
+ - \ref SU_ERROR_NONE on success
41
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
42
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if valid is NULL
43
+ */
44
+ SU_RESULT SUVector3DIsValid(const struct SUVector3D* vector, bool* valid);
45
+
46
+ /**
47
+ @brief Determines if two vectors are parallel.
48
+ @since SketchUp 2018, API 6.0
49
+ @param[in] vector1 The first vector object.
50
+ @param[in] vector2 The second vector object.
51
+ @param[out] parallel Whether the vectors are parallel.
52
+ @related SUVector3D
53
+ @return
54
+ - \ref SU_ERROR_NONE on success
55
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
56
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if parallel is NULL
57
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
58
+ */
59
+ SU_RESULT SUVector3DIsParallelTo(
60
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, bool* parallel);
61
+
62
+ /**
63
+ @brief Determines if two vectors are perpendicular.
64
+ @since SketchUp 2018, API 6.0
65
+ @param[in] vector1 The first vector object.
66
+ @param[in] vector2 The second vector object.
67
+ @param[out] perpendicular Whether the vectors are perpendicular.
68
+ @related SUVector3D
69
+ @return
70
+ - \ref SU_ERROR_NONE on success
71
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
72
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if perpendicular is NULL
73
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
74
+ */
75
+ SU_RESULT SUVector3DIsPerpendicularTo(
76
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, bool* perpendicular);
77
+
78
+ /**
79
+ @brief Determines if two vectors are parallel and pointing the same direction.
80
+ @since SketchUp 2018, API 6.0
81
+ @param[in] vector1 The first vector object.
82
+ @param[in] vector2 The second vector object.
83
+ @param[out] same_direction Whether the vectors are pointing in the same direction.
84
+ @related SUVector3D
85
+ @return
86
+ - \ref SU_ERROR_NONE on success
87
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
88
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if same_direction is NULL
89
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector1 or vector2 is not a valid vector
90
+ */
91
+ SU_RESULT SUVector3DIsSameDirectionAs(
92
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, bool* same_direction);
93
+
94
+ /**
95
+ @brief Determines if two vectors are equal.
96
+ @since SketchUp 2018, API 6.0
97
+ @param[in] vector1 The first vector object.
98
+ @param[in] vector2 The second vector object.
99
+ @param[out] equal Whether the vectors are equal.
100
+ @related SUVector3D
101
+ @return
102
+ - \ref SU_ERROR_NONE on success
103
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
104
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if equal is NULL
105
+ */
106
+ SU_RESULT SUVector3DIsEqual(
107
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, bool* equal);
108
+
109
+ /**
110
+ @brief Determines if vector1 is less than vector2.
111
+ @param[in] vector1 The first vector object.
112
+ @param[in] vector2 The second vector object.
113
+ @param[out] less_than Whether vector1 is less than vector2.
114
+ @related SUVector3D
115
+ @return
116
+ - \ref SU_ERROR_NONE on success
117
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
118
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if less_than is NULL
119
+ */
120
+ SU_RESULT SUVector3DLessThan(
121
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, bool* less_than);
122
+
123
+ /**
124
+ @brief Normalizes a vector.
125
+ @since SketchUp 2018, API 6.0
126
+ @param[in,out] vector The vector object.
127
+ @related SUVector3D
128
+ @return
129
+ - \ref SU_ERROR_NONE on success
130
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
131
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector is not a valid vector
132
+ */
133
+ SU_RESULT SUVector3DNormalize(struct SUVector3D* vector);
134
+
135
+ /**
136
+ @brief Reverses a vector.
137
+ @since SketchUp 2018, API 6.0
138
+ @param[in,out] vector The vector object.
139
+ @related SUVector3D
140
+ @return
141
+ - \ref SU_ERROR_NONE on success
142
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
143
+ */
144
+ SU_RESULT SUVector3DReverse(struct SUVector3D* vector);
145
+
146
+ /**
147
+ @brief Computes the dot product of two vectors.
148
+ @since SketchUp 2018, API 6.0
149
+ @param[in] vector1 The first vector object.
150
+ @param[in] vector2 The second vector object.
151
+ @param[out] dot The value of the dot product.
152
+ @related SUVector3D
153
+ @return
154
+ - \ref SU_ERROR_NONE on success
155
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
156
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if dot is NULL
157
+ */
158
+ SU_RESULT SUVector3DDot(
159
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, double* dot);
160
+
161
+ /**
162
+ @brief Computes the cross product of two vectors.
163
+ @since SketchUp 2018, API 6.0
164
+ @param[in] vector1 The first vector object.
165
+ @param[in] vector2 The second vector object.
166
+ @param[out] cross The value of the cross product.
167
+ @related SUVector3D
168
+ @return
169
+ - \ref SU_ERROR_NONE on success
170
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
171
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if cross is NULL
172
+ */
173
+ SU_RESULT SUVector3DCross(
174
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, struct SUVector3D* cross);
175
+
176
+ /**
177
+ @brief Determines if a vector has a length of one.
178
+ @since SketchUp 2018, API 6.0
179
+ @param[in] vector The vector object.
180
+ @param[out] is_unit_vector Whether the vector has a length of one.
181
+ @related SUVector3D
182
+ @return
183
+ - \ref SU_ERROR_NONE on success
184
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
185
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_unit_vector is NULL
186
+ */
187
+ SU_RESULT SUVector3DIsUnitVector(const struct SUVector3D* vector, bool* is_unit_vector);
188
+
189
+ /**
190
+ @brief Gets the length of a vector.
191
+ @since SketchUp 2018, API 6.0
192
+ @param[in] vector The vector object.
193
+ @param[out] length The length of the vector.
194
+ @related SUVector3D
195
+ @return
196
+ - \ref SU_ERROR_NONE on success
197
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
198
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if length is NULL
199
+ */
200
+ SU_RESULT SUVector3DGetLength(const struct SUVector3D* vector, double* length);
201
+
202
+ /**
203
+ @brief Sets the length of a vector.
204
+ @since SketchUp 2018, API 6.0
205
+ @param[in,out] vector The vector object.
206
+ @param[in] length The new length the vector should be.
207
+ @related SUVector3D
208
+ @return
209
+ - \ref SU_ERROR_NONE on success
210
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector is NULL
211
+ - \ref SU_ERROR_INVALID_ARGUMENT if vector is not a valid vector
212
+ */
213
+ SU_RESULT SUVector3DSetLength(struct SUVector3D* vector, double length);
214
+
215
+ /**
216
+ @brief Gets the angle between two vectors.
217
+ @since SketchUp 2018, API 6.0
218
+ @param[in] vector1 The first vector object.
219
+ @param[in] vector2 The second vector object.
220
+ @param[out] angle The angle between the vectors.
221
+ @related SUVector3D
222
+ @return
223
+ - \ref SU_ERROR_NONE on success
224
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector1 or vector2 is NULL
225
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if angle is NULL
226
+ */
227
+ SU_RESULT SUVector3DAngleBetween(
228
+ const struct SUVector3D* vector1, const struct SUVector3D* vector2, double* angle);
229
+
230
+ /**
231
+ @brief Get arbitrary axes perpendicular to this vector. This method uses the
232
+ arbitrary axis algorithm to calculate the x and y vectors.
233
+ @param[in] z_axis The vector to use as the z axis.
234
+ @param[out] x_axis The computed x axis vector.
235
+ @param[out] y_axis The computed y axis vector.
236
+ @related SUVector3D
237
+ @return
238
+ - \ref SU_ERROR_NONE on success
239
+ - \ref SU_ERROR_NULL_POINTER_INPUT if z_axis is NULL
240
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if x_axis or y_axis is NULL
241
+ - \ref SU_ERROR_INVALID_ARGUMENT if z_axis is not a valid vector
242
+ */
243
+ SU_RESULT SUVector3DGetArbitraryAxes(
244
+ const struct SUVector3D* z_axis, struct SUVector3D* x_axis, struct SUVector3D* y_axis);
245
+
246
+ /**
247
+ @brief Transforms the provided 3D vector by applying the provided 3D
248
+ transformation.
249
+ @since SketchUp 2018, API 6.0
250
+ @param[in] transform The transformation to be applied.
251
+ @param[in,out] vector The vector to be transformed.
252
+ @related SUVector3D
253
+ @return
254
+ - \ref SU_ERROR_NONE on success
255
+ - \ref SU_ERROR_NULL_POINTER_INPUT if transform is NULL
256
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
257
+ */
258
+ SU_RESULT SUVector3DTransform(const struct SUTransformation* transform, struct SUVector3D* vector);
259
+
260
+ /**
261
+ @brief Creates a new vector as a linear combination of other vectors.
262
+ This method is generally used to get a vector at some percentage between
263
+ two vectors.
264
+ @since SketchUp 2018, API 6.0
265
+ @param[in] vectors An array of vectors. Must be size of 2 or 3.
266
+ @param[in] weights An array of weights that correspond to the percentage. Must
267
+ be the same size as \p vectors.
268
+ @param[in] size The size of the \p vectors and \p weights array.
269
+ @param[out] vector The new computed vector.
270
+ @related SUVector3D
271
+ @return
272
+ - \ref SU_ERROR_NONE on success
273
+ - \ref SU_ERROR_OUT_OF_RANGE if size is less than 2 or greater than 3
274
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vectors or weights is NULL
275
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vector is NULL
276
+ */
277
+ SU_RESULT SUVector3DLinearCombination(
278
+ const struct SUVector3D* vectors, const double* weights, const size_t size,
279
+ struct SUVector3D* vector);
280
+
281
+ #ifdef __cplusplus
282
+ } // extern "C"
283
+ #endif
284
+
285
+ #endif // SKETCHUP_GEOMETRY_VECTOR3D_H_
@@ -0,0 +1,152 @@
1
+ // Copyright 2013 Trimble Inc., All rights reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Define types for geometric operations.
6
+ */
7
+ #ifndef SKETCHUP_GEOMETRY_H_
8
+ #define SKETCHUP_GEOMETRY_H_
9
+
10
+ // includes
11
+ #include <SketchUpAPI/common.h>
12
+
13
+ #pragma pack(push, 8)
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif // __cplusplus
18
+
19
+ /**
20
+ @struct SUPoint2D
21
+ @brief Represents a point in 2-dimensional space.
22
+ */
23
+ struct SUPoint2D {
24
+ double x; ///< X coordinate
25
+ double y; ///< Y coordinate
26
+ };
27
+
28
+ /**
29
+ @struct SUVector2D
30
+ @brief Represents a vector in 2-dimensional space.
31
+ */
32
+ struct SUVector2D {
33
+ double x; ///< X magnitude
34
+ double y; ///< Y magnitude
35
+ };
36
+
37
+ /**
38
+ @struct SUPoint3D
39
+ @brief Represents a point in 3-dimensional space.
40
+ */
41
+ struct SUPoint3D {
42
+ double x; ///< X coordinate
43
+ double y; ///< Y coordinate
44
+ double z; ///< Z coordinate
45
+ };
46
+
47
+ /**
48
+ @struct SUVector3D
49
+ @brief Represents a vector in 3-dimensional space.
50
+ */
51
+ struct SUVector3D {
52
+ double x; ///< X magnitude
53
+ double y; ///< Y magnitude
54
+ double z; ///< Z magnitude
55
+ };
56
+
57
+ /**
58
+ @struct SUPlane3D
59
+ @brief Represents a 3D plane by the parameters a, b, c, d.
60
+ For any point on the plane, ax + by + cz + d = 0.
61
+ The coeficients are normalized so that a*a + b*b + c*c = 1.
62
+ */
63
+ struct SUPlane3D {
64
+ double a; ///< The "a" factor in the plane equation.
65
+ double b; ///< The "b" factor in the plane equation.
66
+ double c; ///< The "c" factor in the plane equation.
67
+ double d; ///< The "d" factor in the plane equation.
68
+ };
69
+
70
+ /**
71
+ @struct SUBoundingBox3D
72
+ @brief Represents a 3D axis-aligned bounding box represented by the extreme
73
+ diagonal corner points with minimum and maximum x,y,z coordinates.
74
+ */
75
+ struct SUBoundingBox3D {
76
+ struct SUPoint3D min_point; ///< A 3D point where x, y and z are minimum
77
+ ///< values in the bounding box
78
+ struct SUPoint3D max_point; ///< A 3D point where x, y and z are maximum
79
+ ///< values in the bounding box
80
+ };
81
+
82
+ /**
83
+ @struct SUAxisAlignedRect2D
84
+ @brief Represents a 2D rectangle that is aligned with the X and Y axis of the
85
+ coordinate system.
86
+ */
87
+ struct SUAxisAlignedRect2D {
88
+ struct SUPoint2D upper_left; ///< Upper left corner of the bounding box.
89
+ struct SUPoint2D lower_right; ///< Lower right corner of the bounding box.
90
+ };
91
+
92
+ /**
93
+ @struct SURay3D
94
+ @brief Represents a 3D ray defined by a point and normal vector.
95
+ @since SketchUp 2018, API 6.0
96
+ */
97
+ struct SURay3D {
98
+ struct SUPoint3D point; ///< Origin of the ray.
99
+ struct SUVector3D normal; ///< Direction of the ray.
100
+ };
101
+
102
+ /**
103
+ @struct SUTransformation
104
+ @brief Represents a 3D (4x4) geometric transformation matrix.
105
+
106
+ Matrix values are in column-major order.
107
+ The transformation is stored as:
108
+
109
+ @code{.txt}
110
+ - -
111
+ | R T |
112
+ M = | 0 w |
113
+ - -
114
+ @endcode
115
+
116
+ where:
117
+ <ul>
118
+ <li> M is a 4x4 matrix
119
+ <li> R is a 3x3 sub-matrix. It is the rotation part
120
+ <li> T is a 3x1 sub-matrix. It is the translation part
121
+ <li> w is a scalar. It is 1/scale.
122
+ </ul>
123
+ */
124
+ struct SUTransformation {
125
+ double values[16]; ///< Matrix values in column-major order.
126
+ };
127
+
128
+ /**
129
+ @struct SUTransformation2D
130
+ @brief Represents a 2D (2x3) affine transformation matrix. The matrix
131
+ is stored in column-major format:
132
+ <pre>
133
+ m11 m21 tx
134
+ m12 m22 ty
135
+ </pre>
136
+ */
137
+ struct SUTransformation2D {
138
+ double m11; ///< the m11 component
139
+ double m12; ///< the m12 component
140
+ double m21; ///< the m21 component
141
+ double m22; ///< the m22 component
142
+ double tx; ///< the tx component
143
+ double ty; ///< the ty component
144
+ };
145
+
146
+ #ifdef __cplusplus
147
+ } // end extern "C"
148
+ #endif // __cplusplus
149
+
150
+ #pragma pack(pop)
151
+
152
+ #endif // SKETCHUP_GEOMETRY_H_