Class: CP::Shape::Circle
- Inherits:
-
Object
- Object
- CP::Shape::Circle
- Includes:
- CP::Shape
- Defined in:
- lib/chipmunk-ffi/shape.rb
Instance Attribute Summary
Attributes included from CP::Shape
Instance Method Summary collapse
-
#initialize(body, rad, offset_vec) ⇒ Circle
constructor
A new instance of Circle.
Methods included from CP::Shape
#bb, #body, #body=, #cache_bb, #collision_type, #collision_type=, #data, #data=, #e, #e=, #group, #group=, #layers, #layers=, reset_id_counter, #set_data_pointer, #surface_v, #surface_v=, #u, #u=
Constructor Details
#initialize(body, rad, offset_vec) ⇒ Circle
Returns a new instance of Circle.
141 142 143 144 145 146 |
# File 'lib/chipmunk-ffi/shape.rb', line 141 def initialize(body, rad, offset_vec) @body = body ptr = CP.cpCircleShapeNew body.struct.pointer, rad, offset_vec.struct @struct = ShapeStruct.new ptr set_data_pointer end |