MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.Object Class Reference
+ Inheritance diagram for meshlib.mrmeshpy.Object:

Public Member Functions

None __init__ (self)
 
bool addChild (self, Object child, bool recognizedChild=True)
 
bool addChildBefore (self, Object newChild, Object existingChild)
 
None applyScale (self, float scaleFactor)
 
VisualObject asType_VisualObject (self)
 
VisualObject asType_VisualObject (self)
 
std_vector_std_shared_ptr_Object children (self)
 
std_vector_std_shared_ptr_Object_const children (self)
 
Object clone (self)
 
Object cloneTree (self)
 
bool detachFromParent (self)
 
Object find (self, str name)
 
Object find (self, str name)
 
Object findCommonAncestor (self, Object other)
 
Object findCommonAncestor (self, Object other)
 
str getClassName (self)
 
std_vector_std_string getInfoLines (self)
 
bool globalVisibility (self, ViewportMask viewportMask='ViewportMask::any()')
 
ViewportMask globalVisibilityMask (self)
 
bool hasModel (self)
 
bool hasVisualRepresentation (self)
 
int heapBytes (self)
 
bool isAncestor (self, Object ancestor)
 
bool isAncillary (self)
 
bool isLocked (self)
 
bool isParentLocked (self)
 
bool isSelected (self)
 
bool isVisible (self, ViewportMask viewportMask='ViewportMask::any()')
 
str name (self)
 
Object parent (self)
 
Object parent (self)
 
None removeAllChildren (self)
 
bool removeChild (self, Object child)
 
bool removeChild (self, Object child)
 
None resetRedrawFlag (self)
 
None resetXf (self, ViewportId id='MR::ViewportId{}')
 
bool select (self, bool on)
 
None setAncillary (self, bool ancillary)
 
None setGlobalVisibility (self, bool on, ViewportMask viewportMask='ViewportMask::any()')
 
None setLocked (self, bool on)
 
None setName (self, str name)
 
None setParentLocked (self, bool lock)
 
None setVisibilityMask (self, ViewportMask viewportMask)
 
None setVisible (self, bool on, ViewportMask viewportMask='ViewportMask::all()')
 
None setWorldXf (self, AffineXf3f xf, ViewportId id='MR::ViewportId{}')
 
None setXf (self, AffineXf3f xf, ViewportId id='MR::ViewportId{}')
 
None setXfsForAllViewports (self, ViewportProperty_AffineXf3f xf)
 
Object shallowClone (self)
 
Object shallowCloneTree (self)
 
None sortChildren (self)
 
None swap (self, Object other)
 
str typeName (self)
 
ViewportMask visibilityMask (self)
 
AffineXf3f worldXf (self, ViewportId id='MR::ViewportId{}', bool_output isDef=None)
 
AffineXf3f xf (self, ViewportId id='MR::ViewportId{}', bool_output isDef=None)
 
ViewportProperty_AffineXf3f xfsForAllViewports (self)
 
- Public Member Functions inherited from meshlib.mrmeshpy.ObjectChildrenHolder
Object getSharedPtr (self)
 

Static Public Member Functions

str TypeName ()
 
bool getRedrawFlag (*args, **kwargs)
 
Box3f getWorldBox (*args, **kwargs)
 
Box3f getWorldTreeBox (*args, **kwargs)
 

Additional Inherited Members

- Static Protected Member Functions inherited from meshlib.mrmeshpy.ObjectChildrenHolder
ObjectChildrenHolder _Equal (*args, **kwargs)
 
ObjectChildrenHolder _Equal (*args, **kwargs)
 

Detailed Description

Generated from:  MR::Object
Aliases:  ChangeObjectVisibilityAction.Obj, ObjectPtr, ChangeObjectSelectedAction.Obj

named object in the data model

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ addChild()

bool meshlib.mrmeshpy.Object.addChild ( self,
Object child,
bool recognizedChild = True )
adds given object at the end of children (recognized or not);
returns false if it was already child of this, of if given pointer is empty;
child object will always report this as parent after the call;
\\param recognizedChild if set to false then child object will be excluded from children() and it will be stored by weak_ptr

◆ addChildBefore()

bool meshlib.mrmeshpy.Object.addChildBefore ( self,
Object newChild,
Object existingChild )
adds given object in the recognized children before existingChild;
if newChild was already among this children then moves it just before existingChild keeping the order of other children intact;
returns false if newChild is nullptr, or existingChild is not a child of this

◆ applyScale()

None meshlib.mrmeshpy.Object.applyScale ( self,
float scaleFactor )

◆ asType_VisualObject() [1/2]

VisualObject meshlib.mrmeshpy.Object.asType_VisualObject ( self)

◆ asType_VisualObject() [2/2]

VisualObject meshlib.mrmeshpy.Object.asType_VisualObject ( self)

◆ children() [1/2]

