Table of Contents

Class CameraImageRenderer

名前空間
easyar
アセンブリ
EasyAR.Sense.dll

シーン内でカメラ画像のレンダリングを制御するMonoBehaviour。sessionのframe sourceIsCameraUnderControlがtrueの場合のみ有効。

[DisallowMultipleComponent]
public class CameraImageRenderer : MonoBehaviour
継承
CameraImageRenderer

メソッド

DropTargetTexture(Action<Camera, RenderTexture>)

カメラ画像を描画するためのリリースRenderTexture。内部リソースはすべてのホルダーが解放された後に解放されます。

public void DropTargetTexture(Action<Camera, RenderTexture> targetTextureEventHandler)

パラメーター

targetTextureEventHandler

RequestTargetTexture(Action<Camera, RenderTexture>)

カメラ画像を取得するRenderTexture

このインターフェースを通じて取得したテクスチャは、easyar.OutputFrameから取得したフルサイズの画像であり、画面クリッピングされていません。targetTextureEventHandler actionはRenderTextureおよびテクスチャを描画するために使用されるCameraを出力します。このアクションはフレームごとに呼び出されることはなく、カメラ画像データが変更されたときにも呼び出されません。テクスチャ自体が作成または変更されたときにのみ発生します。このメソッドを呼び出すと追加のリソースが作成され、必要に応じてレンダリングがトリガーされるため、使用しないときはDropTargetTexture(Action<Camera, RenderTexture>)を呼び出してリソースを解放する必要があります。

public void RequestTargetTexture(Action<Camera, RenderTexture> targetTextureEventHandler)

パラメーター

targetTextureEventHandler

イベント

OnFrameRenderUpdate

カメラ画像レンダリング更新イベント。このイベントは、現在カメラ画像レンダリングに使用されているマテリアルとテクスチャサイズを出力します。このイベントが発生したとき、カメラ画像自体が必ずしも変更されるわけではなく、レンダリングが1回発生したことを示すだけです。

public event Action<Material, Vector2> OnFrameRenderUpdate