⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup_ct.x3d

📁 matlab aamtool box
💻 X3D
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2005, Karljohan Lundin



 This file is part of Volume Haptics Toolkit.

 Volume Haptics Toolkit is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 Volume Haptics Toolkit is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Volume Haptics Toolkit; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

-->
<Group>
  
  <!--ImportLibrary library="lib/libVHTK.so" /-->
  <ImportLibrary library="lib/VHTK.dll" />
  
  <Background
      skyColor="0.5 0.5 0.5"/>
  
  <VolumeHaptics />
  
  <Transform
      DEF="ICONS">
    <LocalInfo DEF="INFO" />
  </Transform>    

  <Transform
      DEF="VOLUME"
      scale="1 1 1"
      rotation="1 0 0 0" >
    
    <VolumeRenderer
        planes="100" >
      
      <ImageObjectTexture>
        <ScalarVolume
            DEF="SCALAR"
            containerField="imageObject"
            url="data/sphere_128x128x128_u8.raw" >
          <ManipImageLoader
              padding="true">
            <RawImageLoader
                width="128" height="128" depth="128"
                bitsPerPixel="8"
                pixelType="LUMINANCE"
                pixelComponentType="UNSIGNED"
                pixelSize="0.001 0.001 0.001" />
          </ManipImageLoader>
        </ScalarVolume>
      </ImageObjectTexture>
      
      <RGBFunction>
        <PiecewiseFunction
            containerField="red"
            continuous="true"
            segments="0.00  0.0
                      1.00  1.0" />
        <PiecewiseFunction
            containerField="green"
            continuous="true"
            segments="0.00  0.0
                      1.00  1.0" />
        <PiecewiseFunction
            containerField="blue"
            continuous="true"
            segments="0.00  0.0
                      1.00  1.0" />
      </RGBFunction>
      <PiecewiseFunction
          containerField="alphaFunction"
          continuous="true"
          segments="0.10  0.0
                    0.20  0.1
                    0.60  0.1
                    0.70  0.3
                    1.00  0.3" />
    </VolumeRenderer>
    
    
    <ScalarSurfaceFrictionMode
        active="true" >
      
      <ScalarVolume
          USE="SCALAR" />
      
      <WindowFunction
          level=".5"
          width="1"
          roof="5"
          containerField="strength" />
      
      <WindowFunction
          level=".5"
          width="-1"
          containerField="friction" />
      
      <PiecewiseFunction
          continuous="true"
          segments="0.0  0.0,
                    0.01 1.0,
                    100  1.0"
          containerField="distinctness" />
      
    </ScalarSurfaceFrictionMode>
    
  </Transform>
  
  
  <!-- Clip Planes -->
  
  <!--ROUTE
      fromNode="VOLUME" fromField="scale"
      toNode="ICONS" toField="scale" />
  <ROUTE
      fromNode="VOLUME" fromField="rotation"
      toNode="ICONS" toField="rotation" />
  <ROUTE
      fromNode="VOLUME" fromField="translation"
      toNode="ICONS" toField="translation" /-->
  
  <PythonScript
      DEF="CLIP"
      url="python/JClipPlanes.py">
    <Group USE="VOLUME" containerField="references"/>
    <Group USE="ICONS" containerField="references"/>
    <LocalInfo USE="INFO" containerField="references"/>
  </PythonScript>
  
  <IMPORT inlineDEF="H3D_EXPORTS" exportedDEF="HDEV" AS="HDEV"/>
  <ROUTE
      fromNode="HDEV" fromField="mainButton"
      toNode="CLIP" toField="clipPlanes" />
  <ROUTE
      fromNode="HDEV" fromField="trackerPosition"
      toNode="INFO" toField="position" />
  <ROUTE
      fromNode="INFO" fromField="position"
      toNode="CLIP" toField="clipPlanes" />
  <ROUTE
      fromNode="HDEV" fromField="trackerOrientation"
      toNode="INFO" toField="orientation" />
  <ROUTE
      fromNode="INFO" fromField="orientation"
      toNode="CLIP" toField="clipPlanes" />
  
  
</Group>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -