MeshLib Python Docs
Loading...
Searching...
No Matches
Inheritance diagram for mrmeshpy.ObjectVoxels:

Classes

class  ConstVolumeRenderingParams
class  VolumeRenderingParams

Public Member Functions

None __init__ (self)
None applyScale (self, float scaleFactor)
None construct (self, ConstSimpleVolume simpleVolume, Const_std_optional_Vector2_float minmax=..., Const_func_bool_from_float cb='{}', bool normalPlusGrad=False)
None construct (self, ConstSimpleVolumeMinMax simpleVolumeMinMax, Const_func_bool_from_float cb='{}', bool normalPlusGrad=False)
None construct (self, ConstFloatGrid grid, ConstVector3f voxelSize, Const_std_optional_Vector2_float minmax=...)
None construct (self, ConstVdbVolume vdbVolume)
None enableVolumeRendering (self, bool on)
None invalidateActiveBoundsCaches (self)
None resetFrontColor (self)
None selectVoxels (self, ConstVoxelBitSet selectedVoxels)
None setActiveBounds (self, ConstBox3i activeBox, Const_func_bool_from_float cb='{}', bool updateSurface=True)
None setDirtyFlags (self, int mask, bool invalidateCaches=True)
None setDualMarchingCubes (self, bool on, bool updateSurface=True, Const_func_bool_from_float cb='{}')
bool setIsoValue (self, float iso, Const_func_bool_from_float cb='{}', bool updateSurface=True)
None setMaxSurfaceVertices (self, int maxVerts)
None setSerializeFormat (self, str newFormat)
None setVolumeRenderActiveVoxels (self, ConstVoxelBitSet activeVoxels)
None setVolumeRenderingParams (self, ObjectVoxels.ConstVolumeRenderingParams params)
None setVoxelPointPositioner (self, Const_func_Vector3_float_from_Vector3_float_Vector3_float_float_float_float positioner)
Histogram updateHistogram (self, ConstHistogram histogram)
None updateHistogramAndSurface (self, Const_func_bool_from_float cb='{}')
Mesh updateIsoSurface (self, Mesh mesh)
VdbVolume updateVdbVolume (self, ConstVdbVolume vdbVolume)
VdbVolume varVdbVolume (self)
Public Member Functions inherited from mrmeshpy.ConstObjectVoxels
 __init__ (self, *args, **kwargs)
int activeVoxels (self)
str className (self)
str classNameInPlural (self)
Object clone (self)
ConstVector3i dimensions (self)
ConstBox3i getActiveBounds (self)
Vector3i getCoordinateByVoxelId (self, ConstVoxelId id)
bool getDualMarchingCubes (self)
std_vector_std_string getInfoLines (self)
float getIsoValue (self)
int getMaxSurfaceVertices (self)
ConstVoxelBitSet getSelectedVoxels (self)
ConstVolumeIndexer getVolumeIndexer (self)
ConstVoxelBitSet getVolumeRenderActiveVoxels (self)
SimpleVolume getVolumeRenderingData (self)
ObjectVoxels.ConstVolumeRenderingParams getVolumeRenderingParams (self)
VoxelId getVoxelIdByCoordinate (self, ConstVector3i coord)
VoxelId getVoxelIdByPoint (self, ConstVector3f point)
ConstFloatGrid grid (self)
bool hasModel (self)
bool hasVisualRepresentation (self)
int heapBytes (self)
ConstHistogram histogram (self)
bool isVolumeRenderingEnabled (self)
bool prepareDataForVolumeRendering (self, Const_func_bool_from_float cb='{}')
Histogram recalculateHistogram (self, Const_std_optional_Vector2_float minmax, Const_func_bool_from_float cb='{}')
Mesh recalculateIsoSurface (self, float iso, Const_func_bool_from_float cb='{}')
Mesh recalculateIsoSurface (self, ConstVdbVolume volume, float iso, Const_func_bool_from_float cb='{}')
str serializeFormat (self)
Object shallowClone (self)
Mesh surface (self)
str typeName (self)
ConstVdbVolume vdbVolume (self)
ConstVector3f voxelSize (self)
Public Member Functions inherited from mrmeshpy.ConstObjectMeshHolder
 __init__ (self, *args, **kwargs)
