EnableWorldLock
: bool |
When world locking is enabled the position of the VR Pawn will be adjusted each frame to ensure the room anchors are where they should be relative to the camera position. This is necessary to ensure the position of the virtual objects in the world do not get out of sync with the real world.
Signature
bool UMRUKSubsystem::EnableWorldLock |
OnCaptureComplete
: FOnCaptureComplete |
An event that will trigger when the capture flow completed. The Success parameter indicates whether the scene was captured successfully or not.
Signature
FOnCaptureComplete UMRUKSubsystem::OnCaptureComplete |
OnRoomCreated
: FOnRoomCreated |
An event that gets fired after a room has been created.
Signature
FOnRoomCreated UMRUKSubsystem::OnRoomCreated |
OnRoomEntered
: FOnRoomEntered |
Event that gets fired if the user enters this room. This is a system level event that gets only fired when working with room data that was loaded from the device. E.g. it will not fire on rooms that were loaded from JSON. This means that it may not be in sync with UMRUKSubsystem::GetCurrentRoom().
Signature
FOnRoomEntered UMRUKSubsystem::OnRoomEntered |
OnRoomExited
: FOnRoomExited |
Event that gets fired if the user exit this room. This is a system level event that gets only fired when working with room data that was loaded from the device. E.g. it will not fire on rooms that were loaded from JSON. This means that it may not be in sync with UMRUKSubsystem::GetCurrentRoom().
Signature
FOnRoomExited UMRUKSubsystem::OnRoomExited |
OnRoomRemoved
: FOnRoomRemoved |
An event that gets fired when a room gets removed.
Signature
FOnRoomRemoved UMRUKSubsystem::OnRoomRemoved |
OnRoomUpdated
: FOnRoomUpdated |
An event that gets fired after a room has been updated.
Signature
FOnRoomUpdated UMRUKSubsystem::OnRoomUpdated |
OnSceneLoaded
: FOnLoaded |
An event that will trigger when a scene is loaded either from Device or from JSON. The Success parameter indicates whether the scene was loaded successfully or not.
Signature
FOnLoaded UMRUKSubsystem::OnSceneLoaded |
Rooms
: TArray< TObjectPtr< AMRUKRoom > > |
Contains a list of rooms that are tracked by the mixed reality utility kit subsystem.
Signature
TArray<TObjectPtr<AMRUKRoom> > UMRUKSubsystem::Rooms |
SceneLoadStatus
: EMRUKInitStatus |
The status of the scene loading. When loading from device this is an asynchronous process so will be in the Busy state until it moves to Complete or Failed.
Signature
EMRUKInitStatus UMRUKSubsystem::SceneLoadStatus |
ClearScene
()
|
Removes and clears every room.
Signature
void UMRUKSubsystem::ClearScene() Returns void |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnLoaded, bool, Success) Parameters FOnLoadedboolSuccess |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnCaptureComplete, bool, Success) Parameters FOnCaptureCompleteboolSuccess |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRoomCreated, AMRUKRoom *, Room) Parameters |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRoomUpdated, AMRUKRoom *, Room) Parameters |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRoomRemoved, AMRUKRoom *, Room) Parameters |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRoomEntered, AMRUKRoom *, Room) Parameters |
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam
()
|
Signature
UMRUKSubsystem::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRoomExited, AMRUKRoom *, Room) Parameters |
GetActorClassBounds
(
Actor
)
|
Signature
FBox UMRUKSubsystem::GetActorClassBounds(TSubclassOf< AActor > Actor) Parameters Actor: TSubclassOf< AActor >Returns FBox |
GetBestPoseFromRaycast
(
RayOrigin
, RayDirection
, MaxDist
, LabelFilter
, OutPose
, PositioningMethod
)
|
Get a suggested pose (position & rotation) from a raycast to place objects on surfaces in the scene. There are different positioning modes available. Default just uses the position where the raycast hit the object. Edge snaps the position to the edge that is nearest to the user and Center simply centers the position on top of the surface.
Signature
AMRUKAnchor * UMRUKSubsystem::GetBestPoseFromRaycast(const FVector &RayOrigin, const FVector &RayDirection, double MaxDist, const FMRUKLabelFilter &LabelFilter, FTransform &OutPose, EMRUKPositioningMethod PositioningMethod=EMRUKPositioningMethod::Default) Parameters RayOrigin: const FVector &Â
The origin of the ray.
RayDirection: const FVector &Â
The direction of the ray.
MaxDist: doubleÂ
The maximum distance the ray should travel.
LabelFilter: const FMRUKLabelFilter &Â
The label filter can be used to include/exclude certain labels from the search.
OutPose: FTransform &Â
The calculated pose.
PositioningMethod: EMRUKPositioningMethodÂ
The method that should be used for determining the position on the surface.
|
GetCurrentRoom
()
|
Return the room that the headset is currently in. If the headset is not in any given room then it will return the room the headset was last in when this function was called. If the headset hasn't been in a valid room yet then return the first room in the list. If no rooms have been loaded yet then return null.
Signature
AMRUKRoom * UMRUKSubsystem::GetCurrentRoom() const Returns AMRUKRoom * |
GetKeyWall
(
Tolerance
)
|
Return the longest wall in the current room that has no other walls behind it.
Signature
AMRUKAnchor * UMRUKSubsystem::GetKeyWall(double Tolerance=0.1) Parameters Tolerance: doubleÂ
The tolerance to use when determining wall that are behind.
|
GetLargestSurface
(
Label
)
|
Return the largest surface for a given label in the current room.
Signature
AMRUKAnchor * UMRUKSubsystem::GetLargestSurface(const FString &Label) Parameters Label: const FString &Â
The label of the surfaces to search in.
|
GetRoomLayoutManager
()
|
Signature
UOculusXRRoomLayoutManagerComponent * UMRUKSubsystem::GetRoomLayoutManager() Returns UOculusXRRoomLayoutManagerComponent * |
Initialize
(
Collection
)
|
Signature
void UMRUKSubsystem::Initialize(FSubsystemCollectionBase &Collection) override Parameters Collection: FSubsystemCollectionBase &Returns void |
IsPositionInSceneVolume
(
WorldPosition
, TestVerticalBounds
, Tolerance
)
|
Checks if the given position is on or inside of any scene volume in the rooms. All rooms will be checked and the first anchors scene volume that has the point on or inside it will be returned.
Signature
AMRUKAnchor * UMRUKSubsystem::IsPositionInSceneVolume(const FVector &WorldPosition, bool TestVerticalBounds=true, double Tolerance=0.0) Parameters WorldPosition: const FVector &Â
The position in world space to check
TestVerticalBounds: boolÂ
Whether the vertical bounds should be checked or not
Tolerance: doubleÂ
Tolerance
|
JsonSerialize
()
|
Signature
TSharedRef< FJsonObject > UMRUKSubsystem::JsonSerialize() Returns TSharedRef< FJsonObject > |
LaunchSceneCapture
()
|
Launch the scene capture. After a successful capture the scene should be updated.
Signature
bool UMRUKSubsystem::LaunchSceneCapture() Returns boolÂ
Whether the capture was successful.
|
LoadSceneFromDevice
(
MaxQueries
)
|
Load rooms and anchors from the device. If the scene is already loaded the scene will be updated with the changes.
Signature
void UMRUKSubsystem::LoadSceneFromDevice(int MaxQueries=64) Parameters MaxQueries: intReturns void |
LoadSceneFromJsonString
(
String
)
|
Load rooms and anchors from a JSON representation. If the scene is already loaded the scene will be updated with the changes.
Signature
void UMRUKSubsystem::LoadSceneFromJsonString(const FString &String) Parameters String: const FString &Returns void |
Raycast
(
Origin
, Direction
, MaxDist
, LabelFilter
, OutHit
)
|
Cast a ray and return the closest hit anchor in the scene.
Signature
AMRUKAnchor * UMRUKSubsystem::Raycast(const FVector &Origin, const FVector &Direction, float MaxDist, const FMRUKLabelFilter &LabelFilter, FMRUKHit &OutHit) Parameters Origin: const FVector &Â
Origin The origin of the ray.
Direction: const FVector &Â
Direction The direction of the ray.
MaxDist: floatÂ
The maximum distance the ray should travel.
LabelFilter: const FMRUKLabelFilter &Â
The label filter can be used to include/exclude certain labels from the search.
|
RaycastAll
(
Origin
, Direction
, MaxDist
, LabelFilter
, OutHits
, OutAnchors
)
|
Cast a ray and collect hits against the volumes and plane bounds in every room in the scene. The order of the hits in the array is not specified.
Signature
bool UMRUKSubsystem::RaycastAll(const FVector &Origin, const FVector &Direction, float MaxDist, const FMRUKLabelFilter &LabelFilter, TArray< FMRUKHit > &OutHits, TArray< AMRUKAnchor * > &OutAnchors) Parameters Origin: const FVector &Â
Origin The origin of the ray.
Direction: const FVector &Â
Direction The direction of the ray.
MaxDist: floatÂ
The maximum distance the ray should travel.
LabelFilter: const FMRUKLabelFilter &Â
The label filter can be used to include/exclude certain labels from the search.
OutAnchors: TArray< AMRUKAnchor * > &Â
The anchors that were hit. Each anchor in this array corresponds to a entry at the same position in OutHits.
Returns boolÂ
Whether the ray hit anything
|
SaveSceneToJsonString
()
|
Save all rooms and anchors to JSON. This JSON representation can than later be used by LoadSceneFromJsonString() to load the scene again.
Signature
FString UMRUKSubsystem::SaveSceneToJsonString() Returns FStringÂ
the JSON string.
|
SpawnInterior
(
SpawnGroups
, CutHoleLabels
, ProceduralMaterial
, ShouldFallbackToProcedural
)
|
Spawn meshes on the position of the anchors of each room. The actors should have Z as up Y as right and X as forward. The pivot point should be in the bottom center.
Signature
TArray< AActor * > UMRUKSubsystem::SpawnInterior(const TMap< FString, FMRUKSpawnGroup > &SpawnGroups, const TArray< FString > &CutHoleLabels, UMaterialInterface *ProceduralMaterial=nullptr, bool ShouldFallbackToProcedural=true) Parameters SpawnGroups: const TMap< FString, FMRUKSpawnGroup > &Â
A map which tells to spawn which actor to a given label.
CutHoleLabels: const TArray< FString > &Â
Labels for which the generated mesh should have holes. Only works with planes.
ProceduralMaterial: UMaterialInterface *Â
Material to apply on top of the procedural mesh if any.
ShouldFallbackToProcedural: boolÂ
Whether or not it should by default fallback to generating a procedural mesh if no actor class has been specified for a label.
Returns TArray< AActor * >Â
The spawned actors.
|
SpawnInteriorFromStream
(
SpawnGroups
, RandomStream
, CutHoleLabels
, ProceduralMaterial
, ShouldFallbackToProcedural
)
|
Spawn meshes on the position of the anchors of each room from a random stream. The actors should have Z as up Y as right and X as forward. The pivot point should be in the bottom center.
Signature
TArray< AActor * > UMRUKSubsystem::SpawnInteriorFromStream(const TMap< FString, FMRUKSpawnGroup > &SpawnGroups, const FRandomStream &RandomStream, const TArray< FString > &CutHoleLabels, UMaterialInterface *ProceduralMaterial=nullptr, bool ShouldFallbackToProcedural=true) Parameters SpawnGroups: const TMap< FString, FMRUKSpawnGroup > &Â
A map which tells to spawn which actor to a given label.
RandomStream: const FRandomStream &Â
A random generator to choose randomly between actor classes if there a multiple for one label.
CutHoleLabels: const TArray< FString > &Â
Labels for which the generated mesh should have holes. Only works with planes.
ProceduralMaterial: UMaterialInterface *Â
Material to apply on top of the procedural mesh if any.
ShouldFallbackToProcedural: boolÂ
Whether or not it should by default fallback to generating a procedural mesh if no actor class has been specified for a label.
Returns TArray< AActor * >Â
The spawned actors.
|
TryGetClosestSeatPose
(
RayOrigin
, RayDirection
, OutSeatTransform
)
|
Finds the closest seat given a ray.
Signature
AMRUKAnchor * UMRUKSubsystem::TryGetClosestSeatPose(const FVector &RayOrigin, const FVector &RayDirection, FTransform &OutSeatTransform) Parameters RayOrigin: const FVector &Â
The origin of the ray.
RayDirection: const FVector &Â
The direction of the ray.
OutSeatTransform: FTransform &Â
The seat pose.
Returns AMRUKAnchor *Â
If any seat was found the Anchor that has seats available will be returned. Otherwise a null pointer.
|
TryGetClosestSurfacePosition
(
WorldPosition
, OutSurfacePosition
, LabelFilter
, MaxDistance
)
|
Get the position on the surface that is closest to the given position with respect to the distance in all rooms.
Signature
AMRUKAnchor * UMRUKSubsystem::TryGetClosestSurfacePosition(const FVector &WorldPosition, FVector &OutSurfacePosition, const FMRUKLabelFilter &LabelFilter, double MaxDistance=0.0) Parameters WorldPosition: const FVector &Â
The position in world space from which the closest surface point should be found.
OutSurfacePosition: FVector &Â
The closest position on the closest surface if any. Otherwise zero.
LabelFilter: const FMRUKLabelFilter &Â
The label filter can be used to include/exclude certain labels from the search.
MaxDistance: doubleÂ
The distance to which a closest surface position should be searched. Everything below or equal to zero will be treated as infinity.
Returns AMRUKAnchor *Â
The Anchor on which the closest surface position was found or a null pointer otherwise.
|
UnregisterRoom
(
Room
)
|
Signature
void UMRUKSubsystem::UnregisterRoom(AMRUKRoom *Room) Parameters Room: AMRUKRoom *Returns void |