Skip to content

Commit 0041b6f

Browse files
committed
[examples] Update new default scene with LineAxis and centered
1 parent 32553d9 commit 0041b6f

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

examples/Demos/fallingSOFA.scn

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
<VisualStyle displayFlags="showVisual"/>
3131

3232
<!-- Define Mouse left click as a Bilateral Lagrangian constraint -->
33-
<ConstraintAttachButtonSetting />
33+
<ConstraintAttachButtonSetting/>
34+
35+
<!-- Drawing the world coordinate axis -->
36+
<LineAxis infinite="true" vanishing="true" thickness="1"/>
3437

3538
<!-- Header of the simulation -->
3639
<!-- This animation loop will add steps in the time intyegration to enable Lagrangian-based constraint solving
@@ -54,7 +57,7 @@
5457
<!-- Non-simulated node used to create underlying deformable topology -->
5558
<Node name="BeamDomainFromGridTopology">
5659
<!-- Computes a hexahedral topology based on a parametric grid -->
57-
<RegularGridTopology name="HexaTop" n="15 3 6" min="0 0.02 0" max="0.5 0.08 0.22"/>
60+
<RegularGridTopology name="HexaTop" n="15 3 6" min="-0.25 0.02 0.5" max="0.25 0.08 0.72"/>
5861

5962
<Node name="TetraTopology">
6063
<!-- Transform the hexahedral topology into a tetrahedral topology
@@ -106,32 +109,32 @@
106109

107110
<!-- Visual model is made up of all the parts of the logo, mapped using barycentric mapping -->
108111
<Node name="VisuLogo">
109-
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/LogoVisu.obj" scale3d="0.015 0.015 0.015" translation="0 0.05 0" rotation="180 0 0"/>
112+
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/LogoVisu.obj" scale3d="0.015 0.015 0.015" translation="-0.25 0.05 0.5" rotation="180 0 0"/>
110113
<!-- This replaces MechanicalObject for nodes that are only there for visualization -->
111114
<OglModel name="VisualModel" color="0.7 .35 0 1.0" position="@SurfaceLoader.position" triangles="@SurfaceLoader.triangles" />
112115
<BarycentricMapping name="MappingVisu" input="@../mstate" output="@VisualModel" isMechanical="false" />
113116
</Node>
114117

115118
<Node name="VisuS">
116-
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/SVisu.obj" scale3d="0.015 0.015 0.015" translation="0 0.05 0" rotation="180 0 0"/>
119+
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/SVisu.obj" scale3d="0.015 0.015 0.015" translation="-0.25 0.05 0.5" rotation="180 0 0"/>
117120
<OglModel name="VisualModel" color="0.7 0.7 0.7 1" position="@SurfaceLoader.position" triangles="@SurfaceLoader.triangles" />
118121
<BarycentricMapping name="MappingVisu" input="@../mstate" output="@VisualModel" isMechanical="false" />
119122
</Node>
120123

121124
<Node name="VisuO">
122-
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/O.obj" scale3d="0.015 0.015 0.015" translation="0 0.05 0" rotation="180 0 0"/>
125+
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/O.obj" scale3d="0.015 0.015 0.015" translation="-0.25 0.05 0.5" rotation="180 0 0"/>
123126
<OglModel name="VisualModel" color="0.7 0.7 0.7 1" position="@SurfaceLoader.position" triangles="@SurfaceLoader.triangles" />
124127
<BarycentricMapping name="MappingVisu" input="@../mstate" output="@VisualModel" isMechanical="false" />
125128
</Node>
126129

127130
<Node name="VisuF">
128-
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/FVisu.obj" scale3d="0.015 0.015 0.015" translation="0 0.05 0" rotation="180 0 0"/>
131+
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/FVisu.obj" scale3d="0.015 0.015 0.015" translation="-0.25 0.05 0.5" rotation="180 0 0"/>
129132
<OglModel name="VisualModel" color="0.7 0.7 0.7 1" position="@SurfaceLoader.position" triangles="@SurfaceLoader.triangles" />
130133
<BarycentricMapping name="MappingVisu" input="@../mstate" output="@VisualModel" isMechanical="false" />
131134
</Node>
132135

133136
<Node name="VisuA">
134-
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/AVisu.obj" scale3d="0.015 0.015 0.015" translation="0 0.05 0" rotation="180 0 0"/>
137+
<MeshOBJLoader name="SurfaceLoader" filename="mesh/SofaScene/AVisu.obj" scale3d="0.015 0.015 0.015" translation="-0.25 0.05 0.5" rotation="180 0 0"/>
135138
<OglModel name="VisualModel" color="0.7 0.7 0.7 1" position="@SurfaceLoader.position" triangles="@SurfaceLoader.triangles" />
136139
<BarycentricMapping name="MappingVisu" input="@../mstate" output="@VisualModel" isMechanical="false" />
137140
</Node>
@@ -147,8 +150,8 @@
147150
<VisualStyle displayFlags="showCollisionModels"/>
148151
<!-- Surface triangles are defined by hand -->
149152
<TriangleSetTopologyContainer name="CubeTopo"
150-
position="0.2 0 -0.5 0.2 0.1 -0.5 0.3 0.1 -0.5 0.3 0 -0.5
151-
0.2 0 -0.6 0.2 0.1 -0.6 0.3 0.1 -0.6 0.3 0 -0.6"
153+
position="-0.05 0 0 -0.05 0.1 0 0.05 0.1 0 0.05 0 0
154+
-0.05 0 -0.1 -0.05 0.1 -0.1 0.05 0.1 -0.1 0.05 0 -0.1"
152155
triangles="0 2 1 0 3 2
153156
0 1 5 0 5 4
154157
0 4 7 0 7 3

examples/Demos/fallingSOFA.scn.view

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Camera version="1.0">
33
<!--Vector of 3 reals (x, y, z)-->
4-
<position value="0.25 -1.1 -0.20"/>
4+
<position value="0 -1.1 0.30"/>
55
<!--Quaternion (x, y, z, w)-->
66
<orientation value="0.707 0 0 0.707"/>
77
<!--Real-->

0 commit comments

Comments
 (0)