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)
 Creates an instance with the specified name.
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.UTF16String theName)
 Creates an instance referencing theElement with the provided name.
 
 Instance (cadex.ModelData.ModelElement theElement)
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.Geom.Transformation theTransformation, cadex.UTF16String theName)
 Creates an instance referencing theElement with the provided name and transformation.
 
 Instance (cadex.ModelData.ModelElement theElement, cadex.Geom.Transformation theTransformation)
 
void SetReference (cadex.ModelData.ModelElement theElement)
 Sets a referenced object.
 
cadex.ModelData.ModelElement Reference ()
 Returns null if the instance does not refer to any object.
 
void SetTransformation (cadex.Geom.Transformation theTrsf)
 Sets transformation matrix.
 
bool HasTransformation ()
 Returns true if the matrix has been assigned with SetTransformation() and false otherwise.
 
cadex.Geom.Transformation Transformation ()
 If the matrix has not been explicitly assigned with SetTransformation() then creates and explicitly assigns an identity matrix.
 
- Public Member Functions inherited from cadex.ModelData.ModelElement
 ModelElement (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void SetName (cadex.UTF16String theName)
 Accepts a string as a unicode string.
 
cadex.UTF16String Name ()
 Returns empty string if the model element has no name (by default).
 
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)
 The order of visiting depends on the type of this object:
 
- 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

Creates an instance with the specified name.

Constructor.

◆ Instance() [2/3]

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

Creates an instance referencing theElement with the provided name.

If theElement is null (IsNull()), no reference is set. Constructor.

◆ Instance() [3/3]

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

Creates an instance referencing theElement with the provided name and transformation.

If theElement is null (IsNull()), no reference is set. Constructor.

Member Function Documentation

◆ CompareType()

static new bool cadex.ModelData.Instance.CompareType ( cadex.BaseObject theObject)
inlinestatic

Returns true if theObject is an instance.

Examples
exploring/bom/Program.cs.

◆ 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 matrix has been assigned with SetTransformation() and false otherwise.

See also
SetTransformation(), Transformation(). Returns true if the instance has an explicitly attached transformation matrix.

◆ Reference()

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

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

See also
SetReference(). Returns the referenced object.

◆ SetReference()

void cadex.ModelData.Instance.SetReference ( cadex.ModelData.ModelElement theElement)
inline

Sets a referenced object.

◆ SetTransformation()

void cadex.ModelData.Instance.SetTransformation ( cadex.Geom.Transformation theTrsf)
inline

Sets transformation matrix.

◆ Transformation()

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

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

See also
HasTransformation(), SetTransformation(). Returns the transformation matrix.