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



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

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



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

def allowFastRotation = self[:allowFastRotation]

#allowFastRotation=(v) ⇒ Object



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

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

#angularDampingObject



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

def angularDamping = self[:angularDamping]

#angularDamping=(v) ⇒ Object



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

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

#angularVelocityObject



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

def angularVelocity = self[:angularVelocity]

#angularVelocity=(v) ⇒ Object



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

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

#enableSleepObject



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

def enableSleep = self[:enableSleep]

#enableSleep=(v) ⇒ Object



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

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

#fixedRotationObject



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

def fixedRotation = self[:fixedRotation]

#fixedRotation=(v) ⇒ Object



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

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

#gravityScaleObject



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

def gravityScale = self[:gravityScale]

#gravityScale=(v) ⇒ Object



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

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

#internalValueObject



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

def internalValue = self[:internalValue]

#internalValue=(v) ⇒ Object



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

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

#isAwakeObject



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

def isAwake = self[:isAwake]

#isAwake=(v) ⇒ Object



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

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

#isBulletObject



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

def isBullet = self[:isBullet]

#isBullet=(v) ⇒ Object



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

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

#isEnabledObject



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

def isEnabled = self[:isEnabled]

#isEnabled=(v) ⇒ Object



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

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

#linearDampingObject



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

def linearDamping = self[:linearDamping]

#linearDamping=(v) ⇒ Object



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

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

#linearVelocityObject



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

def linearVelocity = self[:linearVelocity]

#linearVelocity=(v) ⇒ Object



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

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

#nameObject



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

def name = self[:name]

#name=(v) ⇒ Object



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

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

#positionObject



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

def position = self[:position]

#position=(v) ⇒ Object



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

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

#rotationObject



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

def rotation = self[:rotation]

#rotation=(v) ⇒ Object



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

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

#sleepThresholdObject



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

def sleepThreshold = self[:sleepThreshold]

#sleepThreshold=(v) ⇒ Object



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

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

#typeObject



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

def type = self[:type]

#type=(v) ⇒ Object



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

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

#userDataObject



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

def userData = self[:userData]

#userData=(v) ⇒ Object



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

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