StackOfPlates

May 23, 2022 ยท View on GitHub

from tdw.proc_gen.arrangements.stack_of_plates import StackOfPlates

A stack of plates.

  • The plate model is chosen randomly and is the same for each plate; see StackOfPlates.MODEL_CATEGORIES["plate"].
  • The number of plates in the stack is random; see StackOfPlates.MIN_NUM and StackOfPlates.MAX_NUM.

Fields

  • object_ids A list of all of the object IDs in this arrangement.

Class Variables

VariableTypeDescriptionValue
DEFAULT_CELL_SIZEfloatThe default span used for arranging objects next to each other.0.6096
MAX_NUMintThe maximum number of plates in a stack of plates.8
MIN_NUMintThe minimum number of plates in a stack of plates.3
MODEL_CATEGORIESDict[str, List[str]]A dictionary of all of the models that may be used for procedural generation. Key = The category. Value = A list of model names. Note that this category overlaps with, but is not the same as, model_record.wcategory; see: Arrangement.get_categories_and_wcategories().loads(Path(resource_filename(__name__, "data/models.json")).read_text())

Functions

__init__

__init__

StackOfPlates(position)

StackOfPlates(position, rng=None)

ParameterTypeDefaultDescription
positionDict[str, float]The position of the root object. This might be adjusted.
rngUnion[int, np.random.RandomState]NoneEither a random seed or an numpy.random.RandomState object. If None, a new random number generator is created.

get_categories_and_wcategories

Arrangement.get_categories_and_wcategories()

(Static)

Returns: A dictionary of the categories of every model that can be used by Arrangement and their corresponding wcategory and wnid. Key = The model name. Value = A dictionary with the following keys: "category" (the ProcGenObjects category), "wcategory" (the value of record.wcategory), and "wnid" (the value of record.wnid).

get_commands

self.get_commands()

Returns: A list of commands that will generate the arrangement.