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

Classes

class  VolumeRenderingParams
 

Public Member Functions

None __init__ (self)
 
int activeVoxels (self)
 
None applyScale (self, float scaleFactor)
 
Object clone (self)
 
None construct (self, SimpleVolume simpleVolume, std_optional_Vector2_float minmax='std::optional< MR::Vector2f >{}', func_bool_from_float cb='MR::ProgressCallback{}', bool normalPlusGrad=False)
 
None construct (self, SimpleVolumeMinMax simpleVolumeMinMax, func_bool_from_float cb='MR::ProgressCallback{}', bool normalPlusGrad=False)
 
None construct (self, OpenVdbFloatGrid grid, Vector3f voxelSize, std_optional_Vector2_float minmax='std::optional< MR::Vector2f >{}')
 
None construct (self, VdbVolume vdbVolume)
 
Vector3i dimensions (self)
 
None enableVolumeRendering (self, bool on)
 
VdbVolume extractVoxels (self)
 
Box3i getActiveBounds (self)
 
str getClassName (self)
 
Vector3i getCoordinateByVoxelId (self, Id_VoxelTag id)
 
bool getDualMarchingCubes (self)
 
std_vector_std_string getInfoLines (self)
 
float getIsoValue (self)
 
int getMaxSurfaceVertices (self)
 
VoxelBitSet getSelectedVoxels (self)
 
VolumeIndexer getVolumeIndexer (self)
 
VoxelBitSet getVolumeRenderActiveVoxels (self)
 
SimpleVolume getVolumeRenderingData (self)
 
ObjectVoxels.VolumeRenderingParams getVolumeRenderingParams (self)
 
Id_VoxelTag getVoxelIdByCoordinate (self, Vector3i coord)
 
Id_VoxelTag getVoxelIdByPoint (self, Vector3f point)
 
OpenVdbFloatGrid grid (self)
 
bool hasModel (self)
 
bool hasVisualRepresentation (self)
 
int heapBytes (self)
 
Histogram histogram (self)
 
None invalidateActiveBoundsCaches (self)
 
bool isVolumeRenderingEnabled (self)
 
bool prepareDataForVolumeRendering (self, func_bool_from_float cb='MR::ProgressCallback{}')
 
Histogram recalculateHistogram (self, std_optional_Vector2_float minmax, func_bool_from_float cb='MR::ProgressCallback{}')
 
Mesh recalculateIsoSurface (self, float iso, func_bool_from_float cb='MR::ProgressCallback{}')
 
Mesh recalculateIsoSurface (self, VdbVolume volume, float iso, func_bool_from_float cb='MR::ProgressCallback{}')
 
None selectVoxels (self, VoxelBitSet selectedVoxels)
 
str serializeFormat (self)
 
None setActiveBounds (self, Box3i activeBox, func_bool_from_float cb='MR::ProgressCallback{}', bool updateSurface=True)
 
None setDirtyFlags (self, int mask, bool invalidateCaches=True)
 
None setDualMarchingCubes (self, bool on, bool updateSurface=True, func_bool_from_float cb='MR::ProgressCallback{}')
 
bool setIsoValue (self, float iso, func_bool_from_float cb='MR::ProgressCallback{}', bool updateSurface=True)
 
None setMaxSurfaceVertices (self, int maxVerts)
 
None setSerializeFormat (self, str newFormat)
 
None setVolumeRenderActiveVoxels (self, VoxelBitSet activeVoxels)
 
None setVolumeRenderingParams (self, ObjectVoxels.VolumeRenderingParams params)
 
None setVoxelPointPositioner (self, func_Vector3_float_from_Vector3_float_Vector3_float_float_float_float positioner)
 
Object shallowClone (self)
 
Mesh surface (self)
 
str typeName (self)
 
Histogram updateHistogram (self, Histogram histogram)
 
None updateHistogramAndSurface (self, func_bool_from_float cb='MR::ProgressCallback{}')
 
Mesh updateIsoSurface (self, Mesh mesh)
 
VdbVolume updateVdbVolume (self, VdbVolume vdbVolume)
 
