C# Class ProceduralGeneration, ThreeDWorld

Inheritance: MonoBehaviour
Show file Open project: dicarlolab/ThreeDWorld Class Usage Examples

Public Properties

Property Type Description
DEBUG_testCubePrefab GameObject
DEBUG_testGridPrefab UnityEngine.TextMesh
DOOR_HEIGHT float
DOOR_WIDTH float
MAX_NUM_TWISTS int
MIN_HALLWAY_SPACING float
NUM_ROOMS int
WALL_TRIM_HEIGHT float
WALL_TRIM_THICKNESS float
WALL_WIDTH float
WINDOW_PLACEMENT_HEIGHT float
WINDOW_SIZE_HEIGHT float
WINDOW_SIZE_WIDTH float
WINDOW_SPACING float
_allHeightPlanes List
_rand System.Random
availablePrefabs List
cache_folder string
ceilingMaterial Material
ceilingPrefab SemanticObjectSimple,
complexityLevelToCreate int
desiredRndSeed int
disable_rand_stacking int
disabledItems List
enable_global_unit_scale int
floorMaterial Material
floorPrefab SemanticObjectSimple,
forceStackedItems int
gridDim float
intensityCeilingLights float
list_rands List
maxPlacementAttempts int
minStackingBases int
numCeilingLights int
permittedItems List
randomMaterials bool
roomDim Vector3
scaleRelatDict LitJson.JsonData
scene_scale_con string
scene_scale_mean float
scene_scale_seed int
scene_scale_var float
shouldUseGivenSeed bool
shouldUseStandardizedSize bool
showProcGenDebug bool
skyboxMaterial Material
standardizedSize Vector3
useStandardShader bool
use_cache_self int
use_mongodb_inter int
wallMaterials List
wallTrimMaterial Material
windowMaterial Material
windowTrimMaterial Material

Public Methods

Method Description
CreateLightingSetup ( Vector3 roomDimensions, Vector3 roomCenter ) : void
CreateRoom ( Vector3 roomDimensions, Vector3 roomCenter ) : void
Init ( ) : void
IsDone ( ) : bool
SavePrefabInformation ( GeneratablePrefab, prefab, bool shouldRecomputePrefabInformation, bool replaceOld = true ) : void
SetupPrefabs ( bool shouldRecompute ) : void
SubdivideRoom ( ) : void
gen_rand_forinfo ( PrefabDatabase, &info ) : void
getNewUIDColor ( ) : Color
resetUIDColor ( ) : void

Private Methods

Method Description
AddObjects ( List prefabList ) : bool
Awake ( ) : void
CompileListOfProceduralComponents ( bool shouldRecomputePrefabInformation ) : void
DrawTestGrid ( HeightPlane, plane ) : void
MakeSimplePrefabObj ( GameObject obj, string subPath ) : void
Start ( ) : void
TryPlaceGroundObject ( Bounds bounds, float modScale, GeneratablePrefab, anchorType, int &finalX, int &finalY, HeightPlane, &whichPlane ) : bool

Tries to place object on the ground.

TryPlaceGroundObject ( Bounds bounds, float modScale, GeneratablePrefab, anchorType, int &finalX, int &finalY, HeightPlane, &whichPlane, float &offset_height ) : bool

Tries to place object on the ground.

Method Details

CreateLightingSetup() public method

public CreateLightingSetup ( Vector3 roomDimensions, Vector3 roomCenter ) : void
roomDimensions Vector3
roomCenter Vector3
return void

CreateRoom() public method

public CreateRoom ( Vector3 roomDimensions, Vector3 roomCenter ) : void
roomDimensions Vector3
roomCenter Vector3
return void

Init() public method

public Init ( ) : void
return void

IsDone() public method

public IsDone ( ) : bool
return bool

SavePrefabInformation() public method

public SavePrefabInformation ( GeneratablePrefab, prefab, bool shouldRecomputePrefabInformation, bool replaceOld = true ) : void
prefab GeneratablePrefab,
shouldRecomputePrefabInformation bool
replaceOld bool
return void

SetupPrefabs() public static method

public static SetupPrefabs ( bool shouldRecompute ) : void
shouldRecompute bool
return void

SubdivideRoom() public method

public SubdivideRoom ( ) : void
return void

