Class SceneSampler
This class provide a common interface and functionality for all type of samplers.
Inherited Members
Namespace: Mechatronics.SensorSDK
Assembly: solution.dll
Syntax
public abstract class SceneSampler
Constructors
| Name | Description |
|---|---|
| SceneSampler(IPhotosensorArrayDescription, SceneSamplerDesc) | At construction, the sampler registers event handlers to update exposure time and gain. |
Fields
| Name | Description |
|---|---|
| _camera | Unity camera used to emulate the photosensor array. |
| _customPassesDesc | Keep a list of custom pass added to the camera volume. Used to hook a unity camera just before the post processing step. We take the buffer and do the post processing step ourself in the graph. |
| _isSamplingRequested | Indicate that the photosensor array received a sampling request from the controller. |
| _outputTexture | The sampled output texture. |
| _samplerDesc | Describe sampler specific information. |
| _samplingRequestCallback | Store the function to call back when the sampling request is completed. |
| _sensorDesc | Describe an array of photosensors on a plane. |
Methods
| Name | Description |
|---|---|
| AsyncSampleScene(Action<CustomPassContext, RenderTexture>) | Used to capture the projected image on the sensor. |
| CreateCameraDescriptor(SceneSamplerDesc, IPhotosensorArrayDescription, LensSystemDesc) | Creates a camera descriptor from the scene sample descriptor. |
| CreateCustomPass(CustomPassInjectionPoint, ExecuteCustomPassAction<CustomPassContext>) | Create hook on the camera to retrieve the output. |
| InternalRelease() | Use by child class to release extra resources. |
| OnCameraSamplingCompleted(CustomPassContext) | Call the request callback with the camera results. |
| OnExposureTimeChanged(float, float) | Sets the amount of time the photosensor is capturing light, in seconds. |
| OnGainChanged(float, float) | Set amplification factor applied to the captured light. |
| Release() | Use to release any resources created for the sampling or delete any game object construction in the scene. |
| SubscribeEventHandlers() | Subscribe handlers that react when the photosensor array description changes. |
| UnsubscribeEventHandlers() | Unsubscribe handlers that react when the photosensor array description changes. |