SpaceHandle[Get] | |
AnchorUUID[Get] | |
FOnAnchorUpdated | OnAnchorUpdated[Get] |
FOnAnchorCreated | OnAnchorCreated[Get] |
FOnAnchorRemoved | OnAnchorRemoved[Get] |
FBox | RoomBounds[Get] |
TArray< FVector > | RoomEdges[Get] |
TObjectPtr< AMRUKAnchor > | FloorAnchor[Get] |
TObjectPtr< AMRUKAnchor > | CeilingAnchor[Get] |
TArray< TObjectPtr< AMRUKAnchor > > | WallAnchors[Get] |
TObjectPtr< AMRUKAnchor > | GlobalMeshAnchor[Get] |
TArray< TObjectPtr< AMRUKAnchor > > | SeatAnchors[Get] |
TArray< TObjectPtr< AMRUKAnchor > > | AllAnchors[Get] |
class | FMRUKSpec ( FMRUKSpec ) |
bool | |
bool | GenerateRandomPositionInRoom ( FVector & OutPosition, float MinDistanceToSurface, bool AvoidVolumes ) |
bool | GenerateRandomPositionInRoomFromStream ( FVector & OutPosition, const FRandomStream & RandomStream, float MinDistanceToSurface, bool AvoidVolumes ) |
bool | GenerateRandomPositionOnSurface ( EMRUKSpawnLocation SpawnLocation, float MinDistanceToEdge, FMRUKLabelFilter LabelFilter, FVector & OutPosition, FVector & OutNormal ) |
Raycast ( const FVector & Origin, const FVector & Direction, float MaxDist, const FMRUKLabelFilter & LabelFilter, FMRUKHit & OutHit ) | |
bool | RaycastAll ( const FVector & Origin, const FVector & Direction, float MaxDist, const FMRUKLabelFilter & LabelFilter, TArray< FMRUKHit > & OutHits, TArray< AMRUKAnchor * > & OutAnchors ) |
void | ClearRoom ( ) |
bool | DoesRoomHave ( const TArray< FString > & Labels ) |
TryGetClosestSurfacePosition ( const FVector & WorldPosition, FVector & OutSurfacePosition, double & OutSurfaceDistance, const FMRUKLabelFilter & LabelFilter, double MaxDistance ) | |
IsPositionInSceneVolume ( const FVector & WorldPosition, bool TestVerticalBounds, double Tolerance ) | |
TryGetClosestSeatPose ( const FVector & RayOrigin, const FVector & RayDirection, FTransform & OutSeatTransform ) | |
TArray< AMRUKAnchor * > | GetAnchorsByLabel ( const FString & Label ) |
GetFirstAnchorByLabel ( const FString & Label ) | |
GetBestPoseFromRaycast ( const FVector & RayOrigin, const FVector & RayDirection, double MaxDist, const FMRUKLabelFilter & LabelFilter, FTransform & OutPose, EMRUKPositioningMethod PositioningMethod ) | |
GetKeyWall ( double Tolerance ) | |
GetLargestSurface ( const FString & Label ) | |
void | AttachProceduralMeshToWalls ( const TArray< FMRUKTexCoordModes > & WallTextureCoordinateModes, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial ) |
TArray< AActor * > | SpawnInterior ( const TMap< FString, FMRUKSpawnGroup > & SpawnGroups, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial, bool ShouldFallbackToProcedural ) |
TArray< AActor * > | SpawnInteriorFromStream ( const TMap< FString, FMRUKSpawnGroup > & SpawnGroups, const FRandomStream & RandomStream, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial, bool ShouldFallbackToProcedural ) |
bool | IsWallAnchor ( AMRUKAnchor * Anchor ) |
void | ComputeWallMeshUVAdjustments ( const TArray< FMRUKTexCoordModes > & WallTextureCoordinateModes, TArray< FMRUKAnchorWithPlaneUVs > & OutAnchorsWithPlaneUVs ) |
bool | LoadGlobalMeshFromDevice ( UMaterialInterface * Material ) |
bool | |
FVector | ComputeCentroid ( double Z ) |
AMRUKRoom ( const FObjectInitializer & ObjectInitializer ) | |
void | EndPlay ( EEndPlayReason::Type Reason ) |
void | LoadFromData ( UMRUKRoomData * RoomData ) |
void | AttachProceduralMeshToWalls ( const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial ) |
void | |
TSharedRef< FJsonObject > | JsonSerialize ( ) |
bool | Corresponds ( UMRUKRoomData * RoomQuery ) |
FOculusXRUInt64 AMRUKRoom::SpaceHandle |
---|
The space handle of this anchor |
FOculusXRUUID AMRUKRoom::AnchorUUID |
---|
The anchors UUID |
FOnAnchorUpdated AMRUKRoom::OnAnchorUpdated |
---|
Event that gets fired if a anchor in this room was updated. E.g. volume or plane changed. |
FOnAnchorCreated AMRUKRoom::OnAnchorCreated |
---|
Event that gets fired if a new anchor was created in this room. |
FOnAnchorRemoved AMRUKRoom::OnAnchorRemoved |
---|
Event that gets fired if a anchor gets removed from this room. |
FBox AMRUKRoom::RoomBounds |
---|
Bounds of the room. |
TArray<FVector> AMRUKRoom::RoomEdges |
---|
Edges of the room. |
TObjectPtr<AMRUKAnchor> AMRUKRoom::FloorAnchor |
---|
The floor anchor of this room. |
TObjectPtr<AMRUKAnchor> AMRUKRoom::CeilingAnchor |
---|
The ceiling anchor of this room. |
TArray<TObjectPtr<AMRUKAnchor> > AMRUKRoom::WallAnchors |
---|
The wall anchors of this room. |
TObjectPtr<AMRUKAnchor> AMRUKRoom::GlobalMeshAnchor |
---|
The global mesh anchor of this room. |
TArray<TObjectPtr<AMRUKAnchor> > AMRUKRoom::SeatAnchors |
---|
All anchors which are possible to sit on. |
TArray<TObjectPtr<AMRUKAnchor> > AMRUKRoom::AllAnchors |
---|
All anchors of this room. |
friend class FMRUKSpec ( FMRUKSpec ) |
---|
No description available.
|
AMRUKRoom::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam ( FOnAnchorUpdated , AMRUKAnchor * , Anchor ) |
---|
No description available.
|
AMRUKRoom::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam ( FOnAnchorCreated , AMRUKAnchor * , Anchor ) |
---|
No description available.
|
AMRUKRoom::DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam ( FOnAnchorRemoved , AMRUKAnchor * , Anchor ) |
---|
No description available.
|
bool AMRUKRoom::IsPositionInRoom ( const FVector & Position, bool TestVerticalBounds ) |
---|
Check whether the position is inside the room or not. Parameters Position The position in world space to check. TestVerticalBoundsWhether the room should be constrained by vertical bounds or not in the check. Returns Whether the position is inside the room or not. |
bool AMRUKRoom::GenerateRandomPositionInRoom ( FVector & OutPosition, float MinDistanceToSurface, bool AvoidVolumes ) |
---|
Generate a uniform random position within the room. Parameters OutPosition Contains the randomly generated position. MinDistanceToSurfaceThe minimum distance between the generated position and the closest surface/volume. AvoidVolumesIf true then the position will not be inside a volume and min distance away from it. Returns Return true if success otherwise false. If this fails it can be because the min distance to surface is too large. |
bool AMRUKRoom::GenerateRandomPositionInRoomFromStream ( FVector & OutPosition, const FRandomStream & RandomStream, float MinDistanceToSurface, bool AvoidVolumes ) |
---|
Generate a uniform random position within the room from a random stream. Parameters OutPosition Contains the randomly generated position. RandomStreamA random generator used to generate the position on the plane. MinDistanceToSurfaceThe minimum distance between the generated position and the closest surface/volume. AvoidVolumesIf true then the position will not be inside a volume and min distance away from it. Returns Return true if success otherwise false. If this fails it can be because the min distance to surface is too large. |
bool AMRUKRoom::GenerateRandomPositionOnSurface ( EMRUKSpawnLocation SpawnLocation, float MinDistanceToEdge, FMRUKLabelFilter LabelFilter, FVector & OutPosition, FVector & OutNormal ) |
---|
Generates a random position on the surface of a given spawn location, while ensuring that the generated position is at least MinDistanceToEdge away from any edges. The LabelFilter parameter allows you to specify which types of surfaces should be considered for generating the random position. Parameters SpawnLocation The location where the random position should be generated. MinDistanceToEdgeThe minimum distance from the edge that the generated position must have. LabelFilterA filter that specifies which types of surfaces should be considered for generating the random position. OutPositionThe generated position. OutNormalThe normal vector of the generated position. Returns A boolean value indicating whether a valid position was found. If no valid position could be found, both OutPosition and OutNormal will be set to zero vectors. |
AMRUKAnchor * AMRUKRoom::Raycast ( const FVector & Origin, const FVector & Direction, float MaxDist, const FMRUKLabelFilter & LabelFilter, FMRUKHit & OutHit ) |
---|
Cast a ray and return the closest hit anchor Parameters Origin Origin The origin of the ray. DirectionDirection The direction of the ray. MaxDistThe maximum distance the ray should travel. LabelFilterThe label filter can be used to include/exclude certain labels from the search. OutHitThe closest hit. Returns The anchor that the ray hit. |
bool AMRUKRoom::RaycastAll ( const FVector & Origin, const FVector & Direction, float MaxDist, const FMRUKLabelFilter & LabelFilter, TArray< FMRUKHit > & OutHits, TArray< AMRUKAnchor * > & OutAnchors ) |
---|
Cast a ray and collect hits against the volume and plane bounds in this room. The order of the hits in the array is not specified. Parameters Origin Origin The origin of the ray. DirectionDirection The direction of the ray. MaxDistThe maximum distance the ray should travel. OutHitsThe hits the ray collected. LabelFilterThe label filter can be used to include/exclude certain labels from the search. OutAnchorsThe anchors that were hit. Each anchor in this array corresponds to a entry at the same position in OutHits. Returns Whether the ray hit anything |
void AMRUKRoom::ClearRoom ( ) |
---|
Clear all anchors from the room. |
bool AMRUKRoom::DoesRoomHave ( const TArray< FString > & Labels ) |
---|
Check if the room does have any of the labels. Parameters Labels The labels to check. Returns Whether the label was found in the room. |
AMRUKAnchor * AMRUKRoom::TryGetClosestSurfacePosition ( const FVector & WorldPosition, FVector & OutSurfacePosition, double & OutSurfaceDistance, const FMRUKLabelFilter & LabelFilter, double MaxDistance ) |
---|
Get the position on the surface that is closest to the given position with respect to the distance. Parameters WorldPosition The position in world space from which the closest surface point should be found. OutSurfacePositionThe closest position on the closest surface if any. Otherwise zero. OutSurfaceDistanceThe distance between WorldPosition and OutSurfacePosition. LabelFilterThe label filter can be used to include/exclude certain labels from the search. MaxDistanceThe distance to which a closest surface position should be searched. Everything below or equal to zero will be treated as infinity. Returns The Anchor on which the closest surface position was found or a null pointer otherwise. |
AMRUKAnchor * AMRUKRoom::IsPositionInSceneVolume ( const FVector & WorldPosition, bool TestVerticalBounds, double Tolerance ) |
---|
Checks if the given position is on or inside of any scene volume in the room. Floor, ceiling and wall anchors will be excluded from the search. Parameters WorldPosition The position in world space to check TestVerticalBoundsWhether the vertical bounds should be checked or not ToleranceTolerance Returns The anchor the WorldPosition is in. A null pointer otherwise. |
AMRUKAnchor * AMRUKRoom::TryGetClosestSeatPose ( const FVector & RayOrigin, const FVector & RayDirection, FTransform & OutSeatTransform ) |
---|
Finds the closest seat given a ray. Parameters RayOrigin The origin of the ray. RayDirectionThe direction of the ray. OutSeatTransformThe seat pose. Returns If any seat was found the Anchor that has seats available will be returned. Otherwise a null pointer. |
TArray< AMRUKAnchor * > AMRUKRoom::GetAnchorsByLabel ( const FString & Label ) |
---|
Finds all anchors in this room that have the given label attached. Parameters Label The label to search for. Returns An array off anchors with the given label. |
AMRUKAnchor * AMRUKRoom::GetFirstAnchorByLabel ( const FString & Label ) |
---|
Finds the first anchor in this room that has the given label attached. Parameters Label The label to search for. Returns If found, the Anchor that has the label attached. Otherwise a null pointer. |
AMRUKAnchor * AMRUKRoom::GetBestPoseFromRaycast ( const FVector & RayOrigin, const FVector & RayDirection, double MaxDist, const FMRUKLabelFilter & LabelFilter, FTransform & OutPose, EMRUKPositioningMethod 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. Parameters RayOrigin The origin of the ray. RayDirectionThe direction of the ray. MaxDistThe maximum distance the ray should travel. LabelFilterThe label filter can be used to include/exclude certain labels from the search. OutPoseThe calculated pose. PositioningMethodThe method that should be used for determining the position on the surface. Returns The anchor that was hit by the ray if any. Otherwise a null pointer. |
AMRUKAnchor * AMRUKRoom::GetKeyWall ( double Tolerance ) |
---|
Return the longest wall in the room that has no other walls behind it. Parameters Tolerance The tolerance to use when determining wall that are behind. Returns The wall anchor that is the key wall in the room. |
AMRUKAnchor * AMRUKRoom::GetLargestSurface ( const FString & Label ) |
---|
Return the largest surface for a given label. Parameters Label The label of the surfaces to search in. Returns The anchor that has the largest surface if any. Otherwise, a null pointer. |
void AMRUKRoom::AttachProceduralMeshToWalls ( const TArray< FMRUKTexCoordModes > & WallTextureCoordinateModes, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial ) |
---|
Attach a procedural mesh to the walls. This is done at the room level to ensure the UV coordinates can be done in a seamless way if desired. Parameters WallTextureCoordinateModes Mode of the wall texture coordinates. CutHoleLabelsLabels for which holes should be cut into the plane meshes ProceduralMaterialMaterial to apply on top of the procedural mesh. |
TArray< AActor * > AMRUKRoom::SpawnInterior ( const TMap< FString, FMRUKSpawnGroup > & SpawnGroups, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial, bool ShouldFallbackToProcedural ) |
---|
Spawn meshes on the position of the anchors of the room. The actors should have Z as up Y as right and X as forward. The pivot point should be in the bottom center. Parameters SpawnGroups A map which tells to spawn which actor to a given label. CutHoleLabelsLabels for which the generated mesh should have holes. Only works with planes. ProceduralMaterialMaterial to apply on top of the procedural mesh if any. ShouldFallbackToProceduralWhether or not it should by default fallback to generating a procedural mesh if no actor class has been specified for a label. Returns All spawned interior actors. |
TArray< AActor * > AMRUKRoom::SpawnInteriorFromStream ( const TMap< FString, FMRUKSpawnGroup > & SpawnGroups, const FRandomStream & RandomStream, const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial, bool ShouldFallbackToProcedural ) |
---|
Spawn meshes on the position of the anchors of the 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. Parameters SpawnGroups A map wich tells to spawn which actor to a given label. CutHoleLabelsLabels for which the generated mesh should have holes. Only works with planes. RandomStreamA random generator to choose randomly between actor classes if there a multiple for one label. ProceduralMaterialMaterial to apply on top of the procedural mesh if any. ShouldFallbackToProceduralWhether or not it should by default fallback to generating a procedural mesh if no actor class has been specified for a label. Returns All spawned interior actors. |
bool AMRUKRoom::IsWallAnchor ( AMRUKAnchor * Anchor ) |
---|
Check if the given anchor is a wall anchor. Parameters Anchor The anchor to check. Returns Whether the anchor is a wall anchor or not. |
void AMRUKRoom::ComputeWallMeshUVAdjustments ( const TArray< FMRUKTexCoordModes > & WallTextureCoordinateModes, TArray< FMRUKAnchorWithPlaneUVs > & OutAnchorsWithPlaneUVs ) |
---|
Compute the wall mesh texture coordinate adjustments that are needed to generate proper texture coordinates for the walls. Parameters WallTextureCoordinateModes The texture coordinate mode to use for the walls. OutAnchorsWithPlaneUVsThe computed texture coordinate adjustment with the wall anchor. |
bool AMRUKRoom::LoadGlobalMeshFromDevice ( UMaterialInterface * Material ) |
---|
Load the triangle mesh of the global mesh anchor if it's available. Parameters Material The Material to show if the global mesh is visible. Returns On success true, otherwise false. |
bool AMRUKRoom::LoadGlobalMeshFromJsonString ( const FString & JsonString, UMaterialInterface * Material ) |
---|
Load the triangle mesh of the global mesh anchor. For this function to succeed you need to make sure to have a global mesh specified in the JSON file. Not every JSON file has a global mesh in it. Parameters JsonString The string with the JSON data. MaterialMaterial to apply on the global mesh. Returns On Success true, otherwise false. |
FVector AMRUKRoom::ComputeCentroid ( double Z ) |
---|
Compute the centroid of the room by taking the points of the floor boundary. The centroid may be outside of the room for non convex rooms. The Z value determines the height of the resulting vectors and ranges from 0 to 1. A Z value of 1 corresponds to the ceiling positions Z, while a Z value of 0 corresponds to the floor positions Z. Any value between 0 and 1 will interpolate between the two values. In case the floor and ceiling anchors haven't been loaded yet a zero vector will be returned. Parameters Z Value used for interpolation of Z. Returns The centroid. |
AMRUKRoom::AMRUKRoom ( const FObjectInitializer & ObjectInitializer ) |
---|
No description available.
|
void AMRUKRoom::EndPlay ( EEndPlayReason::Type Reason ) |
---|
No description available.
|
void AMRUKRoom::LoadFromData ( UMRUKRoomData * RoomData ) |
---|
No description available.
|
void AMRUKRoom::AttachProceduralMeshToWalls ( const TArray< FString > & CutHoleLabels, UMaterialInterface * ProceduralMaterial ) |
---|
No description available.
|
void AMRUKRoom::UpdateWorldLock ( APawn * Pawn, const FVector & HeadWorldPosition ) |
---|
No description available.
|
TSharedRef< FJsonObject > AMRUKRoom::JsonSerialize ( ) |
---|
No description available.
|
bool AMRUKRoom::Corresponds ( UMRUKRoomData * RoomQuery ) |
---|
No description available.
|