/* * BallPhysicsComponent.h * * Created on: Aug 9, 2019 * Author: fredrick */ #ifndef BALLPHYSICSCOMPONENT_H_ #define BALLPHYSICSCOMPONENT_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace JamSpook { using std::chrono::milliseconds; using std::weak_ptr; using std::shared_ptr; using std::make_shared; using std::dynamic_pointer_cast; using std::string; using glm::vec3; using glm::mat4; using glm::translate; using glm::scale; using ecos::utility::getFloatInRange; using ecos::core::IDCache; using ecos::core::logging::Log; using ecos::core::logging::LogLevel; using ecos::core::Message; using ecos::core::BroadcastObservable; using ecos::physics::PhysicsSystem; using ecos::physics::PhysicsComponent; using ecos::physics::Collider; using ecos::physics::TransformChangeMessage; using ecos::physics::CollisionStateChangeMessage; using ecos::physics::ColliderQueryMessage; class BallPhysicsComponent: public ecos::physics::PhysicsComponent { public: BallPhysicsComponent(mat4 transform, shared_ptr > > entity, weak_ptr > physicsSystem, weak_ptr > > physicsCollisionSubSystem, weak_ptr > > physicsColliderQuerySubSystem, shared_ptr collider); virtual ~BallPhysicsComponent(); virtual void update(const milliseconds dtms); virtual void onICCMessage(shared_ptr message); virtual void onCollision(const string& tag); }; } // namespace JamSpook #endif // BALLPHYSICSCOMPONENT_H_