trait HasVelocity extends HasPos
A supertype for objects that have a position and a velocity in two-dimensional space.
- Alphabetic
- By Inheritance
- HasVelocity
- HasPos
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def distance(another: HasPos): Double
Determines the distance (“as the crow flies”) between this object’s
pos
and that of the given object.Determines the distance (“as the crow flies”) between this object’s
pos
and that of the given object.- Definition Classes
- HasPos
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def isBoundFor(direction: Direction): Boolean
Determines whether this objectis bound for roughly the given direction, as per Direction.sharesQuadrant.
- def isDownbound: Boolean
Determines whether this objecthas a downward velocity, as per Direction.isDownward.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLeftbound: Boolean
Determines whether this objecthas a leftward velocity, as per Direction.isLeftward.
- def isRightbound: Boolean
Determines whether this objecthas a rightward velocity, as per Direction.isRightward.
- def isUpbound: Boolean
Determines whether this objecthas an upward velocity, as per Direction.isUpward.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nextPos: Pos
Returns the
Pos
that this object, moving from its current location at its current velocity, reaches in one unit of time.Returns the
Pos
that this object, moving from its current location at its current velocity, reaches in one unit of time. That is, adds thedx
anddy
components of the velocity to the currentPos
and returns the result. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString: String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.