Xj3D Clipping Examples

A single clipping plane

#X3D V3.0 utf8

PROFILE Immersive
COMPONENT xj3d_Clipping:1

Background {
  skyColor [ 0 0 0.5 ]
}

Group {
  children [
    ClipPlane {
    }
    Transform {
      translation -2 0 0
      children [
        ClipPlane {
          plane 1 0 0 0
        }
        Shape {
          appearance Appearance {
            material Material {
              emissiveColor 0 1 0
            }
          }
          geometry DEF SPHERE_GEOM Sphere { radius 2 }
        }
      ]
    }
  ]
}

Nested clip planes at different levels

#X3D V3.0 utf8

PROFILE Immersive
COMPONENT xj3d_Clipping:1

Background {
  skyColor [ 0 0 0.5 ]
}

Group {
  children [
    ClipPlane {
    }
    Transform {
      translation -2 0 0
      children [
        ClipPlane {
          plane 1 0 0 0
        }
        Shape {
          appearance Appearance {
            material Material {
              emissiveColor 0 1 0
            }
          }
          geometry DEF SPHERE_GEOM Sphere { radius 2 }
        }
      ]
    }
    Transform {
      translation 2 0 0
      children [
        ClipPlane {
          plane 1 1 0 0
        }
        Shape {
          appearance Appearance {
            material Material {
              emissiveColor 1 0 0
            }
          }
          geometry Sphere { radius 1 }
        }
      ]
    }
  ]
}


[ Xj3D Homepage | Xj3D @ Web3d | Screenshots | Dev docs | Dev Releases | Contributors | Getting Started ]
Last updated: $Date: 2004-10-13 20:10:19 $