CVB.Net 14.0
Mesh< T > Class Template Reference

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

Inherits INativeHandle.

Public Member Functions

void Dispose ()
 IDisposable implementation.
 
IEnumerable< PointType > TryGetPointsAs< PointType > ()
 Tries to get the points of this mesh. More...
 
IEnumerable< int[]> GetPolygonIndices ()
 Gets the point indices of the polygons in this mesh. More...
 
IEnumerable< Polygon3D< T > > GetPolygons ()
 Gets the polygons of this mesh. More...
 
unsafe void RasterToDensePointCloud (Matrix3D cameraRotation, Point3Dd cameraTranslation, DensePointCloud denseCloud)
 Rasters this mesh into a zbuffer and stores the result into the given denseCloud . More...
 
unsafe DensePointCloud RasterToDensePointCloud (Matrix3D cameraRotation, Point3Dd cameraTranslation, double xResIncrement, double yResIncrement)
 Rasters this mesh into a zbuffer and stores the result in a newly created DensePointCloud. More...
 

Static Public Member Functions

static Mesh< T > FromFile (string file)
 Loads a mesh from file. More...
 
static Mesh< T > FromHandle (IntPtr handle)
 Creates a mesh from the given handle . More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 IDisposable helper function. More...
 

Properties

long NumPolygons [get]
 Number of polygons this mesh has.
 
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method. More...
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

3D mesh object consisting of polygons.

Type Constraints
T :struct 

Member Function Documentation

◆ Dispose()

virtual void Dispose ( bool  disposing)
protectedvirtual

IDisposable helper function.

Parameters
disposing

◆ FromFile()

static Mesh< T > FromFile ( string  file)
static

Loads a mesh from file.

Parameters
fileFile to load.
Returns
Created mesh from the given file .

◆ FromHandle()

static Mesh< T > FromHandle ( IntPtr  handle)
static

Creates a mesh from the given handle .

Parameters
handle
Returns
Created mesh.

◆ GetPolygonIndices()

IEnumerable< int[]> GetPolygonIndices ( )

Gets the point indices of the polygons in this mesh.

Returns
Point indices of the polygons in this mesh

◆ GetPolygons()

IEnumerable< Polygon3D< T > > GetPolygons ( )

Gets the polygons of this mesh.

Returns
Polygon iterator.

◆ RasterToDensePointCloud() [1/2]

unsafe void RasterToDensePointCloud ( Matrix3D  cameraRotation,
Point3Dd  cameraTranslation,
DensePointCloud  denseCloud 
)

Rasters this mesh into a zbuffer and stores the result into the given denseCloud .

Parameters
cameraRotationRotation matrix for the camera.
cameraTranslationTranslation vector for the camera.
denseCloudDense point cloud to store the rastered mesh in.

◆ RasterToDensePointCloud() [2/2]

unsafe DensePointCloud RasterToDensePointCloud ( Matrix3D  cameraRotation,
Point3Dd  cameraTranslation,
double  xResIncrement,
double  yResIncrement 
)

Rasters this mesh into a zbuffer and stores the result in a newly created DensePointCloud.

Parameters
cameraRotationRotation matrix for the camera.
cameraTranslationTranslation vector for the camera.
xResIncrementThe pixel size in x-direction.
yResIncrementThe pixel size in y-direction.
Returns
A new dense pointcloud that is filled with the rastered mesh.

◆ TryGetPointsAs< PointType >()

IEnumerable< PointType > TryGetPointsAs< PointType > ( )

Tries to get the points of this mesh.

Template Parameters
PointTypeType of the points to get.
Returns
The points of the mesh. Empty if points could not be gotten.
Type Constraints
PointType :struct 

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.