File: TutorialCollisionCubeObstacle.scn

package info (click to toggle)
sofa-framework 1.0~beta4-11
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 88,820 kB
  • ctags: 27,300
  • sloc: cpp: 151,126; ansic: 2,387; xml: 581; sh: 417; makefile: 68
file content (33 lines) | stat: -rw-r--r-- 1,356 bytes parent folder | download | duplicates (5)
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
<?xml version="1.0" ?>
<!-- See http://wiki.sofa-framework.org/wiki/TutorialCollisionCubeObstacle.scn -->
<Node name="root" dt="0.01" gravity="0 -9.81 0" showBehavior="1" showCollision="1">
  <!-- Basic Components to perform the collision detection -->
  <CollisionPipeline/>
  <BruteForceDetection/>
  <DefaultContactManager/>
  <MinProximityIntersection/>

  <Node name="Cube">
    <EulerImplicitSolver  name="EulerImplicit" />
    <CGLinearSolver       name="CG Solver" />
    
    <MechanicalObject     name="Particles" template="Vec3d"
                          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" hexas="0 4 6 2 1 5 7 3" />
    
    <UniformMass          name="Mass" totalmass="1" />
    <MeshSpringForceField name="Springs" stiffness="100" damping="1" />

    <!-- Collision Models -->
    <TriangleModel        name="Triangles For Collision"/>
    <LineModel            name="Lines For Collision"/>
    <PointModel           name="Points For Collision"/>
  </Node>

  <Node name="Floor">       
    <MeshTopology         name="Topology Floor"  filename="mesh/floor.obj"/>
    <MechanicalObject     name="Floor Particles"/>                
    <Triangle             name="Floor Triangle For Collision" moving="0" simulated="0"/>            
  </Node>              

</Node>