<? xml version="1.0" ? >
<Node name="root" gravity="0 -9.81 0" dt="0.02">
    <RequiredPlugin name="SofaOpenglVisual"/>
    <DefaultPipeline name="CollisionPipeline" verbose="0" />
    <BruteForceDetection name="N2" />
    <DefaultContactManager name="collision response" response="default" />
    <DiscreteIntersection/>

    <Node name="Settings" gravity="0 -9.81 0">
        <SofaDefaultPathSetting />
        <Node name="Application" gravity="0 -9.81 0">
            <VisualStyle displayFlags="showVisual hideBehaviorModels hideForceFields hideCollision hideMapping hideOptions" />
            <ViewerSetting fullscreen="0" objectPickingMethod="Selection buffer" /> <!--  cameraMode="Orthographic" -->
            <BackgroundSetting color="0.2 0 0.2" />
            <StatsSetting logTime="0" />
        </Node>
        <Node name="MouseConfiguration" gravity="0 -9.81 0">
            <VisualStyle displayFlags="showVisual hideBehaviorModels hideForceFields hideCollision hideMapping hideOptions" />
            <AttachBodyButtonSetting button="Right" stiffness="5000" arrowSize="0.2" />
            <FixPickedParticleButtonSetting button="Left" stiffness="10000" />
        </Node>
    </Node>

    <Node name="Liver" gravity="0 -9.81 0">
        <EulerImplicitSolver name="cg_odesolver" printLog="0"  rayleighStiffness="0.1" rayleighMass="0.1" />
        <CGLinearSolver template="GraphScattered" name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" />
        <MeshGmshLoader name="meshLoader" filename="mesh/liver.msh" />
        <TetrahedronSetTopologyContainer name="topo" src="@meshLoader" />
        <MechanicalObject template="Vec3d" name="dofs"  position="0 0 0" velocity="0 0 0" force="0 0 0" externalForce="0 0 0" derivX="0 0 0" free_position="0 0 0" free_velocity="0 0 0" restScale="1" />
        <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" />
        <DiagonalMass template="Vec3d" name="computed using mass density" massDensity="1" />
        <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" />
        <FixedConstraint template="Vec3d" name="FixedConstraint" indices="3 39 64" />
        <Node name="Visu" tags="Visual" gravity="0 -9.81 0">
            <MeshObjLoader name="meshLoader_0" filename="mesh/liver-smooth.obj" handleSeams="1" />
            <OglModel template="ExtVec3f" name="VisualModel" src="@meshLoader_0" />
            <BarycentricMapping template="Vec3d,ExtVec3f" name="visual mapping" mapForces="0" mapConstraints="0" mapMasses="0" input="@.." output="@VisualModel" />
        </Node>
        <Node name="Surf" gravity="0 -9.81 0">
            <SphereLoader filename="mesh/liver.sph" />
            <MechanicalObject  position="@[-1].position" />
            <SphereCollisionModel  listRadius="@[-2].listRadius" />
            <BarycentricMapping  input="@.." output="@." />
        </Node>
    </Node>
</Node>
