MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Object Class Reference
+ Inheritance diagram for 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)
 
str getClassNameInPlural (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='{}')
 
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='{}')
 
None setXf (self, AffineXf3f xf, ViewportId id='{}')
 
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='{}', bool_output isDef=None)
 
AffineXf3f xf (self, ViewportId id='{}', bool_output isDef=None)
 
ViewportProperty_AffineXf3f xfsForAllViewports (self)
 
- Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
Object getSharedPtr (self)
 

Static Public Member Functions

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

Static Protected Member Functions

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

Detailed Description

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

named object in the data model

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ _pybind11_conduit_v1_()

◆ addChild()

bool 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 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 mrmeshpy.Object.applyScale ( self,
float scaleFactor )

◆ asType_VisualObject() [1/2]

VisualObject mrmeshpy.Object.asType_VisualObject ( self)

◆ asType_VisualObject() [2/2]

VisualObject mrmeshpy.Object.asType_VisualObject ( self)

◆ children() [1/2]

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

◆ children() [2/2]

std_vector_std_shared_ptr_Object_const mrmeshpy.Object.children ( self)

◆ clone()

◆ cloneTree()

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

◆ detachFromParent()

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

◆ find() [1/2]

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

◆ find() [2/2]

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

◆ findCommonAncestor() [1/2]

Object 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 mrmeshpy.Object.findCommonAncestor ( self,
Object other )

◆ getClassName()

◆ getClassNameInPlural()

◆ getInfoLines()

◆ getRedrawFlag()

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

Reimplemented in mrmeshpy.ObjectMeshHolder, and mrmeshpy.VisualObject.

◆ getWorldBox()

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

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

◆ getWorldTreeBox()

Box3f 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 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 mrmeshpy.Object.globalVisibilityMask ( self)
returns all viewports where this object is visible together with all its parents

◆ hasModel()

bool 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 mrmeshpy.ObjectDistanceMap, mrmeshpy.ObjectLinesHolder, mrmeshpy.ObjectMeshHolder, mrmeshpy.ObjectPointsHolder, and mrmeshpy.ObjectVoxels.

◆ hasVisualRepresentation()

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

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

◆ heapBytes()

int mrmeshpy.Object.heapBytes ( self)

◆ isAncestor()

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

◆ isAncillary()

bool mrmeshpy.Object.isAncillary ( self)

◆ isLocked()

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

◆ isParentLocked()

bool 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 mrmeshpy.Object.isSelected ( self)

◆ isVisible()

bool 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 mrmeshpy.Object.name ( self)

◆ parent() [1/2]

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

◆ parent() [2/2]

Object mrmeshpy.Object.parent ( self)

◆ removeAllChildren()

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

◆ removeChild() [1/2]

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

◆ removeChild() [2/2]

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

◆ resetRedrawFlag()

None mrmeshpy.Object.resetRedrawFlag ( self)

◆ resetXf()

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

Reimplemented in mrmeshpy.FeatureObject.

◆ select()

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

Reimplemented in mrmeshpy.ObjectGcode, and mrmeshpy.SceneRootObject.

◆ setAncillary()

None 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 mrmeshpy.SceneRootObject.

◆ setGlobalVisibility()

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

◆ setLocked()

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

◆ setName()

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

Reimplemented in mrmeshpy.SceneRootObject.

◆ setParentLocked()

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

◆ setVisibilityMask()

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

◆ setVisible()

None 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 mrmeshpy.Object.setWorldXf ( self,
AffineXf3f xf,
ViewportId id = '{}' )

◆ setXf()

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

Reimplemented in mrmeshpy.FeatureObject.

◆ setXfsForAllViewports()

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

◆ shallowClone()

◆ shallowCloneTree()

Object 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 mrmeshpy.Object.sortChildren ( self)
sort recognized children by name

◆ swap()

None 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 mrmeshpy.Object.visibilityMask ( self)
gets object visibility as bitmask of viewports

◆ worldXf()

AffineXf3f mrmeshpy.Object.worldXf ( self,
ViewportId id = '{}',
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 mrmeshpy.Object.xf ( self,
ViewportId id = '{}',
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 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: