123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef __PHYSICS_SPRITE_3D_H__
- #define __PHYSICS_SPRITE_3D_H__
- #include "base/ccConfig.h"
- #include "3d/CCSprite3D.h"
- #include "physics3d/CCPhysics3DObject.h"
- #include "physics3d/CCPhysics3DComponent.h"
- #if CC_USE_3D_PHYSICS
- #if (CC_ENABLE_BULLET_INTEGRATION)
- NS_CC_BEGIN
-
- class CC_DLL PhysicsSprite3D : public cocos2d::Sprite3D
- {
- public:
-
- static PhysicsSprite3D* create(const std::string &modelPath, Physics3DRigidBodyDes* rigidDes, const cocos2d::Vec3& translateInPhysics = cocos2d::Vec3::ZERO, const cocos2d::Quaternion& rotInPhsyics = cocos2d::Quaternion::ZERO);
-
-
- static PhysicsSprite3D* createWithCollider(const std::string &modelPath, Physics3DColliderDes* colliderDes, const cocos2d::Vec3& translateInPhysics = cocos2d::Vec3::ZERO, const cocos2d::Quaternion& rotInPhsyics = cocos2d::Quaternion::ZERO);
-
-
- Physics3DObject* getPhysicsObj() const;
-
-
- void setSyncFlag(Physics3DComponent::PhysicsSyncFlag syncFlag);
-
-
- void syncNodeToPhysics();
-
-
- void syncPhysicsToNode();
-
- CC_CONSTRUCTOR_ACCESS:
- PhysicsSprite3D();
- virtual ~PhysicsSprite3D();
- protected:
- Physics3DComponent* _physicsComponent;
- };
- NS_CC_END
- #endif
- #endif
- #endif
|