Control where the bottom bounding box of an object lies on the z axis. An example config file using this control can be found here: https://github.com/3db/3db/tree/main/examples/unit_tests/pin_to_ground.yaml.
Control that moves an object vertically to touch the ground Useful when you want a slightly more realistic rendering (i.e. avoid flying objects)
z_ground: the z-coordinate that the bottom of the object’s bounding
moves to (default range:
This control come after the
OrientationControlcontrols. In these patterns, you first move the object to a location of interest, then drag it to the ground under that location.
Construct a BaseControl
root_folder – The folder containing all the data for this 3DB experiment. All paths are lative to his folder
apply(context: Dict[str, Any], control_args: Dict[str, Any]) → None¶
Pins the object to the ground
context (Dict[str, Any]) – The scene context object
control_args (Dict[str, Any]) – The parameters for this control; should have key
z_groundmapping to any real number, see class docstring for documentation.
Undo the modification on a scene
Most of the time, recreating a scene is very expensive, therefore, controls are asked to implement a reverse operation to undo their changes. Controls that need to store state in order to undo their actions should add data to the target object they received.
context (Dict[str, Any]) – The description of the scene to render