|
CUGL 1.3
Cornell University Game Library
|
45 #ifndef __CU_WHEEL_OBSTACLE_H__
46 #define __CU_WHEEL_OBSTACLE_H__
48 #include <Box2D/Collision/Shapes/b2CircleShape.h>
49 #include "CUSimpleObstacle.h"
55 #pragma mark Wheel Obstacle
74 #pragma mark Scene Graph Methods
86 #pragma mark Constructors
106 CUAssertLog(
_geometry ==
nullptr,
"You must deactive physics before deleting an object");
143 virtual bool init(
const Vec2& pos,
float radius);
147 #pragma mark Static Constructors
153 static std::shared_ptr<WheelObstacle>
alloc() {
154 std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>();
155 return (result->init() ? result :
nullptr);
170 static std::shared_ptr<WheelObstacle>
alloc(
const Vec2& pos) {
171 std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>();
172 return (result->init(pos) ? result :
nullptr);
188 static std::shared_ptr<WheelObstacle>
alloc(
const Vec2& pos,
float radius) {
189 std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>();
190 return (result->init(pos,radius) ? result :
nullptr);
195 #pragma mark Dimensions
212 #pragma mark Physics Methods
virtual ~WheelObstacle()
Definition: CUWheelObstacle.h:105
virtual void createFixtures() override
static std::shared_ptr< WheelObstacle > alloc(const Vec2 &pos, float radius)
Definition: CUWheelObstacle.h:188
void markDirty(bool value)
Definition: CUObstacle.h:811
static const Vec2 ZERO
Definition: CUVec2.h:71
virtual void resetDebug() override
WheelObstacle(void)
Definition: CUWheelObstacle.h:94
static std::shared_ptr< WheelObstacle > alloc()
Definition: CUWheelObstacle.h:153
static std::shared_ptr< WheelObstacle > alloc(const Vec2 &pos)
Definition: CUWheelObstacle.h:170
b2Fixture * _geometry
Definition: CUWheelObstacle.h:70
virtual bool init() override
Definition: CUWheelObstacle.h:114
Definition: CUWheelObstacle.h:65
float getRadius() const
Definition: CUWheelObstacle.h:201
b2CircleShape _shape
Definition: CUWheelObstacle.h:68
Definition: CUSimpleObstacle.h:63
void setRadius(float value)
Definition: CUWheelObstacle.h:208
virtual bool init(const Vec2 &pos) override
Definition: CUWheelObstacle.h:128
virtual void releaseFixtures() override