-
Notifications
You must be signed in to change notification settings - Fork 299
/
ImageTransform.scn
31 lines (26 loc) · 1.73 KB
/
ImageTransform.scn
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
<?xml version="1.0"?>
<!-- example of how to give translation parameter to an image and update it every time step-->
<Node name="root" gravity="0 -10 0" dt="0.01" >
<Node name="plugins">
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] -->
<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.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
<RequiredPlugin name="image"/> <!-- Needed to use components [ImageContainer ImageTransform ImageViewer] -->
</Node>
<EulerImplicitSolver rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver template="GraphScattered" iterations="200" threshold="1e-12" tolerance="1e-5"/>
<MechanicalObject name="meca" template="Rigid3d" translation="7 7 0" />
<UniformMass template="Rigid3d" totalMass="10"/>
<Node name="Visu">
<OglModel name="Visual" filename="mesh/cube.obj" translation="7 7 0"/>
<RigidMapping input="@../meca" output="@Visual" />
</Node>
<Node name="image">
<ImageContainer name="image" filename="textures/cubemap_bk.bmp" drawBB="false"/>
<ImageTransform name="transform" translation="@../meca.position" isPerspective="true" scale="0.1 0.1 15" update="1"/>
<ImageViewer name="viewer" src="@image" />
</Node>
</Node>