2 #include "cylinder.h"
\r
11 cylinder coreCylinder;
\r
13 double x_offset, y_offset, z_offset;
\r
19 btCollisionShape *collisionShape;
\r
20 btCollisionObject *collisionObject;
\r
22 void set_collision_object(btCollisionObject* co)
\r
24 collisionObject = co;
\r
25 topCap.set_collision_object( co );
\r
26 bottomCap.set_collision_object( co );
\r
27 coreCylinder.set_collision_object( co );
\r
30 void set_collision_shape(btCollisionShape* cs)
\r
32 collisionShape = cs;
\r
33 topCap.set_collision_shape( cs );
\r
34 bottomCap.set_collision_shape( cs );
\r
35 coreCylinder.set_collision_shape( cs );
\r
38 void create_texture(void)
\r
40 topCap.create_texture();
\r
41 bottomCap.create_texture();
\r
42 coreCylinder.create_texture();
\r
48 bottomCap.destroy();
\r
49 coreCylinder.destroy();
\r
56 coreCylinder.draw();
\r
60 // paddingFactor is the amount of padding to allow the capsule collider around the
\r
61 void create_buffers(int width_, int height_)
\r
63 topCap.create_buffers(width_, height_, true);
\r
64 bottomCap.create_buffers(width_, height_, false);
\r
65 coreCylinder.create_buffers(width_, height_);
\r