35 #include <SketchUpAPI/model/model.h> 42 class Classifications;
43 class ComponentDefinition;
46 class AttributeDictionary;
50 class RenderingOptions;
59 bool m_release_on_destroy;
61 SUResult m_result = SU_ERROR_NONE;
63 static SUModelRef create_model();
67 Model(SUModelRef model_ref,
bool release_on_destroy =
true);
68 Model(std::string file_path);
81 SUModelRef
ref()
const;
86 operator SUModelRef()
const;
87 operator SUModelRef*();
92 operator bool()
const;
109 Layer active_layer()
const;
126 bool add_definitions(std::vector<ComponentDefinition>& definitions);
132 std::vector<AttributeDictionary> attribute_dictionaries()
const;
153 Classifications classifications()
const;
166 std::vector<ComponentDefinition> definitions()
const;
172 std::vector<ComponentDefinition> group_definitions()
const;
202 TypedValue get_attribute(
const std::string& dict_name,
const std::string& key,
const TypedValue& default_value)
const;
213 std::vector<Layer> layers()
const;
238 std::vector<Material> materials()
const;
263 bool name(
const String& name_string);
268 size_t num_faces()
const;
294 SUResult save(
const std::string& file_path);
302 bool save_with_version(
const std::string& file_path, SUModelVersion version);
319 bool set_attribute(
const std::string& dict_name,
const std::string& key,
const TypedValue& value);
347 SUModelStatistics m_model_statistics;
358 int instances()
const;
361 int definitions()
const;
363 int materials()
const;
void add_layers(std::vector< Layer > &layers)
std::string version_string() const
bool layer_exists(const Layer &layer) const
void add_materials(std::vector< Material > &materials)
InstancePath instance_path(const String &persistent_id) const
Model & operator=(const Model &other)
RenderingOptions rendering_options()
RenderingOptions.
bool material_exists(const Material &material) const
bool add_definition(ComponentDefinition &definition)