std_vector_std_shared_ptr_Object meshlib.mrmeshpy.Object.children ( self)
an object can hold other sub-objects

◆ children() [2/2]

std_vector_std_shared_ptr_Object_const meshlib.mrmeshpy.Object.children ( self)

◆ clone()

◆ cloneTree()

Object meshlib.mrmeshpy.Object.cloneTree ( self)
clones all tree of this object (except ancillary and unrecognized children)

◆ detachFromParent()

bool meshlib.mrmeshpy.Object.detachFromParent ( self)
removes this from its parent children list
returns false if it was already orphan

◆ find() [1/2]

Object meshlib.mrmeshpy.Object.find ( self,
str name )
finds a direct child by name

◆ find() [2/2]

Object meshlib.mrmeshpy.Object.find ( self,
str name )

◆ findCommonAncestor() [1/2]

Object meshlib.mrmeshpy.Object.findCommonAncestor ( self,
Object other )
Find a common ancestor between this object and the other one.
Returns null on failure (which is impossible if both are children of the scene root).
Will return `this` if `other` matches `this`.

◆ findCommonAncestor() [2/2]

Object meshlib.mrmeshpy.Object.findCommonAncestor ( self,
Object other )

◆ getClassName()

◆ getInfoLines()

◆ getRedrawFlag()

bool meshlib.mrmeshpy.Object.getRedrawFlag ( * args,
** kwargs )
static
this method virtual because others data model types could have dirty flags or something

Reimplemented in meshlib.mrmeshpy.ObjectMeshHolder, and meshlib.mrmeshpy.VisualObject.

◆ getWorldBox()

Box3f meshlib.mrmeshpy.Object.getWorldBox ( * args,
** kwargs )
static
returns bounding box of this object in world coordinates for default or specific viewport

Reimplemented in meshlib.mrmeshpy.ObjectLabel, meshlib.mrmeshpy.ObjectLinesHolder, meshlib.mrmeshpy.ObjectMeshHolder, meshlib.mrmeshpy.ObjectPointsHolder, and meshlib.mrmeshpy.VisualObject.

◆ getWorldTreeBox()

Box3f meshlib.mrmeshpy.Object.getWorldTreeBox ( * args,
** kwargs )
static
empty box
returns bounding box of this object and all children visible in given (or default) viewport in world coordinates

◆ globalVisibility()

bool meshlib.mrmeshpy.Object.globalVisibility ( self,
ViewportMask viewportMask = 'ViewportMask::any()' )
returns true if this object is visible together with all its parents in any of given viewports

◆ globalVisibilityMask()

ViewportMask meshlib.mrmeshpy.Object.globalVisibilityMask ( self)
returns all viewports where this object is visible together with all its parents

◆ hasModel()

bool meshlib.mrmeshpy.Object.hasModel ( self)
does the object have any model available (but possibly empty),
e.g. ObjectMesh has valid mesh() or ObjectPoints has valid pointCloud()

Reimplemented in meshlib.mrmeshpy.ObjectDistanceMap, meshlib.mrmeshpy.ObjectLinesHolder, meshlib.mrmeshpy.ObjectMeshHolder, meshlib.mrmeshpy.ObjectPointsHolder, and meshlib.mrmeshpy.ObjectVoxels.

◆ hasVisualRepresentation()

bool meshlib.mrmeshpy.Object.hasVisualRepresentation ( self)
does the object have any visual representation (visible points, triangles, edges, etc.), no considering child objects

Reimplemented in meshlib.mrmeshpy.ObjectLabel, meshlib.mrmeshpy.ObjectLinesHolder, meshlib.mrmeshpy.ObjectMeshHolder, meshlib.mrmeshpy.ObjectPointsHolder, and meshlib.mrmeshpy.ObjectVoxels.

◆ heapBytes()

◆ isAncestor()

bool meshlib.mrmeshpy.Object.isAncestor ( self,
Object ancestor )
return true if given object is ancestor of this one, false otherwise

◆ isAncillary()

bool meshlib.mrmeshpy.Object.isAncillary ( self)

◆ isLocked()

bool meshlib.mrmeshpy.Object.isLocked ( self)
object properties lock for UI

◆ isParentLocked()

bool meshlib.mrmeshpy.Object.isParentLocked ( self)
If true, the scene tree GUI doesn't allow you to drag'n'drop this object into a different parent.
Defaults to false.

◆ isSelected()

bool meshlib.mrmeshpy.Object.isSelected ( self)

◆ isVisible()

bool meshlib.mrmeshpy.Object.isVisible ( self,
ViewportMask viewportMask = 'ViewportMask::any()' )
checks whether the object is visible in any of the viewports specified by the mask (by default in any viewport)

◆ name()

str meshlib.mrmeshpy.Object.name ( self)

◆ parent() [1/2]