gen_rand_forinfo() public method

public gen_rand_forinfo ( PrefabDatabase, &info ) : void
info PrefabDatabase,
return void

getNewUIDColor() public static method

public static getNewUIDColor ( ) : Color
return Color

resetUIDColor() public static method

public static resetUIDColor ( ) : void
return void

Property Details

DEBUG_testCubePrefab public property

public GameObject DEBUG_testCubePrefab
return GameObject

DEBUG_testGridPrefab public property

public TextMesh,UnityEngine DEBUG_testGridPrefab
return UnityEngine.TextMesh

DOOR_HEIGHT public property

public float DOOR_HEIGHT
return float

DOOR_WIDTH public property

public float DOOR_WIDTH
return float

MAX_NUM_TWISTS public property

public int MAX_NUM_TWISTS
return int

MIN_HALLWAY_SPACING public property

public float MIN_HALLWAY_SPACING
return float

NUM_ROOMS public property

public int NUM_ROOMS
return int

WALL_TRIM_HEIGHT public property

public float WALL_TRIM_HEIGHT
return float

WALL_TRIM_THICKNESS public property

public float WALL_TRIM_THICKNESS
return float

WALL_WIDTH public property

public float WALL_WIDTH
return float

WINDOW_PLACEMENT_HEIGHT public property

public float WINDOW_PLACEMENT_HEIGHT
return float

WINDOW_SIZE_HEIGHT public property

public float WINDOW_SIZE_HEIGHT
return float

WINDOW_SIZE_WIDTH public property

public float WINDOW_SIZE_WIDTH
return float

WINDOW_SPACING public property

public float WINDOW_SPACING
return float

_allHeightPlanes public property

public List _allHeightPlanes
return List

_rand public property

public Random,System _rand
return System.Random

availablePrefabs public property

public List availablePrefabs
return List

cache_folder public property

public string cache_folder
return string

ceilingMaterial public property

public Material ceilingMaterial
return Material

ceilingPrefab public property

public SemanticObjectSimple, ceilingPrefab
return SemanticObjectSimple,

complexityLevelToCreate public property

public int complexityLevelToCreate
return int

desiredRndSeed public property

public int desiredRndSeed
return int

disable_rand_stacking public property

public int disable_rand_stacking
return int

disabledItems public property

public List disabledItems
return List

enable_global_unit_scale public property

public int enable_global_unit_scale
return int

floorMaterial public property

public Material floorMaterial
return Material

floorPrefab public property

public SemanticObjectSimple, floorPrefab
return SemanticObjectSimple,

forceStackedItems public property

public int forceStackedItems
return int

gridDim public property

public float gridDim
return float

intensityCeilingLights public property

public float intensityCeilingLights
return float

list_rands public property

public List list_rands
return List

maxPlacementAttempts public property

public int maxPlacementAttempts
return int

minStackingBases public property

public int minStackingBases
return int

numCeilingLights public property

public int numCeilingLights
return int

permittedItems public property

public List permittedItems
return List

randomMaterials public property

public bool randomMaterials
return bool

roomDim public property

public Vector3 roomDim
return Vector3

scaleRelatDict public property

public JsonData,LitJson scaleRelatDict
return LitJson.JsonData

scene_scale_con public property

public string scene_scale_con
return string

scene_scale_mean public property

public float scene_scale_mean
return float

scene_scale_seed public property

public int scene_scale_seed
return int

scene_scale_var public property

public float scene_scale_var
return float

shouldUseGivenSeed public property

public bool shouldUseGivenSeed
return bool

shouldUseStandardizedSize public property

public bool shouldUseStandardizedSize
return bool

showProcGenDebug public property

public bool showProcGenDebug
return bool

skyboxMaterial public property

public Material skyboxMaterial
return Material

standardizedSize public property

public Vector3 standardizedSize
return Vector3

useStandardShader public property

public bool useStandardShader
return bool

use_cache_self public property

public int use_cache_self
return int

use_mongodb_inter public property

public int use_mongodb_inter
return int

wallMaterials public property

public List wallMaterials
return List

wallTrimMaterial public property

public Material wallTrimMaterial
return Material

windowMaterial public property

public Material windowMaterial
return Material

windowTrimMaterial public property

public Material windowTrimMaterial
return Material