Class: BulldogPhysics::Particles::Collisions::ParticleLink
- Inherits:
-
ParticleContactGenerator
- Object
- ParticleContactGenerator
- BulldogPhysics::Particles::Collisions::ParticleLink
- 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
Instance Attribute Summary collapse
-
#particle1 ⇒ Object
Returns the value of attribute particle1.
-
#particle2 ⇒ Object
Returns the value of attribute particle2.
Instance Method Summary collapse
-
#initialize(particle1, particle2) ⇒ ParticleLink
constructor
A new instance of ParticleLink.
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
#particle1 ⇒ Object
Returns the value of attribute particle1.
12 13 14 |
# File 'lib/Particles/particle_link.rb', line 12 def particle1 @particle1 end |
#particle2 ⇒ Object
Returns the value of attribute particle2.
13 14 15 |
# File 'lib/Particles/particle_link.rb', line 13 def particle2 @particle2 end |