Object meshlib.mrmeshpy.Object.parent ( self)
returns parent object in the tree

◆ parent() [2/2]

Object meshlib.mrmeshpy.Object.parent ( self)

◆ removeAllChildren()

None meshlib.mrmeshpy.Object.removeAllChildren ( self)
detaches all recognized children from this, keeping all unrecognized ones

◆ removeChild() [1/2]

bool meshlib.mrmeshpy.Object.removeChild ( self,
Object child )
returns false if it was not child of this

◆ removeChild() [2/2]

bool meshlib.mrmeshpy.Object.removeChild ( self,
Object child )

◆ resetRedrawFlag()

None meshlib.mrmeshpy.Object.resetRedrawFlag ( self)

◆ resetXf()

None meshlib.mrmeshpy.Object.resetXf ( self,
ViewportId id = 'MR::ViewportId{}' )
forgets specific transform in given viewport (or forgets all specific transforms for {} input)

Reimplemented in meshlib.mrmeshpy.FeatureObject.

◆ select()

bool meshlib.mrmeshpy.Object.select ( self,
bool on )
selects the object, returns true if value changed, otherwise returns false

Reimplemented in meshlib.mrmeshpy.ObjectGcode, and meshlib.mrmeshpy.SceneRootObject.

◆ setAncillary()

None meshlib.mrmeshpy.Object.setAncillary ( self,
bool ancillary )
ancillary object is an object hidden (in scene menu) from a regular user
such objects cannot be selected, and if it has been selected, it is unselected when turn ancillary

Reimplemented in meshlib.mrmeshpy.SceneRootObject.

◆ setGlobalVisibility()

None meshlib.mrmeshpy.Object.setGlobalVisibility ( self,
bool on,
ViewportMask viewportMask = 'ViewportMask::any()' )
if true sets all predecessors visible, otherwise sets this object invisible

◆ setLocked()

None meshlib.mrmeshpy.Object.setLocked ( self,
bool on )

◆ setName()

None meshlib.mrmeshpy.Object.setName ( self,
str name )

◆ setParentLocked()

None meshlib.mrmeshpy.Object.setParentLocked ( self,
bool lock )

◆ setVisibilityMask()

None meshlib.mrmeshpy.Object.setVisibilityMask ( self,
ViewportMask viewportMask )
specifies object visibility as bitmask of viewports

◆ setVisible()

None meshlib.mrmeshpy.Object.setVisible ( self,
bool on,
ViewportMask viewportMask = 'ViewportMask::all()' )
sets the object visible in the viewports specified by the mask (by default in all viewports)

◆ setWorldXf()

None meshlib.mrmeshpy.Object.setWorldXf ( self,
AffineXf3f xf,
ViewportId id = 'MR::ViewportId{}' )

◆ setXf()

None meshlib.mrmeshpy.Object.setXf ( self,
AffineXf3f xf,
ViewportId id = 'MR::ViewportId{}' )

Reimplemented in meshlib.mrmeshpy.FeatureObject.

◆ setXfsForAllViewports()

None meshlib.mrmeshpy.Object.setXfsForAllViewports ( self,
ViewportProperty_AffineXf3f xf )
modifies xfs for all viewports at once

◆ shallowClone()

◆ shallowCloneTree()

Object meshlib.mrmeshpy.Object.shallowCloneTree ( self)
clones all tree of this object (except ancillary and unrecognied children)
clones only pointers to mesh, points or voxels

◆ sortChildren()

None meshlib.mrmeshpy.Object.sortChildren ( self)
sort recognized children by name

◆ swap()

None meshlib.mrmeshpy.Object.swap ( self,
Object other )
swaps this object with other
note: do not swap object signals, so listeners will get notifications from swapped object
requires implementation of `swapBase_` and `swapSignals_` (if type has signals)

◆ TypeName()

◆ typeName()

◆ visibilityMask()

ViewportMask meshlib.mrmeshpy.Object.visibilityMask ( self)
gets object visibility as bitmask of viewports

◆ worldXf()

AffineXf3f meshlib.mrmeshpy.Object.worldXf ( self,
ViewportId id = 'MR::ViewportId{}',
bool_output isDef = None )
this space to world space transformation for default or specific viewport
\\param isDef receives true if the object has default transformation in this viewport (same as worldXf() returns)

◆ xf()

AffineXf3f meshlib.mrmeshpy.Object.xf ( self,
ViewportId id = 'MR::ViewportId{}',
bool_output isDef = None )
this space to parent space transformation (to world space if no parent) for default or given viewport
\\param isDef receives true if the object has default transformation in this viewport (same as xf() returns)

◆ xfsForAllViewports()

ViewportProperty_AffineXf3f meshlib.mrmeshpy.Object.xfsForAllViewports ( self)
returns xfs for all viewports, combined into a single object

The documentation for this class was generated from the following file: