C# Class ProceduralGeneration, ThreeDWorld

Inheritance: MonoBehaviour
ファイルを表示 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_oe property

public GameObject DEBUG_testCubePrefab
return GameObject

DEBUG_testGridPrefab public_oe property

public TextMesh,UnityEngine DEBUG_testGridPrefab
return UnityEngine.TextMesh

DOOR_HEIGHT public_oe property

public float DOOR_HEIGHT
return float

DOOR_WIDTH public_oe property

public float DOOR_WIDTH
return float

MAX_NUM_TWISTS public_oe property

public int MAX_NUM_TWISTS
return int

MIN_HALLWAY_SPACING public_oe property

public float MIN_HALLWAY_SPACING
return float

NUM_ROOMS public_oe property

public int NUM_ROOMS
return int

WALL_TRIM_HEIGHT public_oe property

public float WALL_TRIM_HEIGHT
return float

WALL_TRIM_THICKNESS public_oe property

public float WALL_TRIM_THICKNESS
return float

WALL_WIDTH public_oe property

public float WALL_WIDTH
return float

WINDOW_PLACEMENT_HEIGHT public_oe property

public float WINDOW_PLACEMENT_HEIGHT
return float

WINDOW_SIZE_HEIGHT public_oe property

public float WINDOW_SIZE_HEIGHT
return float

WINDOW_SIZE_WIDTH public_oe property

public float WINDOW_SIZE_WIDTH
return float

WINDOW_SPACING public_oe property

public float WINDOW_SPACING
return float

_allHeightPlanes public_oe property

public List _allHeightPlanes
return List

_rand public_oe property

public Random,System _rand
return System.Random

availablePrefabs public_oe property

public List availablePrefabs
return List

cache_folder public_oe property

public string cache_folder
return string

ceilingMaterial public_oe property

public Material ceilingMaterial
return Material

ceilingPrefab public_oe property

public SemanticObjectSimple, ceilingPrefab
return SemanticObjectSimple,

complexityLevelToCreate public_oe property

public int complexityLevelToCreate
return int

desiredRndSeed public_oe property

public int desiredRndSeed
return int

disable_rand_stacking public_oe property

public int disable_rand_stacking
return int

disabledItems public_oe property

public List disabledItems
return List

enable_global_unit_scale public_oe property

public int enable_global_unit_scale
return int

floorMaterial public_oe property

public Material floorMaterial
return Material

floorPrefab public_oe property

public SemanticObjectSimple, floorPrefab
return SemanticObjectSimple,

forceStackedItems public_oe property

public int forceStackedItems
return int

gridDim public_oe property

public float gridDim
return float

intensityCeilingLights public_oe property

public float intensityCeilingLights
return float

list_rands public_oe property

public List list_rands
return List

maxPlacementAttempts public_oe property

public int maxPlacementAttempts
return int

minStackingBases public_oe property

public int minStackingBases
return int

numCeilingLights public_oe property

public int numCeilingLights
return int

permittedItems public_oe property

public List permittedItems
return List

randomMaterials public_oe property

public bool randomMaterials
return bool

roomDim public_oe property

public Vector3 roomDim
return Vector3

scaleRelatDict public_oe property

public JsonData,LitJson scaleRelatDict
return LitJson.JsonData

scene_scale_con public_oe property

public string scene_scale_con
return string

scene_scale_mean public_oe property

public float scene_scale_mean
return float

scene_scale_seed public_oe property

public int scene_scale_seed
return int

scene_scale_var public_oe property

public float scene_scale_var
return float

shouldUseGivenSeed public_oe property

public bool shouldUseGivenSeed
return bool

shouldUseStandardizedSize public_oe property

public bool shouldUseStandardizedSize
return bool

showProcGenDebug public_oe property

public bool showProcGenDebug
return bool

skyboxMaterial public_oe property

public Material skyboxMaterial
return Material

standardizedSize public_oe property

public Vector3 standardizedSize
return Vector3

useStandardShader public_oe property

public bool useStandardShader
return bool

use_cache_self public_oe property

public int use_cache_self
return int

use_mongodb_inter public_oe property

public int use_mongodb_inter
return int

wallMaterials public_oe property

public List wallMaterials
return List

wallTrimMaterial public_oe property

public Material wallTrimMaterial
return Material

windowMaterial public_oe property

public Material windowMaterial
return Material

windowTrimMaterial public_oe property

public Material windowTrimMaterial
return Material