destroy()
method when the AnchorMeshSpawner instance is no longer in use.Name | Summary |
---|---|
AnchorProceduralMesh | constructor(mrukSystem: MRUKSystem, labelToConfig: Map<MRUKLabel, AnchorProceduralMeshConfig>, spawnMode: MRUKSpawnMode = MRUKSpawnMode.CURRENT_ROOM_ONLY, wallTexCoordModeU: MRUKWallTexCoordModeU = MRUKWallTexCoordModeU.METRIC, wallTexCoordModeV: MRUKWallTexCoordModeV = MRUKWallTexCoordModeV.METRIC, anchorTexCoordMode: MRUKAnchorTexCoordMode = MRUKAnchorTexCoordMode.STRETCH, cutHoleLabels: List<MRUKLabel> = listOf(MRUKLabel.WINDOW_FRAME, MRUKLabel.DOOR_FRAME))constructor(mrukFeature: MRUKFeature, labelToConfig: Map<MRUKLabel, AnchorProceduralMeshConfig>, spawnMode: MRUKSpawnMode = MRUKSpawnMode.CURRENT_ROOM_ONLY, wallTexCoordModeU: MRUKWallTexCoordModeU = MRUKWallTexCoordModeU.METRIC, wallTexCoordModeV: MRUKWallTexCoordModeV = MRUKWallTexCoordModeV.METRIC, anchorTexCoordMode: MRUKAnchorTexCoordMode = MRUKAnchorTexCoordMode.STRETCH, cutHoleLabels: List<MRUKLabel> = listOf(MRUKLabel.WINDOW_FRAME, MRUKLabel.DOOR_FRAME)) |
Name | Summary |
---|---|
Companion | object Companion |
Name | Summary |
---|---|
anchorTexCoordMode | var anchorTexCoordMode: MRUKAnchorTexCoordMode The texture coordinate mode for planes and volumes that are not walls. Depending on that mode the texture will appear differently. |
cutHoleLabels | var cutHoleLabels: List<MRUKLabel> A list of labels that cut holes into their parent anchors. For example, a door or windows parent will be the wall. That means if this list contains the window and door label, holes will be cut into the wall meshes. The anchor hierarchy gets determined by which anchors sit on top of other anchors. |
labelToConfig | var labelToConfig: Map<MRUKLabel, AnchorProceduralMeshConfig> A mapping that tells the AnchorProceduralMesh for which labels procedural meshes should be generated. |
mrukFeature | val mrukFeature: MRUKFeature The MRUKFeature to which this AnchorProceduralMesh is tied. The AnchorProceduralMesh gets its anchor data from the MRUKFeature. |
spawnMode | val spawnMode: MRUKSpawnMode The spawnMode determines if the AnchorProceduralMesh should spawn meshes automatically whenever the mrukFeature has new anchors loaded. If the spawnMode is set to NONE spawnMeshes() needs to be invoked manually. |
wallTexCoordModeU | var wallTexCoordModeU: MRUKWallTexCoordModeU The texture coordinate mode for the U channel that should be used when generating wall meshes. Depending on that mode the texture will appear differently. |
wallTexCoordModeV | var wallTexCoordModeV: MRUKWallTexCoordModeV The texture coordinate mode for the V channel that should be used when generating wall meshes. Depending on that mode the texture will appear differently. |
Name | Summary |
---|---|
destroy | fun destroy() Destroys the AnchorMeshSpawner. It’s important to call this function before the AnchorMeshSpawner gets out of scope, otherwise it might lead to memory leaks. |
spawnMeshes | fun spawnMeshes(room: MRUKRoom): List<AnchorProceduralMesh.MeshAndPhysicEntity> Spawn meshes for a given room. This should only be invoked manually if spawnMode is set to NONE. fun spawnMeshes(rooms: List<MRUKRoom>): List<AnchorProceduralMesh.MeshAndPhysicEntity> Spawn meshes for a given list of rooms. This should only be invoked manually if spawnMode is set to NONE. |