MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.ObjectMeshHolder Class Reference
Inheritance diagram for mrmeshpy.ObjectMeshHolder:

Public Member Functions

None __init__ (self)
None addTexture (self, ConstMeshTexture texture)
None applyScale (self, float scaleFactor)
None clearAncillaryTexture (self)
None copyAllSolidColors (self, ConstObjectMeshHolder other)
None copyColors (self, ConstObjectMeshHolder src, ConstVertMap thisToSrc, ConstFaceMap thisToSrcFaces=...)
None copyTextureAndColors (self, ConstObjectMeshHolder src, ConstVertMap thisToSrc, ConstFaceMap thisToSrcFaces=...)
None invalidateMetricsCache (self, int mask)
None resetColors (self)
None resetFrontColor (self)
None selectEdges (self, ConstUndirectedEdgeBitSet newSelection)
None selectFaces (self, ConstFaceBitSet newSelection)
None setAncillaryTexture (self, ConstMeshTexture texture)
None setAncillaryUVCoords (self, ConstVertCoords2 uvCoordinates)
None setBordersColor (self, ConstColor color, ConstViewportId id=...)
None setBordersColorsForAllViewports (self, ConstViewportProperty_Color val)
None setCreases (self, ConstUndirectedEdgeBitSet creases)
None setData (self, ObjectMeshData data)
None setDirtyFlags (self, int mask, bool invalidateCaches=True)
None setDirtyFlagsFast (self, int mask)
None setEdgeWidth (self, float edgeWidth)
None setEdgesColor (self, ConstColor color, ConstViewportId id=...)
None setEdgesColorsForAllViewports (self, ConstViewportProperty_Color val)
None setFacesColorMap (self, ConstFaceColors facesColorMap)
None setFlatShading (self, bool on)
None setPointSize (self, float size)
None setPointsColor (self, ConstColor color, ConstViewportId id=...)
None setPointsColorsForAllViewports (self, ConstViewportProperty_Color val)
None setSelectedEdgesColor (self, ConstColor color, ConstViewportId id=...)
None setSelectedEdgesColorsForAllViewports (self, ConstViewportProperty_Color val)
None setSelectedFacesColor (self, ConstColor color, ConstViewportId id=...)
None setSelectedFacesColorsForAllViewports (self, ConstViewportProperty_Color val)
None setSerializeFormat (self, str newFormat)
None setTexturePerFace (self, ConstTexturePerFace texturePerFace)
None setTextures (self, ConstVector_MeshTexture_TextureId texture)
None setUVCoords (self, ConstVertCoords2 uvCoordinates)
None setVertsColorMap (self, ConstVertColors vertsColorMap)
None updateAncillaryUVCoords (self, VertCoords2 updated)
None updateData (self, ObjectMeshData data)
None updateFacesColorMap (self, FaceColors updated)
None updateTexturePerFace (self, TexturePerFace texturePerFace)
None updateTextures (self, Vector_MeshTexture_TextureId updated)
None updateUVCoords (self, VertCoords2 updated)
None updateVertsColorMap (self, VertColors vertsColorMap)
Mesh varMeshPtr (self)
Public Member Functions inherited from mrmeshpy.ConstObjectMeshHolder
 __init__ (self, *args, **kwargs)
