SBMesh#
This class describes a mesh, that is, a collection of one or more surfaces belonging to a visual model.
Meshes expose geometry and transform-related functionality, while individual surfaces store the triangle and texture data used for rendering.
- class samson.SBMesh(*args, **kwargs)#
Bases:
SBVisualModelThis class describes a mesh, i.e. a group of surfaces.
Overloaded function.
__init__(self: samson.SBMesh) -> None
Constructs a mesh
__init__(self: samson.SBMesh, surfaceVector: list[samson.SBSurface]) -> None
Constructs a mesh from a vector of surfaces.
- Parameters:
surfaceVector (list[samson.SBSurface]) – The vector of surfaces used to initialize the mesh.
- getDefaultDiffuseColorReplacement(self: samson.SBMesh) int#
Returns the default diffuse color replacement of the mesh
- getDefaultScale(self: samson.SBMesh) samson.SBPhysicalVector3#
Returns the default scale of the mesh
- getMaximumDiffuseColorReplacement(self: samson.SBMesh) int#
Returns the maximum diffuse color replacement of the mesh
- getMinimumDiffuseColorReplacement(self: samson.SBMesh) int#
Returns the minimum diffuse color replacement of the mesh
- getNextMesh(self: samson.SBMesh) samson.SBMesh#
Returns the next mesh in the parent.
- getOrientation(self: samson.SBMesh) samson.SBPhysicalMatrix33#
Returns the orientation of the mesh
- getPosition(self: samson.SBMesh) samson.SBPhysicalVector3#
Returns the position of the mesh
- getPreviousMesh(self: samson.SBMesh) samson.SBMesh#
Returns the previous mesh in the parent.
- getScale(self: samson.SBMesh) samson.SBPhysicalVector3#
Returns the scale of the mesh
- getSurfaces(self: samson.SBMesh) list[samson.SBSurface]#
Returns the list of surfaces
- getTransform(self: samson.SBMesh) samson.SBSpatialTransform#
Returns the spatial transform of the mesh
- hasDiffuseColorReplacementRange(self: samson.SBMesh) bool#
Returns whether the mesh has a [min, max] range for the diffuse color replacement value
- rotate(self: samson.SBMesh, axis: samson.SBPhysicalVector3, angle: samson.SBQuantity.unitsSI) None#
Rotates the mesh
- scale(self: samson.SBMesh, scale: samson.SBPhysicalVector3) None#
Scales the mesh
- setOrientation(self: samson.SBMesh, orientation: samson.SBPhysicalMatrix33) None#
Sets the orientation of the mesh
- setPosition(self: samson.SBMesh, position: samson.SBPhysicalVector3) None#
Sets the position of the mesh
- setScale(self: samson.SBMesh, scale: samson.SBPhysicalVector3) None#
Sets the scale of the mesh
- setTransform(self: samson.SBMesh, transform: samson.SBSpatialTransform) None#
Sets the spatial transform of the mesh
- transform(self: samson.SBMesh, transform: samson.SBSpatialTransform) None#
Applies a spatial transform to the mesh
- translate(self: samson.SBMesh, translation: samson.SBPhysicalVector3) None#
Translates the mesh
- property diffuseColorReplacement#
Diffuse color replacement value used for rendering.