Packages

  • package root
    Definition Classes
    root
  • package o1

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University.

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University. It contains an assortment of tools; most prominently, it provides a framework for simple graphical programming and utilities for playing sound.

    This is the front page of O1Library’s documentation. However, this is probably not the best place to start learning about O1Library as a student. That’s because the relevant content of this library is introduced bit by bit in the chapters of O1’s custom ebook alongside the associated programming concepts and assignments.

    You may still find this documentation useful as a reference. You can also find some optional content here that you may wish to try.

    This front page lists the content available in the top-level package called simply o1. These tools are available with the simple command import o1._ in your Scala programs. Some of them you’ll use a lot; some of them you won’t necessarily need at all.

    The tools listed here are actually implemented in a number of subpackages (o1.gui, o1.sound, etc.); what you see here are just “shortcut aliases” to those actual implementations. The aliases are here to make that convenient import command work and to provide you with this list of links to some of the more commonly used tools in O1Library. The subpackages also contain additional content not listed here.

    O1Library has been developed by Aleksi Lukkarinen and Juha Sorva. Several of the key components in o1.gui and o1.world are built upon Aleksi’s Scala Media Computation Library. Some parts of O1Library draw inspiration from the “teachpacks” of the Racket programming language.

    We are grateful to Riku Autio, Joonatan Honkamaa, Juhani Numminen, Leo Varis, Veera Kahva, and anonymous students for bug reports and fixes. We thank Otto Seppälä for helpful discussions.

    Definition Classes
    root
  • package world

    This package contains tools for locations and movement in two-dimensional space.

    This package contains tools for locations and movement in two-dimensional space.

    The tools in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

    The subpackage o1.world.objects contains additional tools for representing entities that reside within two-dimensional spaces.

    Definition Classes
    o1
  • package objects

    This package contains tools for representing objects that exist in two-dimensional space.

    This package contains tools for representing objects that exist in two-dimensional space. In particular, it defines:

    • the Anchor type: an anchor is the point where an object connects to its environment; and
    • a number of traits (HasPos, HasVelocity, etc.) the classes of an application can mix in to gain access to various convenience methods.

    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. Many of the traits in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

    Definition Classes
    world
  • Anchor
  • HasAnchor
  • HasContainer
  • HasEdges
  • HasPos
  • HasSize
  • HasVelocity
  • mutable
p

o1.world

objects

package objects

This package contains tools for representing objects that exist in two-dimensional space. In particular, it defines:

  • the Anchor type: an anchor is the point where an object connects to its environment; and
  • a number of traits (HasPos, HasVelocity, etc.) the classes of an application can mix in to gain access to various convenience methods.

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. Many of the traits in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. objects
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Anchor extends AnyRef

    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 Anchors 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._.

    See also

    HasAnchor

  2. trait HasAnchor extends HasSize

    A supertype for objects that have an anchoring point.

  3. trait HasContainer extends HasEdges

    A supertype for objects that take up a rectangular area and whose position may be constrained by a larger object around them.

  4. trait HasEdges extends HasPos with HasAnchor

    A supertype for objects that take up a rectangular area and have an anchoring point.

    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.

  5. trait HasPos extends AnyRef

    A supertype for objects that have a location in two-dimensional space.

  6. trait HasSize extends AnyRef

    A supertype for objects that have a size: a width and a height.

  7. trait HasVelocity extends HasPos

    A supertype for objects that have a position and a velocity in two-dimensional space.

Value Members

  1. object Anchor

    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._.

    See also

    HasAnchor

  2. object mutable

    This subpackage defines a few additional traits that extend the ones in of o1.world.objects.

    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. Many of the traits in this package have aliases in the top-level package o1, so they are accessible to students simply via import o1._.

Inherited from AnyRef

Inherited from Any

Ungrouped