Class: Box2D::BodyDef

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(_type_, _position_, _rotation_, _linearVelocity_, _angularVelocity_, _linearDamping_, _angularDamping_, _gravityScale_, _sleepThreshold_, _name_, _userData_, _enableSleep_, _isAwake_, _fixedRotation_, _isBullet_, _isEnabled_, _allowFastRotation_, _internalValue_) ⇒ Object



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/box2d_types.rb', line 378

def self.create_as(_type_, _position_, _rotation_, _linearVelocity_, _angularVelocity_, _linearDamping_, _angularDamping_, _gravityScale_, _sleepThreshold_, _name_, _userData_, _enableSleep_, _isAwake_, _fixedRotation_, _isBullet_, _isEnabled_, _allowFastRotation_, _internalValue_)
  instance = BodyDef.new
  instance[:type] = _type_
  instance[:position] = _position_
  instance[:rotation] = _rotation_
  instance[:linearVelocity] = _linearVelocity_
  instance[:angularVelocity] = _angularVelocity_
  instance[:linearDamping] = _linearDamping_
  instance[:angularDamping] = _angularDamping_
  instance[:gravityScale] = _gravityScale_
  instance[:sleepThreshold] = _sleepThreshold_
  instance[:name] = _name_
  instance[:userData] = _userData_
  instance[:enableSleep] = _enableSleep_
  instance[:isAwake] = _isAwake_
  instance[:fixedRotation] = _fixedRotation_
  instance[:isBullet] = _isBullet_
  instance[:isEnabled] = _isEnabled_
  instance[:allowFastRotation] = _allowFastRotation_
  instance[:internalValue] = _internalValue_
  instance
end

Instance Method Details

#allowFastRotationObject



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

def allowFastRotation = self[:allowFastRotation]

#allowFastRotation=(v) ⇒ Object



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

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

#angularDampingObject



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

def angularDamping = self[:angularDamping]

#angularDamping=(v) ⇒ Object



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

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

#angularVelocityObject



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

def angularVelocity = self[:angularVelocity]

#angularVelocity=(v) ⇒ Object



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

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

#enableSleepObject



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

def enableSleep = self[:enableSleep]

#enableSleep=(v) ⇒ Object



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

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

#fixedRotationObject



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

def fixedRotation = self[:fixedRotation]

#fixedRotation=(v) ⇒ Object



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

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

#gravityScaleObject



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

def gravityScale = self[:gravityScale]

#gravityScale=(v) ⇒ Object



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

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

#internalValueObject



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

def internalValue = self[:internalValue]

#internalValue=(v) ⇒ Object



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

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

#isAwakeObject



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

def isAwake = self[:isAwake]

#isAwake=(v) ⇒ Object



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

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

#isBulletObject



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

def isBullet = self[:isBullet]

#isBullet=(v) ⇒ Object



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

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

#isEnabledObject



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

def isEnabled = self[:isEnabled]

#isEnabled=(v) ⇒ Object



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

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

#linearDampingObject



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

def linearDamping = self[:linearDamping]

#linearDamping=(v) ⇒ Object



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

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

#linearVelocityObject



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

def linearVelocity = self[:linearVelocity]

#linearVelocity=(v) ⇒ Object



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

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

#nameObject



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

def name = self[:name]

#name=(v) ⇒ Object



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

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

#positionObject



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

def position = self[:position]

#position=(v) ⇒ Object



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

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

#rotationObject



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

def rotation = self[:rotation]

#rotation=(v) ⇒ Object



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

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

#sleepThresholdObject



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

def sleepThreshold = self[:sleepThreshold]

#sleepThreshold=(v) ⇒ Object



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

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

#typeObject



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

def type = self[:type]

#type=(v) ⇒ Object



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

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

#userDataObject



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

def userData = self[:userData]

#userData=(v) ⇒ Object



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

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