<?xml version="1.0"?>
<Node name="root" gravity="0 0 -9.81" dt="0.005">
    <RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase BruteForceBroadPhase CollisionPipeline] -->
    <RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
    <RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [LineCollisionModel PointCollisionModel SphereCollisionModel TriangleCollisionModel] -->
    <RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] -->
    <RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshOBJLoader] -->
    <RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
    <RequiredPlugin name="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [BarycentricMapping] -->
    <RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
    <RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
    <RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [HexahedronFEMForceField] -->
    <RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
    <RequiredPlugin name="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] -->
    <RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [SparseGridTopology] -->
    <RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
    <RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
    <VisualStyle displayFlags="showVisual showBehaviorModels showInteractionForceFields showCollisionModels showMechanicalMappings" />
    <DefaultAnimationLoop/>

    <CollisionPipeline name="DefaultCollisionPipeline" verbose="0" draw="0" depth="6" />
    <BruteForceBroadPhase/>
    <BVHNarrowPhase/>
    <MinProximityIntersection name="Proximity" alarmDistance="3" contactDistance="2" />
    <CollisionResponse name="Response" response="PenalityContactForceField" />
    <Node name="Object" gravity="0 -9.81 0">
        <EulerImplicitSolver name="Implicit Euler Solver"  rayleighStiffness="0.1" rayleighMass="0.1" />
        <CGLinearSolver template="GraphScattered" name="Conjugate Gradient" iterations="25" tolerance="1e-5" threshold="1e-10"/>
        <SparseGridTopology name="Embedded Sparse Grid" fileTopology="mesh/dragon.obj" n="7 6 5" />
        <MechanicalObject template="Vec3" name="Particles" restScale="1" position="0 0 0" />
        <UniformMass template="Vec3" name="Mass" totalMass="10"/>
        <HexahedronFEMForceField template="Vec3" name="FEM" poissonRatio="0.45" youngModulus="200" />
        <Node name="VisualNode" gravity="0 -9.81 0">
            <MeshOBJLoader name="meshLoader_1" filename="mesh/dragon.obj" handleSeams="1" />
            <OglModel name="Objective" src="@meshLoader_1" />
            <BarycentricMapping template="Vec3,Vec3" name="Visual Mapping" output="@Objective"  />
        </Node>
        <Node name="CollisionNode" gravity="0 -9.81 0">
            <MeshOBJLoader name="meshLoader1" filename="mesh/cube.obj" />
            <MeshTopology name="Mesh" src="@meshLoader1" />
            <MechanicalObject template="Vec3" name="CollisionObject" scale3d="6 6 6" restScale="1" />
            <SphereCollisionModel name="Spheres" contactStiffness="1000" />
            <BarycentricMapping template="Vec3,Vec3" name="MechanicalMapping"  />
        </Node>
    </Node>
    <Node name="Obstacle" gravity="0 -9.81 0">
        <MeshOBJLoader name="meshLoader2" filename="mesh/cube.obj" />
        <MeshTopology name="Mesh" src="@meshLoader2" />
        <MechanicalObject template="Vec3" name="Obstacle" translation="0 0 -10" rotation="0 0 0" scale3d="40 40 0.1" restScale="1" />
        <TriangleCollisionModel template="Vec3" name="Triangles" moving="0" simulated="0" contactStiffness="500" contactFriction="0.01" />
        <LineCollisionModel name="Lines" moving="0" simulated="0" contactStiffness="500" contactFriction="0.01" />
        <PointCollisionModel name="Points" moving="0" simulated="0" contactStiffness="500" contactFriction="0.01" />
        <MeshOBJLoader name="meshLoader_0" filename="mesh/cube.obj" translation="0 0 -10" rotation="0 0 0" scale3d="40 40 0.1" handleSeams="1" />
        <OglModel name="Visual" src="@meshLoader_0" material="Default Diffuse 1 0.5 0.5 0.5 1 Ambient 1 0.1 0.1 0.1 1 Specular 0 0.5 0.5 0.5 1 Emissive 0 0.5 0.5 0.5 1 Shininess 0 45" />
    </Node>
</Node>