str actualSerializeFormat (self)
float avgEdgeLen (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 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)
bool supportsVisualizeProperty (self, ConstAnyVisualizeMaskEnum type)
float totalArea (self)
float volume (self)
Public Member Functions inherited from mrmeshpy.ConstVisualObject
 __init__ (self, *args, **kwargs)
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)
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.ObjectMeshHolder
None __init__ (self)
None addTexture (self, ConstMeshTexture texture)
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 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 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 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.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)

Static Public Member Functions

 extractVoxels (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ConstObjectVoxels
str StaticClassName ()
str StaticClassNameInPlural ()
str StaticTypeName ()
Static Public Member Functions inherited from mrmeshpy.ConstObjectMeshHolder
Box3f getWorldBox (*args, **kwargs)
Static Public Member Functions inherited from mrmeshpy.ConstVisualObject
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::ObjectVoxels
Aliases:  ChangVoxelSelectionAction.Obj, ChangeActiveBoxAction.Obj, ChangeDualMarchingCubesAction.Obj, ChangeGridAction.Obj, ChangeIsoAction.Obj, ChangeSurfaceAction.Obj, std_shared_ptr_ChangVoxelSelectionAction_Obj, std_shared_ptr_ChangeActiveBoxAction_Obj, std_shared_ptr_ChangeDualMarchingCubesAction_Obj, std_shared_ptr_ChangeGridAction_Obj, std_shared_ptr_ChangeIsoAction_Obj, std_shared_ptr_ChangeSurfaceAction_Obj, std_shared_ptr_ObjectVoxels

This class stores information about voxels object

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.ObjectVoxels.__init__ ( self)

Member Function Documentation

◆ applyScale()

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

Reimplemented from mrmeshpy.ObjectMeshHolder.

◆ construct() [1/4]

None mrmeshpy.ObjectVoxels.construct ( self,
ConstFloatGrid grid,
ConstVector3f voxelSize,
Const_std_optional_Vector2_float minmax = ... )
Clears all internal data and then remembers grid and calculates histogram (surface is not built, call \\ref updateHistogramAndSurface)
\\param minmax optional data about known min and max values

◆ construct() [2/4]

None mrmeshpy.ObjectVoxels.construct ( self,
ConstSimpleVolume simpleVolume,
Const_std_optional_Vector2_float minmax = ...,
Const_func_bool_from_float cb = '{}',
bool normalPlusGrad = False )
Clears all internal data and then creates grid and calculates histogram (surface is not built, call \\ref updateHistogramAndSurface)
\\param normalPlusGrad true means that iso-surface normals will be along gradient, false means opposite direction
\\param minmax optional data about known min and max values
set a new background for the VdbVolume, if normalPlusGrad = true, use the maximum value, otherwise the minimum value

◆ construct() [3/4]

None mrmeshpy.ObjectVoxels.construct ( self,
ConstSimpleVolumeMinMax simpleVolumeMinMax,
Const_func_bool_from_float cb = '{}',
bool normalPlusGrad = False )
Clears all internal data and then creates grid and calculates histogram (surface is not built, call \\ref updateHistogramAndSurface)
\\param normalPlusGrad true means that iso-surface normals will be along gradient, false means opposite direction
set a new background for the VdbVolume, if normalPlusGrad = true, use the maximum value, otherwise the minimum value

◆ construct() [4/4]

None mrmeshpy.ObjectVoxels.construct ( self,
ConstVdbVolume vdbVolume )
Clears all internal data and then creates grid and calculates histogram (surface is not built, call \\ref updateHistogramAndSurface)

◆ enableVolumeRendering()

None mrmeshpy.ObjectVoxels.enableVolumeRendering ( self,
bool on )
this function should only be called from GUI thread because it changes rendering object,
it can take some time to prepare data, so you can prepare data with progress callback
by calling `prepareDataForVolumeRendering(cb)` function before calling this one

◆ extractVoxels()

mrmeshpy.ObjectVoxels.extractVoxels ( * args,
** kwargs )
static
vdbVolume(self: meshlib.mrmeshpy.ConstObjectVoxels) -> meshlib.mrmeshpy.ConstVdbVolume

Return VdbVolume

◆ invalidateActiveBoundsCaches()

None mrmeshpy.ObjectVoxels.invalidateActiveBoundsCaches ( self)
Call this function in main thread post processing if you call setActiveBounds from progress bar thread

◆ resetFrontColor()

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

Reimplemented from mrmeshpy.ObjectMeshHolder.

◆ selectVoxels()

None mrmeshpy.ObjectVoxels.selectVoxels ( self,
ConstVoxelBitSet selectedVoxels )

◆ setActiveBounds()

None mrmeshpy.ObjectVoxels.setActiveBounds ( self,
ConstBox3i activeBox,
Const_func_bool_from_float cb = '{}',
bool updateSurface = True )
Sets active bounds for some simplifications (max excluded)
active bounds is box in voxel coordinates, note that voxels under (0,0,0) and voxels over (dimensions) are empty
NOTE: don't forget to call `invalidateActiveBoundsCaches` if you call this function from progress bar thread

◆ setDirtyFlags()

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

◆ setDualMarchingCubes()

None mrmeshpy.ObjectVoxels.setDualMarchingCubes ( self,
bool on,
bool updateSurface = True,
Const_func_bool_from_float cb = '{}' )
sets whether to use Dual Marching Cubes algorithm for visualization (true) or Standard Marching Cubes (false);
\\param updateSurface forces immediate update

◆ setIsoValue()

bool mrmeshpy.ObjectVoxels.setIsoValue ( self,
float iso,
Const_func_bool_from_float cb = '{}',
bool updateSurface = True )
Sets iso value and updates iso-surfaces if needed:
Returns true if iso-value was updated, false - otherwise

◆ setMaxSurfaceVertices()

None mrmeshpy.ObjectVoxels.setMaxSurfaceVertices ( self,
int maxVerts )
sets top limit on the number of vertices in the iso-surface

◆ setSerializeFormat()

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

Reimplemented from mrmeshpy.ObjectMeshHolder.

◆ setVolumeRenderActiveVoxels()

None mrmeshpy.ObjectVoxels.setVolumeRenderActiveVoxels ( self,
ConstVoxelBitSet activeVoxels )
set active (visible) voxels (using only in Volume Rendering mode)

◆ setVolumeRenderingParams()

None mrmeshpy.ObjectVoxels.setVolumeRenderingParams ( self,
ObjectVoxels.ConstVolumeRenderingParams params )

◆ setVoxelPointPositioner()

None mrmeshpy.ObjectVoxels.setVoxelPointPositioner ( self,
Const_func_Vector3_float_from_Vector3_float_Vector3_float_float_float_float positioner )
set voxel point positioner for Marching Cubes (only for Standard Marching Cubes)

◆ updateHistogram()

Histogram mrmeshpy.ObjectVoxels.updateHistogram ( self,
ConstHistogram histogram )
Sets external histogram for this object
and returns back previous histogram of this

◆ updateHistogramAndSurface()

None mrmeshpy.ObjectVoxels.updateHistogramAndSurface ( self,
Const_func_bool_from_float cb = '{}' )
Updates histogram, by stored grid (evals min and max values from grid)
rebuild iso surface if it is present

◆ updateIsoSurface()

Mesh mrmeshpy.ObjectVoxels.updateIsoSurface ( self,
Mesh mesh )
Sets external surface mesh for this object
and returns back previous mesh of this

◆ updateVdbVolume()

VdbVolume mrmeshpy.ObjectVoxels.updateVdbVolume ( self,
ConstVdbVolume vdbVolume )
Sets external vdb volume for this object
and returns back previous vdb volume of this

◆ varVdbVolume()

VdbVolume mrmeshpy.ObjectVoxels.varVdbVolume ( self)

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