#pragma once #include "shared.hpp" #include "vector.hpp" #include "simulation/object.hpp" #include "base_vehicle.hpp" #define BT_NO_SIMD_OPERATOR_OVERLOADS #include "btBulletCollisionCommon.h" #include "btBulletDynamicsCommon.h" #include "BulletCollision/Gimpact/btGImpactShape.h" namespace ace { namespace vehicledamage { enum SELECTION_SEARCH_TYPE { AVERAGE_CENTER, POINTS, FACES }; class base_vehicle { public: base_vehicle(uint32_t, ace::simulation::object_p, ace::vector3); ~base_vehicle(); bool simulate(); void transform(void); float surface_raycast(const ace::vector3 &, const ace::vector3 &, std::vector> &); float thickness(const ace::vector3 &, const ace::vector3 &); std::vector> selection_position(const uint32_t, const std::string &, const SELECTION_SEARCH_TYPE); std::vector> selection_by_name_vertices(const uint32_t, const std::string &); ace::simulation::named_selection_p selection_by_name(const uint32_t, const std::string &); // Bullet physx objects uint32_t id; int fire_lod; ace::vector3 direction; ace::vector3 up; std::shared_ptr bt_mesh; std::shared_ptr bt_shape; std::shared_ptr bt_object; std::shared_ptr bt_body; std::map animation_state; ace::simulation::object_p object; protected: }; } }