forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultipleObjectsTwoCubes.scn
More file actions
55 lines (52 loc) · 3.72 KB
/
Copy pathMultipleObjectsTwoCubes.scn
File metadata and controls
55 lines (52 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" ?>
<!-- See http://wiki.sofa-framework.org/wiki/TutorialCollisionCubeObstacle.scn -->
<Node name="root" dt="0.01" gravity="0 -9.81 0">
<!-- Basic Components to perform the collision detection -->
<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.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<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.Spring"/> <!-- Needed to use components [MeshSpringForceField] -->
<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.Visual"/> <!-- Needed to use components [VisualStyle] -->
<VisualStyle displayFlags="showBehavior showCollisionModels" />
<CollisionPipeline />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<CollisionResponse response="PenalityContactForceField"/>
<MinProximityIntersection alarmDistance="1" contactDistance="0.5"/>
<DefaultAnimationLoop/>
<!-- Using a deformable cube using collision spheres -->
<Node name="Cube1">
<EulerImplicitSolver name="EulerImplicit Cube1" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver Cube1" iterations="25" tolerance="1e-5" threshold="1e-5"/>
<MechanicalObject name="Particles Cube1" template="Vec3" position="0 0 1 1 0 1 0 1 1 1 1 1 0 0 2 1 0 2 0 1 2 1 1 2" translation="0.5 2 0" />
<MeshTopology name="Topology Cube1" hexas="0 4 6 2 1 5 7 3" />
<UniformMass name="Mass Cube1" totalMass="1" />
<MeshSpringForceField name="Springs Cube1" stiffness="100" damping="1" />
<!-- Collision Models -->
<SphereCollisionModel name="Spheres For Collision Cube1" radius="0.2" />
</Node>
<!-- Using a deformable cube using collision triangles, lines and points -->
<Node name="Cube2">
<EulerImplicitSolver name="EulerImplicit Cube2" />
<CGLinearSolver name="CG Solver Cube2" iterations="25" tolerance="1e-5" threshold="1e-5"/>
<MechanicalObject name="Particles Cube2" template="Vec3" position="0 0 1 1 0 1 0 1 1 1 1 1 0 0 2 1 0 2 0 1 2 1 1 2" />
<MeshTopology name="Topology Cube2" hexas="0 4 6 2 1 5 7 3" />
<UniformMass name="Mass Cube2" totalMass="1" />
<MeshSpringForceField name="Springs Cube2" stiffness="15" damping="1" />
<!-- Collision Models -->
<TriangleCollisionModel name="Triangles For Collision" />
<LineCollisionModel name="Lines For Collision" />
<PointCollisionModel name="Points For Collision" />
</Node>
<Node name="Floor">
<MeshTopology name="Topology Floor" filename="mesh/floor.obj" />
<MechanicalObject name="Particles Floor" />
<TriangleCollisionModel name="Triangle For Collision Floor" moving="0" simulated="0" />
</Node>
</Node>