| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/Lumin/MagicLeapCamera/Source/MagicLeapCamera/Public/MagicLeapCameraComponent.h |
Include |
#include "MagicLeapCameraComponent.h" |
[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(ClassGroup=MagicLeap, BlueprintType, Blueprintable, EditInlineNew,
Meta=(BlueprintSpawnableComponent))
class UMagicLeapCameraComponent : public UActorComponent
The MagicLeapCameraComponent provides access to and maintains state for camera capture functionality. The connection to the device's camera is managed internally. Users of this component are able to asynchronously capture camera images and footage to file. Alternatively, a camera image can be captured directly to texture. The user need only make the relevant asynchronous call and then register the appropriate event handlers for the operation's completion.
Name | Description | ||
---|---|---|---|
|
CaptureImageToFileAsync() |
The newly created jpeg file will have an automatically generated name which is guaranteed to be unique. Upon completion, a successful operation will provide the file path of the newly created jpeg to the FMagicLeapCameraCaptureImgToFile event handler. |
|
|
CaptureImageToTextureAsync() |
The user should register event handlers for both the success and fail events. Upon completion, a successful operation will provide a dynamically generated texture containing the captured image to the FMagicLeapCameraCaptureImgToTextureSuccess event handler. |
|
|
IsCapturing() |
Gets the capture state of the component. |
|
|
StartRecordingAsync() |
Initiates the capturing of video/audio data on a separate thread. |
|
|
StopRecordingAsync() |
Stops the recording and saves the video/audio data to an mp4 file. |
Name | Description | ||
---|---|---|---|
|
BeginPlay() |
Notifies the MagicLeapCameraPlugin of a new user. |
|
|
EndPlay ( |
Notifies the MagicLeapCameraPlugin that a user is being destroyed (needed for auto-disconnecting the camera). |