destroy() method when the AnchorMeshSpawner instance is no longer in use.
class AnchorProceduralMesh(val mrukFeature: MRUKFeature, var labelToConfig: Map<MRUKLabel, AnchorProceduralMeshConfig>, val spawnMode: MRUKSpawnMode = MRUKSpawnMode.CURRENT_ROOM_ONLY, var wallTexCoordModeU: MRUKWallTexCoordModeU = MRUKWallTexCoordModeU.METRIC, var wallTexCoordModeV: MRUKWallTexCoordModeV = MRUKWallTexCoordModeV.METRIC, var anchorTexCoordMode: MRUKAnchorTexCoordMode = MRUKAnchorTexCoordMode.STRETCH, var cutHoleLabels: List<MRUKLabel> = listOf(MRUKLabel.WINDOW_FRAME, MRUKLabel.DOOR_FRAME))
AnchorProceduralMesh
(
mrukFeature
, labelToConfig
, spawnMode
, wallTexCoordModeU
, wallTexCoordModeV
, anchorTexCoordMode
, cutHoleLabels
)
|
Signature
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)) Parameters
mrukFeature:
MRUKFeature
labelToConfig:
Map
spawnMode:
MRUKSpawnMode
wallTexCoordModeU:
MRUKWallTexCoordModeU
wallTexCoordModeV:
MRUKWallTexCoordModeV
anchorTexCoordMode:
MRUKAnchorTexCoordMode
cutHoleLabels:
List
Returns |
anchorTexCoordMode
: MRUKAnchorTexCoordMode
[Get][Set] |
The texture coordinate mode for planes and volumes that are not walls. Depending on that mode the texture will appear differently.
Signature
var anchorTexCoordMode: MRUKAnchorTexCoordMode |
cutHoleLabels
: List
[Get][Set] |
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.
Signature
var cutHoleLabels: List<MRUKLabel> |
labelToConfig
: Map
[Get][Set] |
A mapping that tells the AnchorProceduralMesh for which labels procedural meshes should be generated.
Signature
var labelToConfig: Map<MRUKLabel, AnchorProceduralMeshConfig> |
mrukFeature
: MRUKFeature
[Get] |
The MRUKFeature to which this AnchorProceduralMesh is tied. The AnchorProceduralMesh gets its anchor data from the MRUKFeature.
Signature
val mrukFeature: MRUKFeature |
spawnMode
: MRUKSpawnMode
[Get] |
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.
Signature
val spawnMode: MRUKSpawnMode |
wallTexCoordModeU
: MRUKWallTexCoordModeU
[Get][Set] |
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.
Signature
var wallTexCoordModeU: MRUKWallTexCoordModeU |
wallTexCoordModeV
: MRUKWallTexCoordModeV
[Get][Set] |
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.
Signature
var wallTexCoordModeV: MRUKWallTexCoordModeV |
destroy
()
|
Destroys the AnchorProceduralMesh. It's important to call this function before the AnchorProceduralMesh gets out of scope, otherwise it might lead to memory leaks.
Signature
fun destroy() |
spawnMeshes
(
rooms
)
|
Spawn meshes for a given list of rooms. This should only be invoked manually if spawnMode is set to NONE.
Signature
fun spawnMeshes(rooms: List<MRUKRoom>): List<AnchorProceduralMesh.MeshAndPhysicEntity> Parameters
rooms:
List
Returns
List
|
spawnMeshes
(
room
)
|
Spawn meshes for a given room. This should only be invoked manually if spawnMode is set to NONE.
Signature
fun spawnMeshes(room: MRUKRoom): List<AnchorProceduralMesh.MeshAndPhysicEntity> Parameters
room:
MRUKRoom Returns
List
|
TAG
: String
[Get] |
Signature
const val TAG: String |
data class MeshAndPhysicEntity(val mesh: Entity?, val physics: Entity?)
MeshAndPhysicEntity
(
mesh
, physics
)
|
Signature
constructor(mesh: Entity?, physics: Entity?) Parameters Returns
AnchorProceduralMesh.MeshAndPhysicEntity
|