VdbVolume varVdbVolume (self)
 
VdbVolume vdbVolume (self)
 
Vector3f voxelSize (self)
 
- Public Member Functions inherited from meshlib.mrmeshpy.ObjectMeshHolder
None addTexture (self, MeshTexture texture)
 
float avgEdgeLen (self)
 
None clearAncillaryTexture (self)
 
None copyColors (self, VisualObject src, VertMap thisToSrc, FaceMap thisToSrcFaces='MR::FaceMap{}')
 
None copyTextureAndColors (self, ObjectMeshHolder src, VertMap thisToSrc, FaceMap thisToSrcFaces='MR::FaceMap{}')
 
UndirectedEdgeBitSet creases (self)
 
bool flatShading (self)
 
std_vector_ViewportMask getAllVisualizeProperties (self)
 
MeshTexture getAncillaryTexture (self)
 
VertUVCoords getAncillaryUVCoords (self)
 
Color getBordersColor (self, ViewportId id='MR::ViewportId{}')
 
ViewportProperty_Color getBordersColorsForAllViewports (self)
 
float getEdgeWidth (self)
 
Color getEdgesColor (self, ViewportId id='MR::ViewportId{}')
 
ViewportProperty_Color getEdgesColorsForAllViewports (self)
 
FaceColors getFacesColorMap (self)
 
int getNeededNormalsRenderDirtyValue (self, ViewportMask viewportMask)
 
float getPointSize (self)
 
Color getPointsColor (self, ViewportId id='MR::ViewportId{}')
 
bool getRedrawFlag (self, ViewportMask viewportMask)
 
UndirectedEdgeBitSet getSelectedEdges (self)
 
Color getSelectedEdgesColor (self, ViewportId id='MR::ViewportId{}')
 
ViewportProperty_Color getSelectedEdgesColorsForAllViewports (self)
 
FaceBitSet getSelectedFaces (self)
 
Color getSelectedFacesColor (self, ViewportId id='MR::ViewportId{}')
 
ViewportProperty_Color getSelectedFacesColorsForAllViewports (self)
 
MeshTexture getTexture (self)
 
TexturePerFace getTexturePerFace (self)
 
Vector_MeshTexture_TextureId getTextures (self)
 
VertUVCoords getUVCoords (self)
 
ViewportMask getVisualizePropertyMask (self, AnyVisualizeMaskEnum type)
 
bool hasAncillaryTexture (self)
 
bool isMeshClosed (self)
 
Mesh mesh (self)
 
MeshPart meshPart (self)
 
int numComponents (self)
 
int numCreaseEdges (self)
 
int numHandles (self)
 
int numHoles (self)
 
int numSelectedEdges (self)
 
int numSelectedFaces (self)
 
int numUndirectedEdges (self)
 
None resetDirtyExeptMask (self, int mask)
 
str saveMeshFormat (self)
 
None selectEdges (self, UndirectedEdgeBitSet newSelection)
 
None selectFaces (self, FaceBitSet newSelection)
 
float selectedArea (self)
 
None setAncillaryTexture (self, MeshTexture texture)
 
None setAncillaryUVCoords (self, VertUVCoords uvCoordinates)
 
None setBordersColor (self, Color color, ViewportId id='MR::ViewportId{}')
 
None setBordersColorsForAllViewports (self, ViewportProperty_Color val)
 
None setCreases (self, UndirectedEdgeBitSet creases)
 
None setEdgeWidth (self, float edgeWidth)
 
None setEdgesColor (self, Color color, ViewportId id='MR::ViewportId{}')
 
None setEdgesColorsForAllViewports (self, ViewportProperty_Color val)
 
None setFacesColorMap (self, FaceColors facesColorMap)
 
None setFlatShading (self, bool on)
 
None setPointSize (self, float size)
 
None setPointsColor (self, Color color, ViewportId id='MR::ViewportId{}')
 
None setSaveMeshFormat (self, str newFormat)
 
None setSelectedEdgesColor (self, Color color, ViewportId id='MR::ViewportId{}')
 
