"""3D bindings (f32 by default, with `rapier.dim3.f64` for double precision)."""

from __future__ import annotations

from . import _rapier3d as _ext
from . import math  # noqa: F401  (re-export submodule)

# Re-export every public attribute of the underlying cdylib.
from ._rapier3d import (  # noqa: F401
    # ---- math ----
    Vec3,
    Point3,
    Rotation3,
    Quaternion,
    Isometry3,
    AngVector3,
    rotation_from_angle,
    # ---- errors ----
    RapierError,
    InvalidHandle,
    MeshConversionError,
    UrdfError,
    MjcfError,
    SerializationError,
    QueryFailure,
    MeshLoaderError,
    # ---- dynamics ----
    RigidBody,
    RigidBodyBuilder,
    RigidBodyHandle,
    RigidBodySet,
    RigidBodyType,
    LockedAxes,
    RigidBodyActivation,
    RigidBodyDamping,
    RigidBodyDominance,
    RigidBodyCcd,
    RigidBodyVelocity,
    RigidBodyForces,
    RigidBodyMassProps,
    RigidBodyPosition,
    RigidBodyAdditionalMassProps,
    MassProperties,
    IntegrationParameters,
    SpringCoefficients,
    CoefficientCombineRule,
    FrictionModel,
    IslandManager,
    CCDSolver,
    ImpulseJointSet,
    MultibodyJointSet,
    # ---- joints ----
    JointEnabled,
    MotorModel,
    JointLimits,
    JointMotor,
    JointAxesMask,
    JointAxis,
    ImpulseJointHandle,
    MultibodyJointHandle,
    MultibodyIndex,
    MultibodyLinkId,
    InverseKinematicsOption,
    FixedJoint,
    FixedJointBuilder,
    RevoluteJoint,
    RevoluteJointBuilder,
    PrismaticJoint,
    PrismaticJointBuilder,
    SphericalJoint,
    SphericalJointBuilder,
    RopeJoint,
    RopeJointBuilder,
    SpringJoint,
    SpringJointBuilder,
    GenericJoint,
    GenericJointBuilder,
    ImpulseJoint,
    MultibodyLink,
    Multibody,
    # ---- geometry ----
    Collider,
    ColliderBuilder,
    ColliderHandle,
    ColliderSet,
    ColliderType,
    ColliderEnabled,
    ColliderMaterial,
    ColliderFlags,
    ColliderParent,
    ColliderPosition,
    ColliderMassProps,
    ShapeType,
    SharedShape,
    Ball,
    Cuboid,
    Capsule,
    Triangle,
    TriMesh,
    HeightField,
    Compound,
    Cylinder,
    Cone,
    ConvexPolyhedron,
    Aabb,
    BoundingSphere,
    MeshConverter,
    TriMeshFlags,
    ActiveEvents,
    ActiveHooks,
    ActiveCollisionTypes,
    Group,
    InteractionTestMode,
    InteractionGroups,
    CollisionEventFlags,
    CollisionEvent,
    ContactForceEvent,
    ContactData,
    ContactManifold,
    ContactManifoldData,
    ContactPair,
    IntersectionPair,
    ColliderPair,
    BroadPhasePairEvent,
    BroadPhaseBvh,
    BvhOptimizationStrategy,
    NarrowPhase,
    SolverContact,
    # ---- pipeline ----
    PhysicsPipeline,
    CollisionPipeline,
    PhysicsWorld,
    QueryPipeline,
    QueryFilter,
    QueryFilterFlags,
    Ray,
    RayIntersection,
    PointProjection,
    ShapeCastHit,
    ShapeCastOptions,
    ShapeCastStatus,
    FeatureId,
    NonlinearRigidMotion,
    Counters,
    StagesCounters,
    CollisionDetectionCounters,
    SolverCounters,
    CCDCounters,
    # ---- events / hooks ----
    SolverFlags,
    PairFilterContext,
    ContactModificationContext,
    ChannelEventCollector,
    # ---- controllers ----
    AxesMask,
    CharacterLength,
    CharacterAutostep,
    CharacterCollision,
    EffectiveCharacterMovement,
    KinematicCharacterController,
    PdErrors,
    PidCorrection,
    PdController,
    PidController,
    WheelTuning,
    RayCastInfo,
    Wheel,
    DynamicRayCastVehicleController,
    # ---- debug-render ----
    DebugRenderPipeline,
    DebugRenderStyle,
    DebugRenderMode,
    DebugRenderObject,
    DebugColor,
    DebugLineCollector,
)

from ._event_handler import EventHandler, PhysicsHooks  # noqa: F401
from ._debug_render import DebugRenderBackend  # noqa: F401

# retag pyclasses with their flavor's fully-qualified module path.
from ._pickle_setup import retag_module as _retag

