SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
model.h
Go to the documentation of this file.
1 // Copyright 2013 Trimble Navigation Ltd. All Rights Reserved.
2 
3 #ifndef SLAPI_MODEL_MODEL_H_
4 #define SLAPI_MODEL_MODEL_H_
5 
6 #include <slapi/slapi.h>
7 #include <slapi/unicodestring.h>
8 #include <slapi/model/defs.h>
9 
10 #pragma pack(push, 8)
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
30  enum SUEntityType {
40  };
42 };
43 
54 };
55 
65 SU_RESULT SUModelCreate(SUModelRef* model);
66 
79 SU_RESULT SUModelCreateFromFile(SUModelRef* model, const char* file_path);
80 
91 SU_RESULT SUModelRelease(SUModelRef* model);
92 
102 SU_RESULT SUModelGetEntities(SUModelRef model,
103  SUEntitiesRef* entities);
104 
114 SU_RESULT SUModelGetNumMaterials(SUModelRef model, size_t* count);
115 
127 SU_RESULT SUModelGetMaterials(SUModelRef model, size_t len,
128  SUMaterialRef materials[], size_t* count);
129 
140 SU_RESULT SUModelAddMaterials(SUModelRef model, size_t len,
141  const SUMaterialRef materials[]);
142 
153  size_t* count);
154 
166 SU_RESULT SUModelGetComponentDefinitions(SUModelRef model, size_t len,
167  SUComponentDefinitionRef components[],
168  size_t* count);
169 
180 SU_RESULT SUModelAddComponentDefinitions(SUModelRef model, size_t len,
181  const SUComponentDefinitionRef components[]);
182 
194 SU_RESULT SUModelSaveToFile(SUModelRef model, const char* file_path);
195 
205 SU_RESULT SUModelGetCamera(SUModelRef model, SUCameraRef* camera);
206 
216 SU_RESULT SUModelGetNumScenes(SUModelRef model, size_t* num_scenes);
217 
227 SU_RESULT SUModelGetNumLayers(SUModelRef model, size_t* count);
228 
240 SU_RESULT SUModelGetLayers(SUModelRef model, size_t len,
241  SULayerRef layers[], size_t* count);
242 
253 SU_RESULT SUModelAddLayers(SUModelRef model, size_t len,
254  const SULayerRef layers[]);
255 
265 SU_RESULT SUModelGetDefaultLayer(SUModelRef model, SULayerRef* layer);
266 
279 SU_RESULT SUModelGetVersion(SUModelRef model, int* major, int* minor,
280  int* build);
281 
292  size_t* count);
293 
306  SUModelRef model,
307  size_t len,
308  SUAttributeDictionaryRef dictionaries[],
309  size_t* count);
310 
325 SU_RESULT SUModelGetAttributeDictionary(SUModelRef model, const char* name,
326  SUAttributeDictionaryRef* dictionary);
327 
337 SU_RESULT SUModelGetLocation(SUModelRef model,
338  SULocationRef* location);
339 
350 SU_RESULT SUModelGetStatistics(SUModelRef model,
351  struct SUModelStatistics* statistics);
352 
367 SU_RESULT SUModelSetGeoReference(SUModelRef model, double latitude,
368  double longitude, double altitude,
369  bool is_z_value_centered,
370  bool is_on_ocean_floor);
371 
384 SU_RESULT SUModelGetRenderingOptions(SUModelRef model,
385  SURenderingOptionsRef* rendering_options);
386 
396 SU_RESULT SUModelGetOptionsManager(SUModelRef model,
397  SUOptionsManagerRef* options_manager);
398 
409 SU_RESULT SUModelGetNorthCorrection(SUModelRef model,
410  double* north_correction);
411 
419 SU_RESULT SUModelMergeCoplanarFaces(SUModelRef model);
420 
435 SU_RESULT SUModelGetScenes(SUModelRef model, size_t len,
436  SUSceneRef scenes[], size_t* count);
437 
448 SU_RESULT SUModelAddScenes(SUModelRef model, size_t len,
449  const SUSceneRef scenes[]);
450 
462 SU_RESULT SUModelGetName(SUModelRef model, SUStringRef* name);
463 
473 SU_RESULT SUModelSetName(SUModelRef model, const char* name);
474 
484 SU_RESULT SUModelGetUnits(SUModelRef model, enum SUModelUnits* units);
485 
486 #ifdef __cplusplus
487 }
488 #endif
489 
490 #pragma pack(pop)
491 
492 #endif // SLAPI_MODEL_MODEL_H_