None setSelectedEdgesColorsForAllViewports (self, ViewportProperty_Color val)
 
None setSelectedFacesColor (self, Color color, ViewportId id='MR::ViewportId{}')
 
None setSelectedFacesColorsForAllViewports (self, ViewportProperty_Color val)
 
None setTexture (self, MeshTexture texture)
 
None setTexturePerFace (self, TexturePerFace texturePerFace)
 
None setTextures (self, Vector_MeshTexture_TextureId texture)
 
None setUVCoords (self, VertUVCoords uvCoordinates)
 
bool supportsVisualizeProperty (self, AnyVisualizeMaskEnum type)
 
float totalArea (self)
 
None updateAncillaryUVCoords (self, VertUVCoords updated)
 
None updateFacesColorMap (self, FaceColors updated)
 
None updateTexture (self, MeshTexture updated)
 
None updateTexturePerFace (self, TexturePerFace texturePerFace)
 
None updateTextures (self, Vector_MeshTexture_TextureId updated)
 
None updateUVCoords (self, VertUVCoords updated)
 
float volume (self)
 
- Public Member Functions inherited from meshlib.mrmeshpy.VisualObject
float getAmbientStrength (self)
 
Color getBackColor (self, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_Color getBackColorsForAllViewports (self)
 
Box3f getBoundingBox (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_PositionedText getLabels (self)
 
Color getLabelsColor (self, ViewportId viewportId='MR::ViewportId{}')
 
ViewportProperty_Color getLabelsColorsForAllViewports (self)
 
float getShininess (self)
 
float getSpecularStrength (self)
 
VertColors getVertsColorMap (self)
 
bool getVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
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 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)
 
None showLabels (self, bool on)
 
bool showLabels (self)
 
None showName (self, bool on)
 
bool showName (self)
 
None toggleVisualizeProperty (self, AnyVisualizeMaskEnum type, ViewportMask viewportMask)
 
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)
 
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 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 ()
 
- Static Public Member Functions inherited from meshlib.mrmeshpy.ObjectMeshHolder
Box3f getWorldBox (*args, **kwargs)
 
- Static Public Member Functions inherited from meshlib.mrmeshpy.VisualObject
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::ObjectVoxels
Aliases:  ChangeGridAction.Obj, std_shared_ptr_ChangeGridAction_Obj, std_shared_ptr_ChangeActiveBoxAction_Obj, std_shared_ptr_ChangeSurfaceAction_Obj, ChangeSurfaceAction.Obj, std_shared_ptr_ChangeIsoAction_Obj, std_shared_ptr_ChangVoxelSelectionAction_Obj, ChangeActiveBoxAction.Obj, ChangeIsoAction.Obj, ChangVoxelSelectionAction.Obj, ChangeDualMarchingCubesAction.Obj, std_shared_ptr_ChangeDualMarchingCubesAction_Obj

This class stores information about voxels object
\\ingroup DataModelGroup

Constructor & Destructor Documentation

◆ __init__()

None meshlib.mrmeshpy.ObjectVoxels.__init__ ( self)

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

Member Function Documentation

◆ activeVoxels()

int meshlib.mrmeshpy.ObjectVoxels.activeVoxels ( self)
returns cached information about the number of active voxels

◆ applyScale()

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

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ clone()

Object meshlib.mrmeshpy.ObjectVoxels.clone ( self)
clones this object only, without its children,
making new object the owner of all copied resources

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ construct() [1/4]

