Class: BulldogPhysics::Particles::Collisions::ParticleLink

Inherits:
ParticleContactGenerator show all
Defined in:
lib/Particles/particle_link.rb

Overview

Links connect two particles together, generating a contact if * they violate the constraints of their link. It is used as a base class for cables and rods, and could be used as a base class for springs with a limit to their extension.

Direct Known Subclasses

ParticleCable, ParticleRod

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(particle1, particle2) ⇒ ParticleLink

Returns a new instance of ParticleLink.



15
16
17
18
# File 'lib/Particles/particle_link.rb', line 15

def initialize(particle1, particle2)
  @particle1 = particle1
  @particle2 = particle2
end

Instance Attribute Details

#particle1Object

Returns the value of attribute particle1.



12
13
14
# File 'lib/Particles/particle_link.rb', line 12

def particle1
  @particle1
end

#particle2Object

Returns the value of attribute particle2.



13
14
15
# File 'lib/Particles/particle_link.rb', line 13

def particle2
  @particle2
end