#ifndef EDITSCENE_RIGIDBODY_HPP
#define EDITSCENE_RIGIDBODY_HPP
#pragma once

#include <Ogre.h>
#include <Jolt/Jolt.h>
#include <Jolt/Physics/Body/BodyID.h>

/**
 * RigidBody component
 * Represents a physics body that can be static or dynamic
 * Uses children's Collider components for collision shapes
 */
struct RigidBodyComponent {
	// Body type
	enum class BodyType {
		Static,    // Non-moving (infinite mass)
		Dynamic,   // Affected by forces and collisions
		Kinematic  // Controlled by code, not physics
	};
	
	BodyType bodyType = BodyType::Static;
	
	// Mass (only used for dynamic bodies)
	float mass = 1.0f;
	
	// Physics properties
	float friction = 0.5f;
	float restitution = 0.0f; // Bounciness
	bool isSensor = false;    // Detects collisions but doesn't respond
	
	// Enable/disable physics body
	bool enabled = true;      // If false, body is removed from physics world
	
	// The Jolt body ID
	JPH::BodyID bodyID;
	bool bodyCreated = false;
	bool bodyDirty = true; // Needs rebuild
	
	void markDirty() { bodyDirty = true; }
};

#endif // EDITSCENE_RIGIDBODY_HPP