str actualSerializeFormat (self)
float avgEdgeLen (self)
Object clone (self)
ConstUndirectedEdgeBitSet creases (self)
ConstObjectMeshData data (self)
bool flatShading (self)
std_vector_ViewportMask getAllVisualizeProperties (self)
ConstMeshTexture getAncillaryTexture (self)
ConstVertCoords2 getAncillaryUVCoords (self)
ConstColor getBordersColor (self, ConstViewportId id=...)
ConstViewportProperty_Color getBordersColorsForAllViewports (self)
float getEdgeWidth (self)
ConstColor getEdgesColor (self, ConstViewportId id=...)
ConstViewportProperty_Color getEdgesColorsForAllViewports (self)
ConstFaceColors getFacesColorMap (self)
int getModelHash (self)
float getPointSize (self)
ConstColor getPointsColor (self, ConstViewportId id=...)
ConstViewportProperty_Color getPointsColorsForAllViewports (self)
bool getRedrawFlag (self, ConstViewportMask viewportMask)
ConstUndirectedEdgeBitSet getSelectedEdges (self)
ConstColor getSelectedEdgesColor (self, ConstViewportId id=...)
ConstViewportProperty_Color getSelectedEdgesColorsForAllViewports (self)
ConstFaceBitSet getSelectedFaces (self)
ConstColor getSelectedFacesColor (self, ConstViewportId id=...)
ConstViewportProperty_Color getSelectedFacesColorsForAllViewports (self)
ConstMeshTexture getTexture (self)
ConstTexturePerFace getTexturePerFace (self)
ConstVector_MeshTexture_TextureId getTextures (self)
ConstVertCoords2 getUVCoords (self)
ConstVertColors getVertsColorMap (self)
ConstViewportMask getVisualizePropertyMask (self, ConstAnyVisualizeMaskEnum type)
bool hasAncillaryTexture (self)
bool hasModel (self)
bool hasVisualRepresentation (self)
int heapBytes (self)
bool isMeshClosed (self)
ConstMesh mesh (self)
MeshPart meshPart (self)
ConstMesh meshPtr (self)
int numComponents (self)
int numCreaseEdges (self)
int numHandles (self)
int numHoles (self)
int numSelectedEdges (self)
int numSelectedFaces (self)
int numUndirectedEdges (self)
bool sameModels (self, ConstObject other)
float selectedArea (self)
str serializeFormat (self)
Object shallowClone (self)
bool supportsVisualizeProperty (self, ConstAnyVisualizeMaskEnum type)
float totalArea (self)
str typeName (self)
float volume (self)
Public Member Functions inherited from mrmeshpy.ConstVisualObject
 __init__ (self, *args, **kwargs)
