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 void releaseFixtures() override
static std::shared_ptr< WheelObstacle > alloc(const Vec2 &pos)
Definition: CUWheelObstacle.h:170
WheelObstacle(void)
Definition: CUWheelObstacle.h:94
void markDirty(bool value)
Definition: CUObstacle.h:811
static std::shared_ptr< WheelObstacle > alloc(const Vec2 &pos, float radius)
Definition: CUWheelObstacle.h:188
virtual void createFixtures() override
virtual ~WheelObstacle()
Definition: CUWheelObstacle.h:105
void setRadius(float value)
Definition: CUWheelObstacle.h:208
Definition: CUSimpleObstacle.h:63
virtual bool init(const Vec2 &pos) override
Definition: CUWheelObstacle.h:128
float getRadius() const
Definition: CUWheelObstacle.h:201
Definition: CUWheelObstacle.h:65
virtual bool init() override
Definition: CUWheelObstacle.h:114
b2Fixture * _geometry
Definition: CUWheelObstacle.h:70
virtual void resetDebug() override
Definition: CUAnimationNode.h:52
static std::shared_ptr< WheelObstacle > alloc()
Definition: CUWheelObstacle.h:153
static const Vec2 ZERO
Definition: CUVec2.h:71
b2CircleShape _shape
Definition: CUWheelObstacle.h:68