Click or drag to resize
Particle Methods

The Particle type exposes the following members.

Methods
  NameDescription
Public methodBounceOff
Updates the velocities of this particle and the specified particle according to the laws of elastic collision. Assumes that the particles are colliding at this instant.
Public methodBounceOffHorizontalWall
Updates the velocity of this particle upon collision with a horizontal wall (by reflecting the velocity in the Y-direction). Assumes that the particle is colliding with a horizontal wall at this instant.
Public methodBounceOffVerticalWall
Updates the velocity of this particle upon collision with a vertical wall (by reflecting the velocity in the X-direction). Assumes that the particle is colliding with a vertical wall at this instant.
Public methodDraw
Draws the particle as a filled circle
(Overrides BasicVisualDraw.)
Public methodKineticEnergy
Returns the kinetic energy of this particle. The kinetic energy is given by the formula 1/2 MV2, where M is the Mass of this particle and V is its velocity.
Public methodMove
Moves this particle in a straight line (based on its velocity) for the specified amount of time.
Public methodTimeToHit
Returns the amount of time for this particle to collide with the specified particle, assuming no interening collisions.
Public methodTimeToHitHorizontalWall
Returns the amount of time for this particle to collide with a horizontal wall, assuming no interening collisions.
Public methodTimeToHitVerticalWall
Returns the amount of time for this particle to collide with a vertical wall, assuming no interening collisions.
Public methodToString
Returns useful particle info for debugging
(Overrides ObjectToString.)
Top
See Also