str className (self)
str classNameInPlural (self)
float getAmbientStrength (self)
ConstColor getBackColor (self, ConstViewportId viewportId=...)
ConstViewportProperty_Color getBackColorsForAllViewports (self)
Box3f getBoundingBox (self)
ColoringType getColoringType (self)
int getDirtyFlags (self)
ConstColor getFrontColor (self, bool selected=True, ConstViewportId viewportId=...)
ConstViewportProperty_Color getFrontColorsForAllViewports (self, bool selected=True)
int getGlobalAlpha (self, ConstViewportId viewportId=...)
ConstViewportProperty_unsigned_char getGlobalAlphaForAllViewports (self)
std_vector_std_string getInfoLines (self)
float getShininess (self)
float getSpecularStrength (self)
bool getVisualizeProperty (self, ConstAnyVisualizeMaskEnum type, ConstViewportMask viewportMask)
bool globalClippedByPlane (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
ViewportMask globalClippedByPlaneMask (self)
bool isPickable (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
None renderUi (self, ConstUiRenderParams params)
None resetDirty (self)
None resetDirtyExceptMask (self, int mask)
bool useDefaultScenePropertiesOnDeserialization (self)
Public Member Functions inherited from mrmeshpy.ConstObject
 __init__ (self, *args, **kwargs)
Object cloneTree (self)
ConstChildren constChildren (self)
bool globalVisibility (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
ViewportMask globalVisibilityMask (self)
bool isAncestor (self, ConstObject ancestor)
bool isAncillary (self)
bool isGlobalAncillary (self)
bool isLocked (self)
bool isParentLocked (self)
bool isSelected (self)
bool isVisible (self, ConstViewportMask viewportMask='MR::ViewportMask::any()')
str name (self)
None resetRedrawFlag (self)
Object shallowCloneTree (self)
Const_std_set_std_string tags (self)
ViewportMask visibilityMask (self)
AffineXf3f worldXf (self, ConstViewportId id=..., bool_output isDef=None)
ConstAffineXf3f xf (self, ConstViewportId id=..., bool_output isDef=None)
ConstViewportProperty_AffineXf3f xfsForAllViewports (self)
Public Member Functions inherited from mrmeshpy.ConstObjectChildrenHolder
 __init__ (self, *args, **kwargs)
Object getSharedPtr (self)
Public Member Functions inherited from mrmeshpy.VisualObject
None __init__ (self)
None setAllVisualizeProperties (self, Const_std_vector_ViewportMask properties)
None setAmbientStrength (self, float ambientStrength)
None setBackColor (self, ConstColor color, ConstViewportId viewportId=...)
None setBackColorsForAllViewports (self, ConstViewportProperty_Color val)
None setColoringType (self, ColoringType coloringType)
None setFrontColor (self, ConstColor color, bool selected, ConstViewportId viewportId=...)
None setFrontColorsForAllViewports (self, ConstViewportProperty_Color val, bool selected=True)
None setGlobalAlpha (self, int alpha, ConstViewportId viewportId=...)
None setGlobalAlphaForAllViewports (self, ConstViewportProperty_unsigned_char val)
None setGlobalClippedByPlane (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::all()')
None setPickable (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::all()')
None setShininess (self, float shininess)
None setSpecularStrength (self, float specularStrength)
None setUseDefaultScenePropertiesOnDeserialization (self, bool useDefaultScenePropertiesOnDeserialization)
None setVisualizeProperty (self, bool value, ConstAnyVisualizeMaskEnum type, ConstViewportMask viewportMask)
None setVisualizePropertyMask (self, ConstAnyVisualizeMaskEnum type, ConstViewportMask viewportMask)
None showName (self, bool on)
bool showName (ConstVisualObject self)
None toggleVisualizeProperty (self, ConstAnyVisualizeMaskEnum type, ConstViewportMask viewportMask)
Public Member Functions inherited from mrmeshpy.Object
None __init__ (self)
bool addChild (self, Object child, bool recognizedChild=True)
bool addChildBefore (self, Object newChild, Object existingChild)
bool addTag (self, str tag)
VisualObject asType (self)
ConstVisualObject asType (ConstObject self)
Const_std_vector_std_shared_ptr_Object children (self)
Const_std_vector_std_shared_ptr_Object_const children (ConstObject self)
bool detachFromParent (self)
Object find (self, str name)
ConstObject find (ConstObject self, str name)
Object findCommonAncestor (self, Object other)
ConstObject findCommonAncestor (ConstObject self, ConstObject other)
Object parent (self)
ConstObject parent (ConstObject self)
None removeAllChildren (self)
bool removeChild (self, Object child)
bool removeChild (self, Object child)
bool removeTag (self, str tag)
None resetXf (self, ConstViewportId id=...)
bool select (self, bool on)
None setAncillary (self, bool ancillary)
None setGlobalVisibility (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::any()')
None setLocked (self, bool on)
None setName (self, str name)
None setParentLocked (self, bool lock)
None setVisibilityMask (self, ConstViewportMask viewportMask)
None setVisible (self, bool on, ConstViewportMask viewportMask='MR::ViewportMask::all()')
None setWorldXf (self, ConstAffineXf3f xf, ConstViewportId id=...)
None setXf (self, ConstAffineXf3f xf, ConstViewportId id=...)
None setXfsForAllViewports (self, ConstViewportProperty_AffineXf3f xf)
None sortChildren (self)
None swap (self, Object other)
Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
None __init__ (self)
None __init__ (self, ConstObjectChildrenHolder arg0)
ObjectChildrenHolder assign (self, ConstObjectChildrenHolder other)

Additional Inherited Members

Static Public Member Functions inherited from mrmeshpy.ConstObjectMeshHolder
str StaticTypeName ()
Box3f getWorldBox (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ConstVisualObject
str StaticClassName ()
str StaticClassNameInPlural ()
bool render (*args, **kwargs)
None renderForPicker (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ConstObject
Box3f getWorldTreeBox (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ObjectChildrenHolder
None __init__ (*args, **kwargs)

Detailed Description

Generated from:  MR::ObjectMeshHolder
Aliases:  ChangeFacesColorMapAction.Obj, ChangeMeshTexturePerFaceAction.Obj, ChangeMeshUVCoordsAction.Obj, ChangeTextureAction.Obj, std_shared_ptr_ObjectMeshHolder

an object that stores a mesh

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.ObjectMeshHolder.__init__ ( self)

Member Function Documentation

◆ addTexture()

None mrmeshpy.ObjectMeshHolder.addTexture ( self,
ConstMeshTexture texture )

◆ applyScale()

None mrmeshpy.ObjectMeshHolder.applyScale ( self,
float scaleFactor )
scale object size (all point positions)

Reimplemented from mrmeshpy.Object.

Reimplemented in mrmeshpy.ObjectDistanceMap, and mrmeshpy.ObjectVoxels.

◆ clearAncillaryTexture()

None mrmeshpy.ObjectMeshHolder.clearAncillaryTexture ( self)

◆ copyAllSolidColors()

None mrmeshpy.ObjectMeshHolder.copyAllSolidColors ( self,
ConstObjectMeshHolder other )
set all object solid colors (front/back/etc.) from other object for all viewports

Reimplemented from mrmeshpy.VisualObject.

◆ copyColors()

None mrmeshpy.ObjectMeshHolder.copyColors ( self,
ConstObjectMeshHolder src,
ConstVertMap thisToSrc,
ConstFaceMap thisToSrcFaces = ... )
copies vertex colors from given source object \\param src using given map \\param thisToSrc

◆ copyTextureAndColors()

None mrmeshpy.ObjectMeshHolder.copyTextureAndColors ( self,
ConstObjectMeshHolder src,
ConstVertMap thisToSrc,
ConstFaceMap thisToSrcFaces = ... )
copies texture, UV-coordinates and vertex colors from given source object \\param src using given map \\param thisToSrc

◆ invalidateMetricsCache()

None mrmeshpy.ObjectMeshHolder.invalidateMetricsCache ( self,
int mask )
invalidates same caches with mesh metrics (area, volume, ...) as by setDirtyFlags( mask )

◆ resetColors()

None mrmeshpy.ObjectMeshHolder.resetColors ( self)
reset all object colors to their default values from the current theme

Reimplemented from mrmeshpy.VisualObject.

◆ resetFrontColor()

None mrmeshpy.ObjectMeshHolder.resetFrontColor ( self)
reset basic object colors to their default values from the current theme

Reimplemented from mrmeshpy.VisualObject.

Reimplemented in mrmeshpy.ObjectDistanceMap, and mrmeshpy.ObjectVoxels.

◆ selectEdges()

None mrmeshpy.ObjectMeshHolder.selectEdges ( self,
ConstUndirectedEdgeBitSet newSelection )

◆ selectFaces()

None mrmeshpy.ObjectMeshHolder.selectFaces ( self,
ConstFaceBitSet newSelection )

◆ setAncillaryTexture()

None mrmeshpy.ObjectMeshHolder.setAncillaryTexture ( self,
ConstMeshTexture texture )

◆ setAncillaryUVCoords()

None mrmeshpy.ObjectMeshHolder.setAncillaryUVCoords ( self,
ConstVertCoords2 uvCoordinates )

◆ setBordersColor()

None mrmeshpy.ObjectMeshHolder.setBordersColor ( self,
ConstColor color,
ConstViewportId id = ... )

◆ setBordersColorsForAllViewports()

None mrmeshpy.ObjectMeshHolder.setBordersColorsForAllViewports ( self,
ConstViewportProperty_Color val )

◆ setCreases()

None mrmeshpy.ObjectMeshHolder.setCreases ( self,
ConstUndirectedEdgeBitSet creases )

◆ setData()

None mrmeshpy.ObjectMeshHolder.setData ( self,
ObjectMeshData data )
sets whole new ObjectMeshData

◆ setDirtyFlags()

None mrmeshpy.ObjectMeshHolder.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 from mrmeshpy.VisualObject.

Reimplemented in mrmeshpy.ObjectVoxels.

◆ setDirtyFlagsFast()

None mrmeshpy.ObjectMeshHolder.setDirtyFlagsFast ( self,
int mask )
this is a faster version of setDirtyFlags(), which does not invalidate metrics cache (area, volume, ...);
the user is responsible for calling invalidateMetricsCache( mask ) or setDirtyFlags( mask ) at the end of mesh editing;
DANGER: all cached values returned until then can be outdated

◆ setEdgesColor()

None mrmeshpy.ObjectMeshHolder.setEdgesColor ( self,
ConstColor color,
ConstViewportId id = ... )

◆ setEdgesColorsForAllViewports()

None mrmeshpy.ObjectMeshHolder.setEdgesColorsForAllViewports ( self,
ConstViewportProperty_Color val )

◆ setEdgeWidth()

None mrmeshpy.ObjectMeshHolder.setEdgeWidth ( self,
float edgeWidth )

◆ setFacesColorMap()

None mrmeshpy.ObjectMeshHolder.setFacesColorMap ( self,
ConstFaceColors facesColorMap )

◆ setFlatShading()

None mrmeshpy.ObjectMeshHolder.setFlatShading ( self,
bool on )
sets flat (true) or smooth (false) shading

◆ setPointsColor()

None mrmeshpy.ObjectMeshHolder.setPointsColor ( self,
ConstColor color,
ConstViewportId id = ... )

◆ setPointsColorsForAllViewports()

None mrmeshpy.ObjectMeshHolder.setPointsColorsForAllViewports ( self,
ConstViewportProperty_Color val )

◆ setPointSize()

None mrmeshpy.ObjectMeshHolder.setPointSize ( self,
float size )

◆ setSelectedEdgesColor()

None mrmeshpy.ObjectMeshHolder.setSelectedEdgesColor ( self,
ConstColor color,
ConstViewportId id = ... )
sets colors of selected edges

◆ setSelectedEdgesColorsForAllViewports()

None mrmeshpy.ObjectMeshHolder.setSelectedEdgesColorsForAllViewports ( self,
ConstViewportProperty_Color val )

◆ setSelectedFacesColor()

None mrmeshpy.ObjectMeshHolder.setSelectedFacesColor ( self,
ConstColor color,
ConstViewportId id = ... )
sets colors of selected triangles

◆ setSelectedFacesColorsForAllViewports()

None mrmeshpy.ObjectMeshHolder.setSelectedFacesColorsForAllViewports ( self,
ConstViewportProperty_Color val )

◆ setSerializeFormat()

None mrmeshpy.ObjectMeshHolder.setSerializeFormat ( self,
str newFormat )
overrides file extension used to serialize mesh inside this object: must start from '.',
nullptr means serialize in SceneSettings::get( SceneSettings::StringType::MeshSerializeFormat )

Reimplemented in mrmeshpy.ObjectVoxels.

◆ setTexturePerFace()

None mrmeshpy.ObjectMeshHolder.setTexturePerFace ( self,
ConstTexturePerFace texturePerFace )
the texture ids for the faces if more than one texture is used to texture the object
texture coordinates (data_.uvCoordinates) at a point can belong to different textures, depending on which face the point belongs to

◆ setTextures()

None mrmeshpy.ObjectMeshHolder.setTextures ( self,
ConstVector_MeshTexture_TextureId texture )

◆ setUVCoords()

None mrmeshpy.ObjectMeshHolder.setUVCoords ( self,
ConstVertCoords2 uvCoordinates )

◆ setVertsColorMap()

None mrmeshpy.ObjectMeshHolder.setVertsColorMap ( self,
ConstVertColors vertsColorMap )
sets per-vertex colors of the object

◆ updateAncillaryUVCoords()

None mrmeshpy.ObjectMeshHolder.updateAncillaryUVCoords ( self,
VertCoords2 updated )

◆ updateData()

None mrmeshpy.ObjectMeshHolder.updateData ( self,
ObjectMeshData data )
swaps whole ObjectMeshData with given argument

◆ updateFacesColorMap()

None mrmeshpy.ObjectMeshHolder.updateFacesColorMap ( self,
FaceColors updated )

◆ updateTexturePerFace()

None mrmeshpy.ObjectMeshHolder.updateTexturePerFace ( self,
TexturePerFace texturePerFace )

◆ updateTextures()

None mrmeshpy.ObjectMeshHolder.updateTextures ( self,
Vector_MeshTexture_TextureId updated )

◆ updateUVCoords()

None mrmeshpy.ObjectMeshHolder.updateUVCoords ( self,
VertCoords2 updated )

◆ updateVertsColorMap()

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

◆ varMeshPtr()

Mesh mrmeshpy.ObjectMeshHolder.varMeshPtr ( self)
returns the mesh of this object for modification, or nullptr if it is not set

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