o1.world.objects
Members list
Type members
Classlikes
An Anchor
is a point where a two-dimensional object, such as a Pic, attaches to other such objects; you can also think of it as a “pin” that attaches a Pic
to a background.
An Anchor
is a point where a two-dimensional object, such as a Pic, attaches to other such objects; you can also think of it as a “pin” that attaches a Pic
to a background.
For instance, a Pic
may have its Anchor
at its center; the Pic
may then be attached to a larger image at that image’s TopLeft
(another anchor), so that the center of the first Pic
is located at the top left-hand corner of the second Pic
.
The companion object of this class provides several standard Anchor
s and a class Anchor.Absolute
for creating new ones.
Anchor
objects are immutable.
This trait has an alias in the top-level package o1, so it’s accessible to students simply via import o1.*
.
Attributes
- See also
- Companion
- object
- Supertypes
- Known subtypes
-
class Absoluteobject BottomCenterobject BottomLeftobject BottomRightobject Centerobject CenterLeftobject CenterRightobject TopCenterobject TopLeftobject TopRightShow all
This companion object of class Anchor
contains a number of standard anchors (TopLeft
, Center
, etc.) and a class for creating anchors in a custom location.
This companion object of class Anchor
contains a number of standard anchors (TopLeft
, Center
, etc.) and a class for creating anchors in a custom location.
The object has an alias in the top-level package o1, so it’s accessible to students simply via import o1.*
.
Attributes
A supertype for objects that have an anchoring point.
A supertype for objects that have an anchoring point.
Attributes
- Supertypes
- Known subtypes
A supertype for objects that take up a rectangular area and whose position may be constrained by a larger object around them.
A supertype for objects that take up a rectangular area and whose position may be constrained by a larger object around them.
Attributes
- Supertypes
- Known subtypes
-
trait ContainedObjecttrait MovingObjectInContainer
A supertype for objects that take up a rectangular area and have an anchoring point. The object’s pos
indicates the position of the anchoring point; the locations of its edges are determined relative to the anchor.
A supertype for objects that take up a rectangular area and have an anchoring point. The object’s pos
indicates the position of the anchoring point; the locations of its edges are determined relative to the anchor.
Attributes
- Supertypes
- Known subtypes
A supertype for objects that have a location in two-dimensional space.
A supertype for objects that have a location in two-dimensional space.
Attributes
- Supertypes
- Known subtypes
-
trait HasEdgestrait HasContainertrait ContainedObjecttrait MovingObjectInContainertrait HasVelocitytrait MovingObjecttrait MutablePosShow all
A supertype for objects that have a size: a width and a height.
A supertype for objects that have a size: a width and a height.
Attributes
- Supertypes
- Known subtypes
-
trait HasAnchortrait HasEdgestrait HasContainertrait ContainedObjecttrait MovingObjectInContainer
A supertype for objects that have a position and a velocity in two-dimensional space.
A supertype for objects that have a position and a velocity in two-dimensional space.
Attributes
- Supertypes
- Known subtypes
-
trait MovingObjecttrait MovingObjectInContainer
This subpackage defines a few additional traits that extend the ones in of o1.world.objects. These traits provide additional convenience methods for working with mutable objects in two-dimensional space.
This subpackage defines a few additional traits that extend the ones in of o1.world.objects. These traits provide additional convenience methods for working with mutable objects in two-dimensional space.
NOTE TO STUDENTS: In this course, you don’t need to understand how this package works or can be used. That being said, some students may wish to experiment with some of its contents. Several of the traits in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1.*
.
Attributes
- Supertypes
- Self type
-
mutable.type