Class TofArMeshManager
Manage the connection with TofAr Mesh component
Has the following functions
- Set Mesh generation parameter
- Get Mesh data
- Notice on (data) stream starting event
- Notice on (data) stream ending event
- Notice on arrival of frame
- Playback of recording file
Inheritance
Inherited Members
Namespace: TofAr.V0.Mesh
Assembly: TofArMeshAssembly.dll
Syntax
public class TofArMeshManager : Singleton<TofArMeshManager>, IStreamStoppable, IDisposable, IStreamHolder, IDependManager
Fields
autoStart
If true, Mesh data stream will automatically start when the application is started
Declaration
public bool autoStart
Field Value
Type |
---|
System.Boolean |
Properties
FrameRate
Actual FPS
Declaration
public float FrameRate { get; }
Property Value
Type |
---|
System.Single |
IsPlaying
True if recording file is being played
Declaration
public bool IsPlaying { get; }
Property Value
Type |
---|
System.Boolean |
IsStreamActive
If true, it is streaming
Declaration
public bool IsStreamActive { get; }
Property Value
Type |
---|
System.Boolean |
MeshData
Latest Mesh data
Declaration
public MeshData MeshData { get; }
Property Value
Type |
---|
MeshData |
MeshReductionLevel
Mesh reduction level
0: no reduction
1~: execute reduction
Default=0
Declaration
public int MeshReductionLevel { get; set; }
Property Value
Type |
---|
System.Int32 |
ResetTrianglePeriod
Interval frames for triangle calculation
Default=4
Declaration
public int ResetTrianglePeriod { get; set; }
Property Value
Type |
---|
System.Int32 |
Stream
Stream
Declaration
public Stream Stream { get; }
Property Value
Type |
---|
SensCord.Stream |
StreamPlay
Playback stream
Declaration
public Stream StreamPlay { get; }
Property Value
Type |
---|
SensCord.Stream |
Version
Component version No.
Declaration
public string Version { get; }
Property Value
Type |
---|
System.String |
Methods
Dispose()
Disposal method
Declaration
public void Dispose()
FinalizeRestartStreamByDependManager(Object)
Post-processing of stream restart requested by dependent managers
Declaration
public void FinalizeRestartStreamByDependManager(object requestSource)
Parameters
Type | Name | Description |
---|---|---|
System.Object | requestSource | Requester |
GetProperty<T>()
Get component property
Declaration
public T GetProperty<T>()
where T : class, IBaseProperty, new()
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetProperty<T>(T)
Get property of Component. Input parameter value may be designated.
Declaration
public T GetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetProperty<T>(T, Int32)
Set the size of the serialization buffer and get component properties. Input parameter value may be designated.
Declaration
public T GetProperty<T>(T value, int bufferSize)
where T : class, IBaseProperty, new()
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
System.Int32 | bufferSize | Serialization buffer size |
Returns
Type | Description |
---|---|
T | Property class |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
GetPropertyList()
Get property list
Declaration
public string[] GetPropertyList()
Returns
Type | Description |
---|---|
System.String[] | Property list |
RegisterMeshPreProcessing(IPreProcessMeshData)
Register mesh data preprocessing
Declaration
public void RegisterMeshPreProcessing(IPreProcessMeshData preProcessMesh)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessMeshData | preProcessMesh | Mesh data processing class |
RestartStreamByDependManager(Object)
Restart stream as requested by dependent managers
Declaration
public void RestartStreamByDependManager(object requestSource)
Parameters
Type | Name | Description |
---|---|---|
System.Object | requestSource | Requester |
SetProperty<T>(T)
Set component property
Declaration
public void SetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | Input parameter |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty inherited class |
StartPlayback()
Start playback using ToF stream from recording file being played as source
Declaration
public void StartPlayback()
StartPlayback(String)
Start playback of the recording file from the specified path
Declaration
public void StartPlayback(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Directory path of recording file to playback |
StartStream()
Start streaming
Declaration
public void StartStream()
StartStream(AlgorithmConfigProperty)
Start streaming
Declaration
public void StartStream(AlgorithmConfigProperty configuration)
Parameters
Type | Name | Description |
---|---|---|
AlgorithmConfigProperty | configuration | Mesh generation parameter used for streaming |
StopPlayback()
Stop playback of recording file
Declaration
public void StopPlayback()
StopStream(Object)
Stop streaming
Declaration
public void StopStream(object sender = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Caller object |
UnregisterMeshPreProcessing(IPreProcessMeshData)
Unregister mesh data preprocessing
Declaration
public void UnregisterMeshPreProcessing(IPreProcessMeshData preProcessMesh)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessMeshData | preProcessMesh | Mesh data processing class |
Events
OnApplicationPausing
Application pausing
Declaration
public static event TofArMeshManager.ApplicationPausingEventHandler OnApplicationPausing
Event Type
Type | Description |
---|---|
TofArMeshManager.ApplicationPausingEventHandler |
OnApplicationResuming
Application resuming
Declaration
public static event TofArMeshManager.ApplicationResumingEventHandler OnApplicationResuming
Event Type
Type | Description |
---|---|
TofArMeshManager.ApplicationResumingEventHandler |
OnFrameArrived
Notice on arrival of new frame
Declaration
public static event TofArMeshManager.FrameArrivedEventHandler OnFrameArrived
Event Type
Type | Description |
---|---|
TofArMeshManager.FrameArrivedEventHandler |
OnStreamStarted
Notice on starting of streaming
Declaration
public static event TofArMeshManager.StreamStartedEventHandler OnStreamStarted
Event Type
Type | Description |
---|---|
TofArMeshManager.StreamStartedEventHandler |
OnStreamStopped
Notice on ending of streaming
Declaration
public static event TofArMeshManager.StreamStoppedEventHandler OnStreamStopped
Event Type
Type | Description |
---|---|
TofArMeshManager.StreamStoppedEventHandler |