CVBpy 14.0
Mesh Class Reference

3D mesh object consisting of polygons. More...

Inherits object.

Public Member Functions

Iterator[cvb.Polygon3Das_polygons (self)
 Gets the iterator. More...
 
cvb.Cuboid calculate_bounding_box (self)
 Calculates the minimum and maximum extent of the mesh. More...
 
cvb.Point3D point_at (self, int index)
 Gets the point at the specified index. More...
 
List[int] polygon_indices_at (self, int index)
 Gets point indices for a polygon. More...
 
cvb.DensePointCloud raster_dense_point_cloud (self, cvb.Matrix3D camera_rotation, cvb.Point3D camera_translation, float x_res_increment, float y_res_increment)
 Rasters this mesh into a dense point cloud and stores the result. More...
 
None raster_dense_point_cloud_to_dst (self, cvb.Matrix3D camera_rotation, cvb.Point3D camera_translation, cvb.DensePointCloud dense_cloud)
 Rasters this mesh into a dense point cloud and stores the result. More...
 

Properties

 num_points = property
 int: Get the number of points in this mesh.
 
 num_polygons = property
 int: Get the number of polygons in this mesh.
 

Detailed Description

3D mesh object consisting of polygons.

Loads a mesh from file.

Parameters

file_name : str File to load.

Member Function Documentation

◆ as_polygons()

Iterator[cvb.Polygon3D] as_polygons (   self)

Gets the iterator.

Returns

Iterator[cvb.Polygon3D] Mesh iterator object.

◆ calculate_bounding_box()

cvb.Cuboid calculate_bounding_box (   self)

Calculates the minimum and maximum extent of the mesh.

Returns

cvb.Cuboid The variable to receive the extent.

◆ point_at()

cvb.Point3D point_at (   self,
int  index 
)

Gets the point at the specified index.

Parameters

index : int The index.

Returns

cvb.Point3D A 3D point.

◆ polygon_indices_at()

List[int] polygon_indices_at (   self,
int  index 
)

Gets point indices for a polygon.

Parameters

index : int The index.

Returns

List[int] A list with the indices.

◆ raster_dense_point_cloud()

cvb.DensePointCloud raster_dense_point_cloud (   self,
cvb.Matrix3D  camera_rotation,
cvb.Point3D  camera_translation,
float  x_res_increment,
float  y_res_increment 
)

Rasters this mesh into a dense point cloud and stores the result.

Parameters

camera_rotation : cvb.Matrix3D Rotation matrix for the camera.

camera_translation : cvb.Point3D Translation vector for the camera.

x_res_increment : float The pixel size in x-direction.

y_res_increment : float The pixel size in y-direction.

Returns

cvb.DensePointCloud A dense point cloud with the rastered mesh.

◆ raster_dense_point_cloud_to_dst()

None raster_dense_point_cloud_to_dst (   self,
cvb.Matrix3D  camera_rotation,
cvb.Point3D  camera_translation,
cvb.DensePointCloud  dense_cloud 
)

Rasters this mesh into a dense point cloud and stores the result.

Parameters

camera_rotation : cvb.Matrix3D Rotation matrix for the camera.

camera_translation : cvb.Point3D Translation vector for the camera.

dense_cloud : cvb.DensePointCloud Dense point cloud to store the rastered mesh in.