From 58ede40ed98750098bb279b8e77e9795f094fb2e Mon Sep 17 00:00:00 2001 From: mogemimi Date: Tue, 30 Aug 2016 11:23:14 +0900 Subject: [PATCH] Add missing definition of PhysicsBody::getFirstShape (Revert part of #13923) (#16458) --- cocos/physics/CCPhysicsBody.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cocos/physics/CCPhysicsBody.h b/cocos/physics/CCPhysicsBody.h index 8c365d0cb1..e11b54126c 100644 --- a/cocos/physics/CCPhysicsBody.h +++ b/cocos/physics/CCPhysicsBody.h @@ -200,6 +200,13 @@ public: */ inline const Vector& getShapes() const { return _shapes; } + /** + * Get the first shape of the body shapes. + * + * @return The first shape in this body. + */ + inline PhysicsShape* getFirstShape() const { return _shapes.size() >= 1 ? _shapes.at(0) : nullptr; } + /** * get the shape of the body. *