_retag(_ext, "rapier3d")

__version__ = _ext.__version__

__all__ = [
    "Vec3",
    "Point3",
    "Rotation3",
    "Quaternion",
    "Isometry3",
    "AngVector3",
    "rotation_from_angle",
    "RapierError",
    "InvalidHandle",
    "MeshConversionError",
    "UrdfError",
    "MjcfError",
    "SerializationError",
    "QueryFailure",
    "MeshLoaderError",
    "RigidBody",
    "RigidBodyBuilder",
    "RigidBodyHandle",
    "RigidBodySet",
    "RigidBodyType",
    "LockedAxes",
    "RigidBodyActivation",
    "RigidBodyDamping",
    "RigidBodyDominance",
    "RigidBodyCcd",
    "RigidBodyVelocity",
    "RigidBodyForces",
    "RigidBodyMassProps",
    "RigidBodyPosition",
    "RigidBodyAdditionalMassProps",
    "MassProperties",
    "IntegrationParameters",
    "SpringCoefficients",
    "CoefficientCombineRule",
    "FrictionModel",
    "IslandManager",
    "CCDSolver",
    "ImpulseJointSet",
    "MultibodyJointSet",
    # ---- joints ----
    "JointEnabled",
    "MotorModel",
    "JointLimits",
    "JointMotor",
    "JointAxesMask",
    "JointAxis",
    "ImpulseJointHandle",
    "MultibodyJointHandle",
    "MultibodyIndex",
    "MultibodyLinkId",
    "InverseKinematicsOption",
    "FixedJoint",
    "FixedJointBuilder",
    "RevoluteJoint",
    "RevoluteJointBuilder",
    "PrismaticJoint",
    "PrismaticJointBuilder",
    "SphericalJoint",
    "SphericalJointBuilder",
    "RopeJoint",
    "RopeJointBuilder",
    "SpringJoint",
    "SpringJointBuilder",
    "GenericJoint",
    "GenericJointBuilder",
    "ImpulseJoint",
    "MultibodyLink",
    "Multibody",
    "Collider",
    "ColliderBuilder",
    "ColliderHandle",
    "ColliderSet",
    "ColliderType",
    "ColliderEnabled",
    "ColliderMaterial",
    "ColliderFlags",
    "ColliderParent",
    "ColliderPosition",
    "ColliderMassProps",
    "ShapeType",
    "SharedShape",
    "Ball",
    "Cuboid",
    "Capsule",
    "Triangle",
    "TriMesh",
    "HeightField",
    "Compound",
    "Cylinder",
    "Cone",
    "ConvexPolyhedron",
    "Aabb",
    "BoundingSphere",
    "MeshConverter",
    "TriMeshFlags",
    "ActiveEvents",
    "ActiveHooks",
    "ActiveCollisionTypes",
    "Group",
    "InteractionTestMode",
    "InteractionGroups",
    "CollisionEventFlags",
    "CollisionEvent",
    "ContactForceEvent",
    "ContactData",
    "ContactManifold",
    "ContactManifoldData",
    "ContactPair",
    "IntersectionPair",
    "ColliderPair",
    "BroadPhasePairEvent",
    "BroadPhaseBvh",
    "BvhOptimizationStrategy",
    "NarrowPhase",
    "SolverContact",
    # ---- pipeline ----
    "PhysicsPipeline",
    "CollisionPipeline",
    "PhysicsWorld",
    "QueryPipeline",
    "QueryFilter",
    "QueryFilterFlags",
    "Ray",
    "RayIntersection",
    "PointProjection",
    "ShapeCastHit",
    "ShapeCastOptions",
    "ShapeCastStatus",
    "FeatureId",
    "NonlinearRigidMotion",
    "Counters",
    "StagesCounters",
    "CollisionDetectionCounters",
    "SolverCounters",
    "CCDCounters",
    # ---- events / hooks ----
    "SolverFlags",
    "PairFilterContext",
    "ContactModificationContext",
    "ChannelEventCollector",
    "EventHandler",
    "PhysicsHooks",
    # ---- controllers ----
    "AxesMask",
    "CharacterLength",
    "CharacterAutostep",
    "CharacterCollision",
    "EffectiveCharacterMovement",
    "KinematicCharacterController",
    "PdErrors",
    "PidCorrection",
    "PdController",
    "PidController",
    "WheelTuning",
    "RayCastInfo",
    "Wheel",
    "DynamicRayCastVehicleController",
    # ---- debug-render ----
    "DebugRenderPipeline",
    "DebugRenderStyle",
    "DebugRenderMode",
    "DebugRenderObject",
    "DebugColor",
    "DebugLineCollector",
    "DebugRenderBackend",
    "math",
    "__version__",
]
