Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 3.88 KB

classes.rst

File metadata and controls

101 lines (70 loc) · 3.88 KB

Objects and Classes Reference

This page describes the classes built into Scenic, representing points <Point>, oriented points <OrientedPoint>, and physical objects <Object>, and how they are instantiated to create objects.

Note

The documentation given here describes only the public properties and methods provided by the built-in classes. If you are working on Scenic's internals, you can find more complete documentation in the :mod:`scenic.core.object_types` module.

Instance Creation

new <class> [<specifier> [, <specifier>]*]

Instantiates a Scenic object from a Scenic class. The properties of the object are determined by the given set of zero or more specifiers. For details on the available specifiers and how they interact, see the :ref:`specifiers`.

Instantiating an instance of Object has a side effect: the object is added to the scenario being defined.

.. versionchanged:: 3.0

    Instance creation now requires the ``new`` keyword. As a result, Scenic classes can be referred to without creating an instance.

Built-in Classes

Point

Locations in space. This class provides the fundamental property :prop:`position` and several associated properties.

.. autoscenicclass:: scenic.core.object_types.Point
    :noindex:
    :no-show-inheritance:
    :no-members:
    :members: visibleRegion

OrientedPoint

A location along with an orientation, defining a local coordinate system. This class subclasses Point, adding the fundamental property :prop:`orientation` and several associated properties.

.. autoscenicclass:: scenic.core.object_types.OrientedPoint
    :noindex:
    :no-show-inheritance:
    :no-members:
    :members: visibleRegion

Object

A physical object. This class subclasses OrientedPoint, adding a variety of properties including:

The built-in requirements applying to each object are:

.. versionchanged:: 3.0

    :prop:`requireVisible` is now `False` by default.

.. autoscenicclass:: scenic.core.object_types.Object
    :noindex:
    :no-show-inheritance:
    :no-members:
    :members: startDynamicSimulation, visibleRegion