Provides MTK data model. More...
Public Types | |
| enum | FileFormatType { MTK , MTKWEB } |
| Defines supported formats for export. | |
Public Member Functions | |
| Model (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| Model () | |
| Constructor. | |
| Model (cadex.UTF16String theName) | |
| Constructor. | |
| void | SetName (cadex.UTF16String theName) |
| Sets a model name. | |
| cadex.UTF16String | Name () |
| Returns a model name. | |
| bool | IsEmpty () |
| Returns true if the model is empty. | |
| void | Clear () |
| Clears the model contents. | |
| void | AddRoot (cadex.ModelData.ModelElement theElement) |
| Adds a root element to the model. | |
| cadex.Collections.ModelElementList | Roots () |
| Returns root elements of the model. | |
| uint | NumberOfRoots () |
| Returns the number of root elements in the model. | |
| void | SetDrawing (cadex.Drawing.Drawing theDrawing) |
| cadex.Drawing.Drawing | Drawing () |
| void | Merge (cadex.ModelData.Model theModel) |
| Adds roots from another model to current. | |
| void | AssignUuids () |
| Assigns uuid's (persistent id's) to scene graph elements and part representations (if not assigned yet). | |
| void | Accept (cadex.ModelData.ModelElementVisitor theVisitor) |
| Accepts a visitor. | |
| bool | Open (cadex.UTF16String theFileName, bool theToAppend, cadex.ProgressStatus theProgressStatus) |
| bool | Open (cadex.UTF16String theFileName, bool theToAppend) |
| bool | Open (cadex.UTF16String theFileName) |
| bool | Save (cadex.UTF16String theFileName, cadex.ProgressStatus theProgressStatus) |
| bool | Save (cadex.UTF16String theFileName) |
| bool | Save (cadex.UTF16String theFileName, cadex.ModelData.Model.FileFormatType theFormat, cadex.ProgressStatus theProgressStatus) |
| bool | Save (cadex.UTF16String theFileName, cadex.ModelData.Model.FileFormatType theFormat) |
Public Member Functions inherited from cadex.BaseObject | |
| BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| bool | IsNull () |
| ulong | Id () |
| Return unique identifier of public object. | |
| bool | IsEqual (cadex.BaseObject theObj) |
| override int | GetHashCode () |
| override bool | Equals (System.Object o) |
Static Public Member Functions | |
| static cadex.ModelData.Model | Cast (cadex.BaseObject theBase) |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Provides MTK data model.
The model encapsulates a scene graph (hierarchy of assemblies and parts) and is thus an entry point to the entire 3D model data.
A model contains a shared pointer to its internal implementation, so simple copying an object will just copy a shared pointer:
|
inline |
Constructor.
Creates an empty model. IsEmpty() returns true.
|
inline |
Constructor.
Creates an empty model with a name. IsEmpty() returns true.
|
inline |
Adds a root element to the model.
This function adds theElement as a root element in the model. If the passed element is an instance of ModelData.Instance, it will be automatically nested in ModelData.Assembly.
|
inline |
Clears the model contents.
Detaches the model contents. Only cleans up contents of this object. Other copies of this object will remain unaffected. For instance, in the following code
the aM2 object will continue to have entire previous contents. Respectively, all previous pointers (e.g. to objects of BaseObject subclasses) remain valid.
|
inlineprotectedvirtual |
Reimplemented from cadex.BaseObject.
|
inline |
Returns true if the model is empty.
Returns true if the model has no roots, i.e. NumberOfRoots() returns 0.
|
inline |
Returns a model name.
Returns empty string if the model has no name (by default).
|
inline |
|
inline |
Returns root elements of the model.
This function returns the root elements of the model as a std.vector.
|
inline |
Sets a model name.
Accepts a string as a unicode string.