Hide menu
Loading...
Searching...
No Matches

Defines an occurrence of an assembly or a part in a scene graph. More...

Inheritance diagram for cadex.ModelData.Instance:
cadex.ModelData.ModelElement cadex.BaseObject

Public Member Functions

 Instance (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 Instance (cadex.BaseObject.Initialized arg0)
 
 Instance (cadex.UTF16String theName)
 Constructor.
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.UTF16String theName)
 Constructor.
 
 Instance (cadex.ModelData.ModelElement theElement)
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.Geom.Transformation theTransformation, cadex.UTF16String theName)
 Constructor.
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.Geom.Transformation theTransformation)
 
void SetReference (cadex.ModelData.ModelElement theElement)
 Sets a referenced object.
 
cadex.ModelData.ModelElement Reference ()
 Returns the referenced object.
 
void SetTransformation (cadex.Geom.Transformation theTrsf)
 Sets transformation matrix.
 
bool HasTransformation ()
 Returns true if the instance has an explicitly attached transformation matrix.
 
cadex.Geom.Transformation Transformation ()
 Returns the transformation matrix.
 
- Public Member Functions inherited from cadex.ModelData.ModelElement
 ModelElement (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void SetName (cadex.UTF16String theName)
 Sets a name.
 
cadex.UTF16String Name ()
 Returns a name.
 
void SetUuid (System.Guid theUuid)
 Sets an object uuid.
 
System.Guid Uuid ()
 Returns an object uuid.
 
void SetPMI (cadex.PMI.Data thePMI)
 Sets the object PMI.
 
cadex.PMI.Data PMI ()
 Returns the object PMI.
 
void Accept (cadex.ModelData.ModelElementVisitor theVisitor)
 Accepts an element visitor.
 
- 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 new bool CompareType (cadex.BaseObject theObject)
 Returns true if theObject is an instance.
 
static cadex.ModelData.Instance Cast (cadex.ModelData.ModelElement theBase)
 
- Static Public Member Functions inherited from cadex.ModelData.ModelElement
static bool CompareType (cadex.BaseObject theObject)
 Returns true if theObject is a model element.
 
static cadex.ModelData.ModelElement Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from cadex.ModelData.ModelElement
override void Dispose (bool disposing)
 

Detailed Description

Defines an occurrence of an assembly or a part in a scene graph.

Instance contains a reference to another element part or assembly and is used to share data, e.g. two instances can share the same part while adding their own transformations.

Examples
exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/pmi/Program.cs, and exploring/pmi/main.cxx.

Constructor & Destructor Documentation

◆ Instance() [1/3]

cadex.ModelData.Instance.Instance ( cadex.UTF16String theName)
inline

Constructor.

Creates an instance with the specified name.

◆ Instance() [2/3]

cadex.ModelData.Instance.Instance ( cadex.ModelData.ModelElement theElement,
cadex.UTF16String theName )
inline

Constructor.

Creates an instance referencing theElement with the provided name. If theElement is null (IsNull()), no reference is set.

◆ Instance() [3/3]

cadex.ModelData.Instance.Instance ( cadex.ModelData.ModelElement theElement,
cadex.Geom.Transformation theTransformation,
cadex.UTF16String theName )
inline

Constructor.

Creates an instance referencing theElement with the provided name and transformation. If theElement is null (IsNull()), no reference is set.

Member Function Documentation

◆ Dispose()

override void cadex.ModelData.Instance.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ HasTransformation()

bool cadex.ModelData.Instance.HasTransformation ( )
inline

Returns true if the instance has an explicitly attached transformation matrix.

Returns true if the matrix has been assigned with SetTransformation() and false otherwise.

See also
SetTransformation(), Transformation().

◆ Reference()

cadex.ModelData.ModelElement cadex.ModelData.Instance.Reference ( )
inline

Returns the referenced object.

Returns null if the instance does not refer to any object.

See also
SetReference().

◆ Transformation()

cadex.Geom.Transformation cadex.ModelData.Instance.Transformation ( )
inline

Returns the transformation matrix.

If the matrix has not been explicitly assigned with SetTransformation() then creates and explicitly assigns an identity matrix.

See also
HasTransformation(), SetTransformation().