case class RectangularBorder(levelCenter: Point, collisionRule: mvc.controller.levels.structure.CollisionRules.Value, base: Double, height: Double) extends AbstractBorder with Product with Serializable
Collision implementation for a playing field with rectangular shape
- Alphabetic
- By Inheritance
- RectangularBorder
- Serializable
- Serializable
- Product
- Equals
- AbstractBorder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RectangularBorder(levelCenter: Point, collisionRule: mvc.controller.levels.structure.CollisionRules.Value, base: Double, height: Double)
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
- val base: Double
-
def
checkAndSolveCollision(entity: CollidableProperty): Unit
Checks if an entity has collided with the border.
Checks if an entity has collided with the border. If so, computes it's new position and speed.
- entity
the entity to check
- Definition Classes
- AbstractBorder
-
def
checkIfOutsideMap(entity: CollidableProperty): Unit
Checks if an entity is outside of the playable field.
Checks if an entity is outside of the playable field. If so, repositions it inside the playable field. Used after collision between entities check.
- entity
the entity to check
- Definition Classes
- AbstractBorder
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val collisionRule: mvc.controller.levels.structure.CollisionRules.Value
-
def
computeNewPosition(): Point
Takes inside the playable field an entity that was outside
Takes inside the playable field an entity that was outside
- returns
the entity position after bounce
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
-
def
computeNewRadius(): Double
Returns the entity radius minus the radius portion outside the level borders
Returns the entity radius minus the radius portion outside the level borders
- returns
the entity radius after the operations
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
-
def
computeNewSpeed(newPosition: Point): Vector
Computes the new speed direction after colliding with the border
Computes the new speed direction after colliding with the border
- newPosition
the entity position computed at computeNewPosition()
- returns
the entity speed after bounce
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
-
var
currentPosition: Point
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
var
dimensionComponent: DimensionComponent
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
var
entityRadius: Double
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
var
entitySpeed: Vector
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasCollidedWithBorder: Boolean
Returns true if collision with border has happened
Returns true if collision with border has happened
- returns
true if collision with border has happened
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
- val height: Double
-
def
initCollisionParameters(entity: CollidableProperty): Unit
Initializes the current entity's fundamental parameters to perform border collision operations
Initializes the current entity's fundamental parameters to perform border collision operations
- entity
the current entity
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val levelCenter: Point
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
var
positionComponent: PositionComponent
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
def
reposition(): Unit
Repositions an entity (outside the map) to a legal position as close as possible to the map's edge
Repositions an entity (outside the map) to a legal position as close as possible to the map's edge
- Attributes
- protected
- Definition Classes
- RectangularBorder → AbstractBorder
-
val
restitution: Double
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
var
speedComponent: SpeedComponent
- Attributes
- protected
- Definition Classes
- AbstractBorder
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )