Class: Box2D::SurfaceMaterial

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/box2d_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_as(_friction_, _restitution_, _rollingResistance_, _tangentSpeed_, _userMaterialId_, _customColor_) ⇒ Object



454
455
456
457
458
459
460
461
462
463
# File 'lib/box2d_types.rb', line 454

def self.create_as(_friction_, _restitution_, _rollingResistance_, _tangentSpeed_, _userMaterialId_, _customColor_)
  instance = SurfaceMaterial.new
  instance[:friction] = _friction_
  instance[:restitution] = _restitution_
  instance[:rollingResistance] = _rollingResistance_
  instance[:tangentSpeed] = _tangentSpeed_
  instance[:userMaterialId] = _userMaterialId_
  instance[:customColor] = _customColor_
  instance
end

Instance Method Details

#customColorObject



452
# File 'lib/box2d_types.rb', line 452

def customColor = self[:customColor]

#customColor=(v) ⇒ Object



453
# File 'lib/box2d_types.rb', line 453

def customColor=(v) self[:customColor] = v end

#frictionObject



442
# File 'lib/box2d_types.rb', line 442

def friction = self[:friction]

#friction=(v) ⇒ Object



443
# File 'lib/box2d_types.rb', line 443

def friction=(v) self[:friction] = v end

#restitutionObject



444
# File 'lib/box2d_types.rb', line 444

def restitution = self[:restitution]

#restitution=(v) ⇒ Object



445
# File 'lib/box2d_types.rb', line 445

def restitution=(v) self[:restitution] = v end

#rollingResistanceObject



446
# File 'lib/box2d_types.rb', line 446

def rollingResistance = self[:rollingResistance]

#rollingResistance=(v) ⇒ Object



447
# File 'lib/box2d_types.rb', line 447

def rollingResistance=(v) self[:rollingResistance] = v end

#tangentSpeedObject



448
# File 'lib/box2d_types.rb', line 448

def tangentSpeed = self[:tangentSpeed]

#tangentSpeed=(v) ⇒ Object



449
# File 'lib/box2d_types.rb', line 449

def tangentSpeed=(v) self[:tangentSpeed] = v end

#userMaterialIdObject



450
# File 'lib/box2d_types.rb', line 450

def userMaterialId = self[:userMaterialId]

#userMaterialId=(v) ⇒ Object



451
# File 'lib/box2d_types.rb', line 451

def userMaterialId=(v) self[:userMaterialId] = v end