禁用形状旋转

disable rotation of shape

本文关键字:旋转      更新时间:2023-09-26

我有两个形状,我想禁用其中一个主题的旋转。最好的方法是什么?

    # A Cylinder
 Shape {
     appearance Appearance {
         material Material {
    diffuseColor 0.75 0.5 1.0
            specularColor 0.7 0.7 0.8
            shininess 0.1
         }
     }
     geometry Cylinder {
         height 0.2
         radius 3.
     }
 }
# A Sphere
Shape {
     appearance Appearance {
         material Material { 
         diffuseColor 0.2 0.5 0.75
         transparency 0.0
     }
     }
geometry Sphere {
    radius 1.0
}
}

谢谢

这里只有两个Shape节点,您可以在其中定义外观和几何形状(球体和圆柱体)。代码中没有任何东西可以使任何形状旋转。

如果你想摆脱旋转,那么你必须搜索到其中一个形状的相应ROUTE。同样,你的代码没有任何DEF,这意味着没有可能旋转任何形状的路由。

默认情况下,Shape不会自己旋转,除非指定了路由,或者编写了一段脚本。