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

Public Member Functions

None __init__ (self)
 
Object clone (self)
 
None copyColors (self, VisualObject src, VertMap thisToSrc, FaceMap thisToSrcFaces='MR::FaceMap{}')
 
std_vector_ViewportMask getAllVisualizeProperties (self)
 
float getAmbientStrength (self)
 
Color getBackColor (self, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_Color getBackColorsForAllViewports (self)
 
Box3f getBoundingBox (self)
 
str getClassName (self)
 
ColoringType getColoringType (self)
 
int getDirtyFlags (self)
 
Color getFrontColor (self, bool selected=True, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_Color getFrontColorsForAllViewports (self, bool selected=True)
 
int getGlobalAlpha (self, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_unsigned_char getGlobalAlphaForAllViewports (self)
 
std_vector_std_string getInfoLines (self)
 
std_vector_PositionedText getLabels (self)
 
Color getLabelsColor (self, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_Color getLabelsColorsForAllViewports (self)
 
bool getRedrawFlag (self, ViewportMask viewportMask)
 
float getShininess (self)
 
float getSpecularStrength (self)
 
VertColors getVertsColorMap (self)
 
bool getVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
ViewportMask getVisualizePropertyMask (self, AnyVisualizeMaskEnum type)
 
int heapBytes (self)
 
bool isPickable (self, ViewportMask viewportMask='ViewportMask::any()')
 
None renderUi (self, UiRenderParams params)
 
None resetDirty (self)
 
None setAllVisualizeProperties (self, std_vector_ViewportMask properties)
 
None setAmbientStrength (self, float ambientStrength)
 
None setBackColor (self, Color color, ViewportId viewportId='MR::ViewportId{}')
 
None setBackColorsForAllViewports (self, ViewportProperty_Color val)
 
None setColoringType (self, ColoringType coloringType)
 
None setDirtyFlags (self, int mask, bool invalidateCaches=True)
 
None setFrontColor (self, Color color, bool selected, ViewportId viewportId='MR::ViewportId{}')
 
None setFrontColorsForAllViewports (self, ViewportProperty_Color val, bool selected=True)
 
None setGlobalAlpha (self, int alpha, ViewportId viewportId='MR::ViewportId{}')
 
None setGlobalAlphaForAllViewports (self, ViewportProperty_unsigned_char val)
 
None setLabels (self, std_vector_PositionedText labels)
 
None setLabelsColor (self, Color color, ViewportId viewportId='MR::ViewportId{}')
 
None setLabelsColorsForAllViewports (self, ViewportProperty_Color val)
 
None setPickable (self, bool on, ViewportMask viewportMask='ViewportMask::all()')
 
None setShininess (self, float shininess)
 
None setSpecularStrength (self, float specularStrength)
 
None setUseDefaultScenePropertiesOnDeserialization (self, bool useDefaultScenePropertiesOnDeserialization)
 
None setVertsColorMap (self, VertColors vertsColorMap)
 
None setVisualizeProperty (self, bool value, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
None setVisualizePropertyMask (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
Object shallowClone (self)
 
None showLabels (self, bool on)
 
bool showLabels (self)
 
None showName (self, bool on)
 
bool showName (self)
 
bool supportsVisualizeProperty (self, AnyVisualizeMaskEnum type)
 
None toggleVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
str typeName (self)
 
None updateVertsColorMap (self, VertColors vertsColorMap)
 
bool useDefaultScenePropertiesOnDeserialization (self)
 
- Public Member Functions inherited from meshlib.mrmeshpy.Object
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 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)
 
bool globalVisibility (self, ViewportMask viewportMask='ViewportMask::any()')
 
ViewportMask globalVisibilityMask (self)
 
bool hasModel (self)
 
bool hasVisualRepresentation (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 shallowCloneTree (self)
 
None sortChildren (self)
 
None swap (self, Object other)
 
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 ()
 
Box3f getWorldBox (*args, **kwargs)
 
bool render (*args, **kwargs)
 
None renderForPicker (*args, **kwargs)
 
- Static Public Member Functions inherited from meshlib.mrmeshpy.Object
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::VisualObject
Aliases:  ChangeVisualizePropertyAction.Obj, ChangeVertsColorMapAction.Obj, ChangeColoringType.Obj, ChangeObjectColorAction.Obj

Visual Object

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ clone()

◆ copyColors()

None meshlib.mrmeshpy.VisualObject.copyColors ( self,
VisualObject src,
VertMap thisToSrc,
FaceMap thisToSrcFaces = 'MR::FaceMap{}' )
copies point colors from given source object \\param src using given map \\param thisToSrc

Reimplemented in meshlib.mrmeshpy.ObjectMeshHolder.

◆ getAllVisualizeProperties()

◆ getAmbientStrength()

float meshlib.mrmeshpy.VisualObject.getAmbientStrength ( self)
returns intensity of non-directional light

◆ getBackColor()

Color meshlib.mrmeshpy.VisualObject.getBackColor ( self,
ViewportId viewportId = 'MR::ViewportId{}' )
returns backward color of object in given viewport

◆ getBackColorsForAllViewports()

ViewportProperty_Color meshlib.mrmeshpy.VisualObject.getBackColorsForAllViewports ( self)
returns backward color of object in all viewports

◆ getBoundingBox()

Box3f meshlib.mrmeshpy.VisualObject.getBoundingBox ( self)
returns cached bounding box of this object in local coordinates

◆ getClassName()

◆ getColoringType()

ColoringType meshlib.mrmeshpy.VisualObject.getColoringType ( self)
returns the current coloring mode of the object

◆ getDirtyFlags()

int meshlib.mrmeshpy.VisualObject.getDirtyFlags ( self)
returns current dirty flags for the object

◆ getFrontColor()

Color meshlib.mrmeshpy.VisualObject.getFrontColor ( self,
bool selected = True,
ViewportId viewportId = 'MR::ViewportId{}' )
returns color of object when it is selected/not-selected (depending on argument) in given viewport

◆ getFrontColorsForAllViewports()

ViewportProperty_Color meshlib.mrmeshpy.VisualObject.getFrontColorsForAllViewports ( self,
bool selected = True )
returns color of object when it is selected/not-selected (depending on argument) in all viewports

◆ getGlobalAlpha()

int meshlib.mrmeshpy.VisualObject.getGlobalAlpha ( self,
ViewportId viewportId = 'MR::ViewportId{}' )
returns global transparency alpha of object in given viewport

◆ getGlobalAlphaForAllViewports()

ViewportProperty_unsigned_char meshlib.mrmeshpy.VisualObject.getGlobalAlphaForAllViewports ( self)
returns global transparency alpha of object in all viewports

◆ getInfoLines()

◆ getLabels()

std_vector_PositionedText meshlib.mrmeshpy.VisualObject.getLabels ( self)

◆ getLabelsColor()

Color meshlib.mrmeshpy.VisualObject.getLabelsColor ( self,
ViewportId viewportId = 'MR::ViewportId{}' )

◆ getLabelsColorsForAllViewports()

ViewportProperty_Color meshlib.mrmeshpy.VisualObject.getLabelsColorsForAllViewports ( self)

◆ getRedrawFlag()

bool meshlib.mrmeshpy.VisualObject.getRedrawFlag ( self,
ViewportMask viewportMask )
returns true if the object must be redrawn (due to dirty flags) in one of specified viewports

Reimplemented from meshlib.mrmeshpy.Object.

Reimplemented in meshlib.mrmeshpy.ObjectMeshHolder.

◆ getShininess()

float meshlib.mrmeshpy.VisualObject.getShininess ( self)
returns the current shininess visual value

◆ getSpecularStrength()

float meshlib.mrmeshpy.VisualObject.getSpecularStrength ( self)
returns intensity of reflections

◆ getVertsColorMap()

VertColors meshlib.mrmeshpy.VisualObject.getVertsColorMap ( self)
returns per-vertex colors of the object

◆ getVisualizeProperty()

bool meshlib.mrmeshpy.VisualObject.getVisualizeProperty ( self,
AnyVisualizeMaskEnum type,
ViewportMask viewportMask )
returns true if the property is set at least in one viewport specified by the mask

◆ getVisualizePropertyMask()

◆ getWorldBox()

Box3f meshlib.mrmeshpy.VisualObject.getWorldBox ( * args,
** kwargs )
static
returns bounding box of this object in given viewport in world coordinates,
to get world bounding box of the object with all child objects, please call Object::getWorldTreeBox method

Reimplemented from meshlib.mrmeshpy.Object.

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

◆ heapBytes()

int meshlib.mrmeshpy.VisualObject.heapBytes ( self)

◆ isPickable()

bool meshlib.mrmeshpy.VisualObject.isPickable ( self,
ViewportMask viewportMask = 'ViewportMask::any()' )
whether the object can be picked (by mouse) in any of given viewports

◆ render()

bool meshlib.mrmeshpy.VisualObject.render ( * args,
** kwargs )
static
draws this object for visualization
Returns true if something was drawn.

◆ renderForPicker()

None meshlib.mrmeshpy.VisualObject.renderForPicker ( * args,
** kwargs )
static
draws this object for picking

◆ renderUi()

None meshlib.mrmeshpy.VisualObject.renderUi ( self,
UiRenderParams params )
draws this object for 2d UI

◆ resetDirty()

None meshlib.mrmeshpy.VisualObject.resetDirty ( self)
resets all dirty flags (except for cache flags that will be reset automatically on cache update)

◆ setAllVisualizeProperties()

None meshlib.mrmeshpy.VisualObject.setAllVisualizeProperties ( self,
std_vector_ViewportMask properties )
set all visualize properties masks

◆ setAmbientStrength()

None meshlib.mrmeshpy.VisualObject.setAmbientStrength ( self,
float ambientStrength )
sets intensity of non-directional light

◆ setBackColor()

None meshlib.mrmeshpy.VisualObject.setBackColor ( self,
Color color,
ViewportId viewportId = 'MR::ViewportId{}' )
sets backward color of object in given viewport

◆ setBackColorsForAllViewports()

None meshlib.mrmeshpy.VisualObject.setBackColorsForAllViewports ( self,
ViewportProperty_Color val )
sets backward color of object in all viewports

◆ setColoringType()

None meshlib.mrmeshpy.VisualObject.setColoringType ( self,
ColoringType coloringType )
sets coloring mode of the object with given argument

◆ setDirtyFlags()

None meshlib.mrmeshpy.VisualObject.setDirtyFlags ( self,
int mask,
bool invalidateCaches = True )
sets some dirty flags for the object (to force its visual update)
\\param mask is a union of DirtyFlags flags
\\param invalidateCaches whether to automatically invalidate model caches (pass false here if you manually update the caches)

Reimplemented in meshlib.mrmeshpy.ObjectGcode, meshlib.mrmeshpy.ObjectLines, meshlib.mrmeshpy.ObjectLinesHolder, meshlib.mrmeshpy.ObjectMesh, meshlib.mrmeshpy.ObjectMeshHolder, meshlib.mrmeshpy.ObjectPoints, meshlib.mrmeshpy.ObjectPointsHolder, and meshlib.mrmeshpy.ObjectVoxels.

◆ setFrontColor()

None meshlib.mrmeshpy.VisualObject.setFrontColor ( self,
Color color,
bool selected,
ViewportId viewportId = 'MR::ViewportId{}' )
sets color of object when it is selected/not-selected (depending on argument) in given viewport

Reimplemented in meshlib.mrmeshpy.ObjectGcode.

◆ setFrontColorsForAllViewports()

None meshlib.mrmeshpy.VisualObject.setFrontColorsForAllViewports ( self,
ViewportProperty_Color val,
bool selected = True )
sets color of object when it is selected/not-selected (depending on argument) in all viewports

◆ setGlobalAlpha()

None meshlib.mrmeshpy.VisualObject.setGlobalAlpha ( self,
int alpha,
ViewportId viewportId = 'MR::ViewportId{}' )
sets global transparency alpha of object in given viewport

◆ setGlobalAlphaForAllViewports()

None meshlib.mrmeshpy.VisualObject.setGlobalAlphaForAllViewports ( self,
ViewportProperty_unsigned_char val )
sets global transparency alpha of object in all viewports

◆ setLabels()

None meshlib.mrmeshpy.VisualObject.setLabels ( self,
std_vector_PositionedText labels )

◆ setLabelsColor()

None meshlib.mrmeshpy.VisualObject.setLabelsColor ( self,
Color color,
ViewportId viewportId = 'MR::ViewportId{}' )

◆ setLabelsColorsForAllViewports()

None meshlib.mrmeshpy.VisualObject.setLabelsColorsForAllViewports ( self,
ViewportProperty_Color val )

◆ setPickable()

None meshlib.mrmeshpy.VisualObject.setPickable ( self,
bool on,
ViewportMask viewportMask = 'ViewportMask::all()' )
sets the object as can/cannot be picked (by mouse) in all of given viewports

◆ setShininess()

None meshlib.mrmeshpy.VisualObject.setShininess ( self,
float shininess )
sets shininess visual value of the object with given argument

◆ setSpecularStrength()

None meshlib.mrmeshpy.VisualObject.setSpecularStrength ( self,
float specularStrength )
sets intensity of reflections

◆ setUseDefaultScenePropertiesOnDeserialization()

None meshlib.mrmeshpy.VisualObject.setUseDefaultScenePropertiesOnDeserialization ( self,
bool useDefaultScenePropertiesOnDeserialization )
set whether the scene-related properties should get their values from SceneColors and SceneSettings instances
rather than from the input data on deserialization

◆ setVertsColorMap()

None meshlib.mrmeshpy.VisualObject.setVertsColorMap ( self,
VertColors vertsColorMap )
sets per-vertex colors of the object

◆ setVisualizeProperty()

None meshlib.mrmeshpy.VisualObject.setVisualizeProperty ( self,
bool value,
AnyVisualizeMaskEnum type,
ViewportMask viewportMask )
set visual property in all viewports specified by the mask

◆ setVisualizePropertyMask()

None meshlib.mrmeshpy.VisualObject.setVisualizePropertyMask ( self,
AnyVisualizeMaskEnum type,
ViewportMask viewportMask )
set visual property mask

◆ shallowClone()

◆ showLabels() [1/2]

bool meshlib.mrmeshpy.VisualObject.showLabels ( self)

◆ showLabels() [2/2]

None meshlib.mrmeshpy.VisualObject.showLabels ( self,
bool on )
shows/hides labels

◆ showName() [1/2]

bool meshlib.mrmeshpy.VisualObject.showName ( self)
returns whether object name is shown in any viewport

◆ showName() [2/2]

None meshlib.mrmeshpy.VisualObject.showName ( self,
bool on )
shows/hides object name in all viewports

◆ supportsVisualizeProperty()

◆ toggleVisualizeProperty()

None meshlib.mrmeshpy.VisualObject.toggleVisualizeProperty ( self,
AnyVisualizeMaskEnum type,
ViewportMask viewportMask )
toggle visual property in all viewports specified by the mask

◆ TypeName()

◆ typeName()

◆ updateVertsColorMap()

None meshlib.mrmeshpy.VisualObject.updateVertsColorMap ( self,
VertColors vertsColorMap )
swaps per-vertex colors of the object with given argument

◆ useDefaultScenePropertiesOnDeserialization()

bool meshlib.mrmeshpy.VisualObject.useDefaultScenePropertiesOnDeserialization ( self)
whether the scene-related properties should get their values from SceneColors and SceneSettings instances
rather than from the input data on deserialization

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