forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VolumetricRendering] Fix the compilation
But scenes crash
- Loading branch information
Showing
12 changed files
with
121 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 20 additions & 12 deletions
32
applications/plugins/VolumetricRendering/examples/OglTetrahedralModel.scn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<Node name="root" dt="0.02"> | ||
|
||
<MeshVTKLoader name="loader" filename="mesh/raptorTetra_8418.vtu" /> | ||
<MechanicalObject src="@loader" template="Vec3d" /> | ||
<include href="Objects/TetrahedronSetTopology.xml" src="@loader" /> | ||
|
||
<Node> | ||
<OglShader geometryVerticesOut="12" geometryInputType="10" geometryOutputType="5" vertFilename="shaders/tetra.vert" geoFilename="shaders/tetra_triangles.geo" fragFilename="shaders/tetra.frag" /> | ||
<OglFloat4Variable id="vertexColor" value="1 1 0 1"/> | ||
<OglFloatVariable id="tetraScale" value="0.8"/> | ||
<OglFloatVariable id="u_enableLight" value="2"/> | ||
<OglTetrahedralModel template="Vec3d" /> | ||
</Node> | ||
<RequiredPlugin name="Sofa.Component.IO.Mesh"/> <!-- Needed to use components [MeshVTKLoader] --> | ||
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms,TetrahedronSetTopologyContainer,TetrahedronSetTopologyModifier] --> | ||
<RequiredPlugin name="Sofa.GL.Component.Shader"/> <!-- Needed to use components [OglFloat4Variable,OglFloatVariable,OglShader] --> | ||
<RequiredPlugin name="SofaCUDA"/> | ||
<RequiredPlugin name="VolumetricRendering"/> | ||
|
||
</Node> | ||
<DefaultAnimationLoop/> | ||
<MeshVTKLoader name="loader" filename="mesh/raptorTetra_8418.vtu" /> | ||
<MechanicalObject src="@loader" template="Vec3d" /> | ||
<include href="Objects/TetrahedronSetTopology.xml" src="@loader" /> | ||
|
||
<Node> | ||
<OglShader geometryVerticesOut="12" geometryInputType="10" geometryOutputType="5" fileVertexShaders="['shaders/tetra.vert']" fileGeometryShaders="['shaders/tetra_triangles.geo']" fileFragmentShaders="['shaders/tetra.frag']" /> | ||
<OglFloat4Variable id="vertexColor" value="1 1 0 1"/> | ||
<OglFloatVariable id="tetraScale" value="0.8"/> | ||
<OglFloatVariable id="u_enableLight" value="2"/> | ||
<OglTetrahedralModel template="Vec3d" /> | ||
</Node> | ||
|
||
</Node> |
27 changes: 16 additions & 11 deletions
27
applications/plugins/VolumetricRendering/examples/OglVolumetricModel_hexa.scn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
<?xml version="1.0"?> | ||
<Node name="root" dt="0.02"> | ||
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [HexahedronSetTopologyContainer] --> | ||
<RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [SparseGridTopology] --> | ||
<RequiredPlugin name="Sofa.GL.Component.Shader"/> <!-- Needed to use components [OglFloatVariable,OglShader] --> | ||
<RequiredPlugin name="VolumetricRendering" /> | ||
|
||
<SparseGridTopology name="grid" n="51 51 51" fileTopology="mesh/raptor_8kp.obj" /> | ||
<DefaultAnimationLoop/> | ||
<SparseGridTopology name="grid" n="51 51 51" fileTopology="mesh/raptor_8kp.obj" /> | ||
|
||
<MechanicalObject template="Vec3d" /> | ||
<HexahedronSetTopologyContainer hexahedra="@grid.hexahedra" /> | ||
<MechanicalObject template="Vec3d" /> | ||
<HexahedronSetTopologyContainer hexahedra="@grid.hexahedra" /> | ||
|
||
<Node> | ||
<OglShader geometryVerticesOut="12" geometryInputType="10" geometryOutputType="5" | ||
vertFilename="share/shaders/tetra.vert" geoFilename="share/shaders/tetra_triangles.geo" fragFilename="share/shaders/tetra.frag" /> | ||
<OglFloatVariable id="volumeScale" value="0.9"/> | ||
<OglFloatVariable id="u_enableLight" value="1"/> | ||
<OglVolumetricModel printLog="false" color="1 0 1 1" /> | ||
</Node> | ||
<Node> | ||
<OglShader geometryVerticesOut="12" geometryInputType="10" geometryOutputType="5" | ||
fileVertexShaders="['share/shaders/tetra.vert']" fileGeometryShaders="['share/shaders/tetra_triangles.geo']" fileFragmentShaders="['share/shaders/tetra.frag']" /> | ||
<OglFloatVariable id="volumeScale" value="0.9"/> | ||
<OglFloatVariable id="u_enableLight" value="1"/> | ||
<OglVolumetricModel printLog="false" color="1 0 1 1" /> | ||
</Node> | ||
|
||
</Node> | ||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.