Class PointCloudDataHandler<TGpuData, TPoint>
Manages the caching and loading of point and mesh data.
Inheritance
Inherited Members
Namespace: Fusee.PointCloud.Core
Assembly: Fusee.PointCloud.Core.dll
Syntax
public class PointCloudDataHandler<TGpuData, TPoint> : PointCloudDataHandlerBase<TGpuData> where TGpuData : IDisposable where TPoint : new()
Type Parameters
Name | Description |
---|---|
TGpuData | |
TPoint |
Constructors
PointCloudDataHandler(PointAccessor<TPoint>, CreateGpuData<TGpuData, TPoint>, LoadPointsHandler<TPoint>, Boolean)
Creates a new instance.
Declaration
public PointCloudDataHandler(PointAccessor<TPoint> pointAccessor, CreateGpuData<TGpuData, TPoint> createMeshHandler, LoadPointsHandler<TPoint> loadPointsHandler, bool doRenderInstanced = false)
Parameters
Type | Name | Description |
---|---|---|
PointAccessor<TPoint> | pointAccessor | The point accessor that allows to access the point data. |
CreateGpuData<TGpuData, TPoint> | createMeshHandler | Method that knows how to create a mesh for the explicit point type (see MeshMaker). |
LoadPointsHandler<TPoint> | loadPointsHandler | The method that is able to load the points from the hard drive/file. |
System.Boolean | doRenderInstanced |
Methods
GetGpuData(OctantId)
First looks in the mesh cache, if there are meshes return, else look in the DisposeQueue, if there are meshes return, else look in the point cache, if there are points create a mesh and add to the _meshCache.
Declaration
public override IEnumerable<TGpuData> GetGpuData(OctantId octantId)
Parameters
Type | Name | Description |
---|---|---|
OctantId | octantId | The unique id of an octant. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TGpuData> |
Overrides
ProcessDisposeQueue()
Disposes of unused meshes, if needed. Depends on the dispose rate and the expiration frequency of the _meshCache.
Declaration
public override void ProcessDisposeQueue()
Overrides
TriggerPointLoading(OctantId)
Loads points from the hard drive if they are neither in the loading queue nor in the PointCahce.
Declaration
public override void TriggerPointLoading(OctantId guid)
Parameters
Type | Name | Description |
---|---|---|
OctantId | guid | The octant for which the points should be loaded. |