Leap Motion Controller Image ComponentΒΆ

class ULeapMotionImageComponent

Add this component to any actor to allow image from Leap Motion device’s cameras to be displayed in the background of the scene.

Public Functions

void AttachDisplaySurface()

Called when the display surface is attached to the PlayerCameraManager.

You can overwrite the mesh type and its scene placement here,

UTexture2D * BuildDistortionTextures(const Leap::Image & Image)

Creates the distortion texture resources.

void InitializeComponent()

Called when the component is created.

Creates the dynamic material instance used to display the images and assigns it to the display surface. If the Leap Motion hardware is connected, sets the image policy.

void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction)

Called every game frame.

Updates image textures unless images are paused.

void UpdateDistortionTextures(const Leap::Image & Image, UTexture2D * DistortionTexture)

Updates the distorition textures.

void UpdateImageTexture()

Updates the image and distortion textures using the latest Leap Motion data.

Public Members

bool bIsPaused

Whether the images are updated.

bool bIsVisible

Whether the image is displayed.

UStaticMeshComponent * DisplaySurfaceComponent

The mesh component used as the image display surface.

float DisplaySurfaceDistance

The distance between the PlayerCameraManager and the surface on which the image is displayed.

UTexture2D * DistortionTextureLeft

Texture encoding lens distortion for the left camera.

UTexture2D * DistortionTextureRight

Texture encoding lens distortion for the right camera.

UMaterialInstanceDynamic * DynamicPassthroughMaterial

The dynamic instance of the passthrough material.

UTexture2D * ImagePassthroughLeft

The left raw image from the Leap device.

UTexture2D * ImagePassthroughRight

Right raw image from the Leap device.

UMaterialInterface * PassthroughMaterial

The material template used to display the passthrough image.