Class TofArColorManager
Colorカメラとの接続を管理する
下記機能を有する
- Colorカメラとの接続管理
- Colorデータの取得
- ColorデータのTexture2D変換
- ストリーム開始イベント通知
- ストリーム終了イベント通知
- フレーム到着通知
- 録画ファイルの再生
Inheritance
Inherited Members
Namespace: TofAr.V0.Color
Assembly: TofArColorAssembly.dll
Syntax
public class TofArColorManager : Singleton<TofArColorManager>, IStreamStoppable, IDisposable, IStreamHolder, IDependedManager
Fields
autoStart
trueの場合、アプリケーション開始時に自動的にColorデータのストリームを開始する
Declaration
public bool autoStart
Field Value
Type |
---|
System.Boolean |
SetDefaultStreamDelay
ストリーミングデフォルト遅延設定通知
Declaration
public TofArColorManager.SetDefaultStreamDelayEventHandler SetDefaultStreamDelay
Field Value
Type |
---|
TofArColorManager.SetDefaultStreamDelayEventHandler |
Properties
ColorData
Colorデータ
Declaration
public ColorData ColorData { get; }
Property Value
Type |
---|
ColorData |
ColorTexture
Colorデータを変換したTexture2D
Colorデータが下記フォーマットの場合、Unityがサポートしていないため表示可能なデータは格納されない。
- YUV420
- BGR
Declaration
public Texture2D ColorTexture { get; }
Property Value
Type |
---|
UnityEngine.Texture2D |
DesiredFrameRate
設定希望FPS。設定は次回ストリーミング開始時に有効となる。
Declaration
public float DesiredFrameRate { get; set; }
Property Value
Type |
---|
System.Single |
FrameRate
実測FPS
Declaration
public float FrameRate { get; }
Property Value
Type |
---|
System.Single |
IsColorStarting
ストリーミング起動中のステータス
Declaration
public bool IsColorStarting { get; }
Property Value
Type |
---|
System.Boolean |
IsPlaying
trueの場合、録画ファイルを再生している
Declaration
public bool IsPlaying { get; }
Property Value
Type |
---|
System.Boolean |
IsProcessTexture
trueの場合データのTexture2D変換処理を行っている
Declaration
[Obsolete("IsProcessTexture is deprecated, please use ProcessTexture instead")]
public bool IsProcessTexture { get; }
Property Value
Type |
---|
System.Boolean |
IsStreamActive
trueの場合ストリーミングを行っている
Declaration
public bool IsStreamActive { get; }
Property Value
Type |
---|
System.Boolean |
PhotoColorData
静止画Colorデータ
Declaration
public PhotoColorData PhotoColorData { get; }
Property Value
Type |
---|
PhotoColorData |
PhotoDepthData
静止画Depthデータ
Declaration
public PhotoDepthData PhotoDepthData { get; }
Property Value
Type |
---|
PhotoDepthData |
ProcessTexture
trueの場合データのTexture2D変換処理を行っている
Declaration
public bool ProcessTexture { get; }
Property Value
Type |
---|
System.Boolean |
Stream
ストリーム
Declaration
public Stream Stream { get; }
Property Value
Type |
---|
SensCord.Stream |
StreamDelay
フレーム送出遅延数
Declaration
public int StreamDelay { get; set; }
Property Value
Type |
---|
System.Int32 |
StreamPlay
再生ストリーム
Declaration
public Stream StreamPlay { get; }
Property Value
Type |
---|
SensCord.Stream |
Version
コンポーネントのバージョン番号
Declaration
public string Version { get; }
Property Value
Type |
---|
System.String |
Methods
AddManagerDependency(IDependManager)
依存Managerを追加する
Declaration
public void AddManagerDependency(IDependManager dependManager)
Parameters
Type | Name | Description |
---|---|---|
IDependManager | dependManager | 依存Manager |
Dispose()
オブジェクト破棄
Declaration
public void Dispose()
Dispose(Boolean)
破棄処理
Declaration
public void Dispose(bool ignoreEventRelease)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ignoreEventRelease | trueの場合、イベントハンドラのクリアをスキップする |
GetProperty<T>()
コンポーネントプロパティを取得する
Declaration
public T GetProperty<T>()
where T : class, IBaseProperty, new()
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetProperty<T>(T)
コンポーネントプロパティを取得する。入力パラメータvalueを指定可能。
Declaration
public T GetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetProperty<T>(T, Int32)
シリアライズ用バッファサイズを指定してコンポーネントプロパティを取得する。入力パラメータvalueを指定可能。
Declaration
public T GetProperty<T>(T value, int bufferSize)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
System.Int32 | bufferSize | シリアライズ用バッファサイズ |
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetPropertyList()
Propertyのリストを取得する
Declaration
public string[] GetPropertyList()
Returns
Type | Description |
---|---|
System.String[] | Propertyのリスト |
RegisterColorPreProcessing(IPreProcessColorData)
Colorデータ送出前の処理を登録する
Declaration
public void RegisterColorPreProcessing(IPreProcessColorData preProcessColor)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessColorData | preProcessColor | データ処理クラス |
RemoveManagerDependency(IDependManager)
依存Managerを削除する
Declaration
public void RemoveManagerDependency(IDependManager dependManager)
Parameters
Type | Name | Description |
---|---|---|
IDependManager | dependManager | 依存Manager |
SetProperty(FormatConvertProperty)
コンポーネントプロパティを設定する
Declaration
public void SetProperty(FormatConvertProperty value)
Parameters
Type | Name | Description |
---|---|---|
FormatConvertProperty | value | 入力パラメータ |
SetProperty<T>(T)
コンポーネントプロパティを設定する
Declaration
public void SetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
Type Parameters
Name | Description |
---|---|
T | BaseProperty継承クラス |
SetStreamDelayToDefault(IExternalColorStream)
ストリームの遅延設定を設定ファイルから行う
Declaration
public void SetStreamDelayToDefault(IExternalColorStream externalSource = null)
Parameters
Type | Name | Description |
---|---|---|
IExternalColorStream | externalSource |
StartPlayback(String)
指定されたパス内の録画ファイルの再生を開始する
Declaration
public void StartPlayback(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | 再生する録画ファイルを含むディレクトリのパス |
StartStream(Boolean)
ストリーミングを開始する
Declaration
public void StartStream(bool isProcessTexture = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isProcessTexture | カメラデータのTexture2D変換処理を実施するかどうか |
StartStream(ResolutionProperty, Boolean)
ストリーミングを開始する
Declaration
public void StartStream(ResolutionProperty configuration, bool isProcessTexture = true)
Parameters
Type | Name | Description |
---|---|---|
ResolutionProperty | configuration | ストリーミングで使用する解像度 |
System.Boolean | isProcessTexture | trueの場合、カメラデータのTexture2D変換処理を実施する |
StartStream(ResolutionProperty, List<IColorMetadataProperty>, Boolean)
ストリーミングを開始する
Declaration
public void StartStream(ResolutionProperty configuration, List<IColorMetadataProperty> metadataProperties, bool isProcessTexture = true)
Parameters
Type | Name | Description |
---|---|---|
ResolutionProperty | configuration | ストリーミングで使用する解像度 |
System.Collections.Generic.List<TofAr.V0.Color.IColorMetadataProperty> | metadataProperties | ストリーミングで使用するメタデータ |
System.Boolean | isProcessTexture | trueの場合、カメラデータのTexture2D変換処理を実施する |
StopPlayback()
録画ファイルの再生を停止する
Declaration
public void StopPlayback()
StopStream()
ストリーミングを停止する
Declaration
public void StopStream()
StopStream(Boolean)
ストリーミングを停止する
Declaration
public void StopStream(bool isRestart = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isRestart | trueの場合はストリームを中止してすぐ再起動する、falseの場合は再起動せずに終了する |
UnregisterColorPreProcessing(IPreProcessColorData)
登録されたColorデータ送出前の処理を登録解除する
Declaration
public void UnregisterColorPreProcessing(IPreProcessColorData preProcessColor)
Parameters
Type | Name | Description |
---|---|---|
IPreProcessColorData | preProcessColor | データ処理クラス |
Events
OnApplicationPausing
アプリケーション一時停止開始時
Declaration
public static event TofArColorManager.ApplicationPausingEventHandler OnApplicationPausing
Event Type
Type | Description |
---|---|
TofArColorManager.ApplicationPausingEventHandler |
OnApplicationResuming
アプリケーション復帰開始時
Declaration
public static event TofArColorManager.ApplicationResumingEventHandler OnApplicationResuming
Event Type
Type | Description |
---|---|
TofArColorManager.ApplicationResumingEventHandler |
OnAvailableResolutionsChanged
解像度の変更通知
Declaration
public static event TofArColorManager.AvailableResolutionsChanged OnAvailableResolutionsChanged
Event Type
Type | Description |
---|---|
TofArColorManager.AvailableResolutionsChanged |
OnFrameArrived
新しいフレームの到着通知
Declaration
public static event TofArColorManager.FrameArrivedEventHandler OnFrameArrived
Event Type
Type | Description |
---|---|
TofArColorManager.FrameArrivedEventHandler |
OnPhotoFrameArrived
撮影静止画フレームの到着通知
Declaration
public static event TofArColorManager.PhotoFrameArrivedEventHandler OnPhotoFrameArrived
Event Type
Type | Description |
---|---|
TofArColorManager.PhotoFrameArrivedEventHandler |
OnStreamStarted
ストリーミング開始通知
Declaration
public static event TofArColorManager.StreamStartedEventHandler OnStreamStarted
Event Type
Type | Description |
---|---|
TofArColorManager.StreamStartedEventHandler |
OnStreamStopped
ストリーミング終了通知
Declaration
public static event TofArColorManager.StreamStoppedEventHandler OnStreamStopped
Event Type
Type | Description |
---|---|
TofArColorManager.StreamStoppedEventHandler |