None meshlib.mrmeshpy.ObjectVoxels.construct ( self,
OpenVdbFloatGrid grid,
Vector3f voxelSize,
std_optional_Vector2_float minmax = 'std::optional<MR::Vector2f>{}' )
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 meshlib.mrmeshpy.ObjectVoxels.construct ( self,
SimpleVolume simpleVolume,
std_optional_Vector2_float minmax = 'std::optional<MR::Vector2f>{}',
func_bool_from_float cb = 'MR::ProgressCallback{}',
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 meshlib.mrmeshpy.ObjectVoxels.construct ( self,
SimpleVolumeMinMax simpleVolumeMinMax,
func_bool_from_float cb = 'MR::ProgressCallback{}',
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 meshlib.mrmeshpy.ObjectVoxels.construct ( self,
VdbVolume vdbVolume )
Clears all internal data and then creates grid and calculates histogram (surface is not built, call \\ref updateHistogramAndSurface)

◆ dimensions()

Vector3i meshlib.mrmeshpy.ObjectVoxels.dimensions ( self)
Returns dimensions of voxel objects

◆ enableVolumeRendering()

None meshlib.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()

VdbVolume meshlib.mrmeshpy.ObjectVoxels.extractVoxels ( self)
Return VdbVolume

◆ getActiveBounds()

Box3i meshlib.mrmeshpy.ObjectVoxels.getActiveBounds ( self)
Returns active bounds (max excluded)
active bounds is box in voxel coordinates, note that voxels under (0,0,0) and voxels over (dimensions) are empty 

◆ getClassName()

str meshlib.mrmeshpy.ObjectVoxels.getClassName ( self)
return human readable name of subclass

Reimplemented from meshlib.mrmeshpy.VisualObject.

◆ getCoordinateByVoxelId()

Vector3i meshlib.mrmeshpy.ObjectVoxels.getCoordinateByVoxelId ( self,
Id_VoxelTag id )

◆ getDualMarchingCubes()

bool meshlib.mrmeshpy.ObjectVoxels.getDualMarchingCubes ( self)
returns true if the iso-surface is built using Dual Marching Cubes algorithm or false if using Standard Marching Cubes

◆ getInfoLines()

std_vector_std_string meshlib.mrmeshpy.ObjectVoxels.getInfoLines ( self)
return several info lines that can better describe the object in the UI

Reimplemented from meshlib.mrmeshpy.VisualObject.

◆ getIsoValue()

float meshlib.mrmeshpy.ObjectVoxels.getIsoValue ( self)
Returns current iso value

◆ getMaxSurfaceVertices()

int meshlib.mrmeshpy.ObjectVoxels.getMaxSurfaceVertices ( self)
gets top limit on the number of vertices in the iso-surface

◆ getSelectedVoxels()

VoxelBitSet meshlib.mrmeshpy.ObjectVoxels.getSelectedVoxels ( self)

◆ getVolumeIndexer()

VolumeIndexer meshlib.mrmeshpy.ObjectVoxels.getVolumeIndexer ( self)
Returns indexer with more options

◆ getVolumeRenderActiveVoxels()

VoxelBitSet meshlib.mrmeshpy.ObjectVoxels.getVolumeRenderActiveVoxels ( self)
get active (visible) voxels

◆ getVolumeRenderingData()

SimpleVolume meshlib.mrmeshpy.ObjectVoxels.getVolumeRenderingData ( self)
move volume rendering data to caller: basically used in RenderVolumeObject 

◆ getVolumeRenderingParams()

ObjectVoxels.VolumeRenderingParams meshlib.mrmeshpy.ObjectVoxels.getVolumeRenderingParams ( self)

◆ getVoxelIdByCoordinate()

Id_VoxelTag meshlib.mrmeshpy.ObjectVoxels.getVoxelIdByCoordinate ( self,
Vector3i coord )
VoxelId is numerical representation of voxel
Coordinate is {x,y,z} indices of voxels in box (base dimensions space, NOT active dimensions)
Point is local space coordinate of point in scene

◆ getVoxelIdByPoint()

Id_VoxelTag meshlib.mrmeshpy.ObjectVoxels.getVoxelIdByPoint ( self,
Vector3f point )

◆ grid()

OpenVdbFloatGrid meshlib.mrmeshpy.ObjectVoxels.grid ( self)
Returns Float grid which contains voxels data, see more on openvdb::FloatGrid

◆ hasModel()

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

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ hasVisualRepresentation()

bool meshlib.mrmeshpy.ObjectVoxels.hasVisualRepresentation ( self)
mesh object can be seen if the mesh has at least one edge

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ heapBytes()

int meshlib.mrmeshpy.ObjectVoxels.heapBytes ( self)
returns the amount of memory this object occupies on heap

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ histogram()

Histogram meshlib.mrmeshpy.ObjectVoxels.histogram ( self)
Returns histogram

◆ invalidateActiveBoundsCaches()

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

◆ isVolumeRenderingEnabled()

bool meshlib.mrmeshpy.ObjectVoxels.isVolumeRenderingEnabled ( self)

◆ prepareDataForVolumeRendering()

bool meshlib.mrmeshpy.ObjectVoxels.prepareDataForVolumeRendering ( self,
func_bool_from_float cb = 'MR::ProgressCallback{}' )
prepare data for volume rendering
returns false if canceled or voxel data is empty

◆ recalculateHistogram()

Histogram meshlib.mrmeshpy.ObjectVoxels.recalculateHistogram ( self,
std_optional_Vector2_float minmax,
func_bool_from_float cb = 'MR::ProgressCallback{}' )
Calculates and returns new histogram

◆ recalculateIsoSurface() [1/2]

Mesh meshlib.mrmeshpy.ObjectVoxels.recalculateIsoSurface ( self,
float iso,
func_bool_from_float cb = 'MR::ProgressCallback{}' )
Calculates and return new mesh or error message

◆ recalculateIsoSurface() [2/2]

Mesh meshlib.mrmeshpy.ObjectVoxels.recalculateIsoSurface ( self,
VdbVolume volume,
float iso,
func_bool_from_float cb = 'MR::ProgressCallback{}' )
Same as above, but takes external volume

◆ selectVoxels()

None meshlib.mrmeshpy.ObjectVoxels.selectVoxels ( self,
VoxelBitSet selectedVoxels )

◆ serializeFormat()

str meshlib.mrmeshpy.ObjectVoxels.serializeFormat ( self)
returns file extension used to serialize the voxels

◆ setActiveBounds()

None meshlib.mrmeshpy.ObjectVoxels.setActiveBounds ( self,
Box3i activeBox,
func_bool_from_float cb = 'MR::ProgressCallback{}',
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 meshlib.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 meshlib.mrmeshpy.ObjectMeshHolder.

◆ setDualMarchingCubes()

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

◆ setIsoValue()

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

◆ setMaxSurfaceVertices()

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

◆ setSerializeFormat()

None meshlib.mrmeshpy.ObjectVoxels.setSerializeFormat ( self,
str newFormat )
sets file extension used to serialize the voxels: must be not null and must start from '.'

◆ setVolumeRenderActiveVoxels()

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

◆ setVolumeRenderingParams()

None meshlib.mrmeshpy.ObjectVoxels.setVolumeRenderingParams ( self,
ObjectVoxels.VolumeRenderingParams params )

◆ setVoxelPointPositioner()

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

◆ shallowClone()

Object meshlib.mrmeshpy.ObjectVoxels.shallowClone ( self)
clones this object only, without its children,
making new object to share resources with this object

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ surface()

Mesh meshlib.mrmeshpy.ObjectVoxels.surface ( self)
Returns iso surface, empty if iso value is not set

◆ TypeName()

str meshlib.mrmeshpy.ObjectVoxels.TypeName ( )
static
return name of subtype for serialization purposes

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ typeName()

str meshlib.mrmeshpy.ObjectVoxels.typeName ( self)

Reimplemented from meshlib.mrmeshpy.ObjectMeshHolder.

◆ updateHistogram()

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

◆ updateHistogramAndSurface()

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

◆ updateIsoSurface()

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

◆ updateVdbVolume()

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

◆ varVdbVolume()

VdbVolume meshlib.mrmeshpy.ObjectVoxels.varVdbVolume ( self)

◆ vdbVolume()

VdbVolume meshlib.mrmeshpy.ObjectVoxels.vdbVolume ( self)
Return VdbVolume

◆ voxelSize()

Vector3f meshlib.mrmeshpy.ObjectVoxels.voxelSize ( self)

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