Class: Teien::Event::BaseObject::SyncObject
- Inherits:
-
Object
- Object
- Teien::Event::BaseObject::SyncObject
- Defined in:
- lib/teien/base_object/base_object_event.rb
Instance Attribute Summary collapse
-
#accel ⇒ Object
Returns the value of attribute accel.
-
#angular_vel ⇒ Object
Returns the value of attribute angular_vel.
-
#attached_objects ⇒ Object
Returns the value of attribute attached_objects.
-
#id ⇒ Object
Returns the value of attribute id.
-
#linear_vel ⇒ Object
Returns the value of attribute linear_vel.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object_info ⇒ Object
Returns the value of attribute object_info.
-
#physics_info ⇒ Object
Returns the value of attribute physics_info.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#quat ⇒ Object
Returns the value of attribute quat.
Instance Method Summary collapse
-
#initialize(obj) ⇒ SyncObject
constructor
A new instance of SyncObject.
- #print ⇒ Object
Constructor Details
#initialize(obj) ⇒ SyncObject
Returns a new instance of SyncObject.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/teien/base_object/base_object_event.rb', line 33 def initialize(obj) @id = obj.id @name = obj.name @object_info = obj.object_info @physics_info = obj.physics_info @pos = Vector3D.to_self(obj.get_position()) @linear_vel = Vector3D.to_self(obj.get_linear_velocity()) @angular_vel = Vector3D.to_self(obj.get_angular_velocity()) @quat = Quaternion.to_self(obj.get_rotation()) @accel = obj.get_acceleration() @attached_objects = obj.attached_objects end |
Instance Attribute Details
#accel ⇒ Object
Returns the value of attribute accel.
29 30 31 |
# File 'lib/teien/base_object/base_object_event.rb', line 29 def accel @accel end |
#angular_vel ⇒ Object
Returns the value of attribute angular_vel.
27 28 29 |
# File 'lib/teien/base_object/base_object_event.rb', line 27 def angular_vel @angular_vel end |
#attached_objects ⇒ Object
Returns the value of attribute attached_objects.
31 32 33 |
# File 'lib/teien/base_object/base_object_event.rb', line 31 def attached_objects @attached_objects end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/teien/base_object/base_object_event.rb', line 18 def id @id end |
#linear_vel ⇒ Object
Returns the value of attribute linear_vel.
26 27 28 |
# File 'lib/teien/base_object/base_object_event.rb', line 26 def linear_vel @linear_vel end |
#mode ⇒ Object
Returns the value of attribute mode.
20 21 22 |
# File 'lib/teien/base_object/base_object_event.rb', line 20 def mode @mode end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/teien/base_object/base_object_event.rb', line 19 def name @name end |
#object_info ⇒ Object
Returns the value of attribute object_info.
22 23 24 |
# File 'lib/teien/base_object/base_object_event.rb', line 22 def object_info @object_info end |
#physics_info ⇒ Object
Returns the value of attribute physics_info.
23 24 25 |
# File 'lib/teien/base_object/base_object_event.rb', line 23 def physics_info @physics_info end |
#pos ⇒ Object
Returns the value of attribute pos.
25 26 27 |
# File 'lib/teien/base_object/base_object_event.rb', line 25 def pos @pos end |
#quat ⇒ Object
Returns the value of attribute quat.
28 29 30 |
# File 'lib/teien/base_object/base_object_event.rb', line 28 def quat @quat end |
Instance Method Details
#print ⇒ Object
50 51 52 |
# File 'lib/teien/base_object/base_object_event.rb', line 50 def print puts @name end |