API reference

SpaceMapGPU Class

Extends MonoBehaviour
Manages the creation and updating of a SpaceMap using GPU resources.
This class is designed to handle dynamic environments, providing real-time updates to the spatial map.

Fields

CreateOnStart : MRUK.RoomFilter
Signature
MRUK.RoomFilter CreateOnStart
MapGradient : Gradient
Signature
Gradient MapGradient
TextureDimension : int
Signature
int TextureDimension

Properties

SpaceMapCreatedEvent : UnityEvent
[Get]
Event triggered when the space map is initially created.
Signature
UnityEvent SpaceMapCreatedEvent
SpaceMapRoomCreatedEvent : UnityEvent< MRUKRoom >
[Get]
Event triggered when the space map is created for a specifc room.
Signature
UnityEvent<MRUKRoom> SpaceMapRoomCreatedEvent
SpaceMapUpdatedEvent : UnityEvent
[Get]
Event triggered when the space map is updated.
Signature
UnityEvent SpaceMapUpdatedEvent

Methods

GetColorAtPosition ( worldPosition )
Color clamps to edge color if worldPosition is off-grid.
getBilinear blends the color between pixels.
Signature
Color GetColorAtPosition(Vector3 worldPosition)
Parameters
worldPosition: Vector3  The world position to sample the color from.
Returns
Color  The color at the specified world position. Returns black if the capture camera is not initialized.
GetSpaceMap ( room )
Gets the RenderTexture used for the space map for a given room.
This property is not available until the space map is created.
Signature
RenderTexture GetSpaceMap(MRUKRoom room=null)
Parameters
room: MRUKRoom  The MRUKRoom for which to get the space map texture.
Returns
RenderTexture
StartSpaceMap ( roomFilter )
Initiates the space mapping process based on the specified room filter.
This method sets up the necessary components and configurations to generate the space map, including updating textures and setting up the capture camera.
Signature
void StartSpaceMap(MRUK.RoomFilter roomFilter)
Parameters
roomFilter: MRUK.RoomFilter  The MRUK.RoomFilter that determines which rooms are included in the space map, influencing how the space map is generated.
Returns
void
StartSpaceMap ( room )
Initiates the space mapping process for a specific room.
Signature
void StartSpaceMap(MRUKRoom room)
Parameters
room: MRUKRoom  The MRUKRoom that should be used to create the space map.
Returns
void