[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lod examples in inventor, vrml




the LOD construct is easy to use -- just define
a range of distances, and a model to use when
the eye is in each range.  so, at least in 
inventor the proximity volumes are spheres,
not axis-aligned boxes.  VRML might be smarter
(i've included the output of ivToVRML as well).



#Inventor V2.0 ascii

# example of LOD node
LOD {
  # defines eye-object distance
  center 0 0 0

  # N ranges gives N+1 intervals
  range [ 5, 9, 15 ]

  # so specify N+1 == 4 children

  # highest LOD
  Cone {}

  # ...
  Sphere {}

  # ...
  Cylinder {}

  # lowest LOD
  Cube {}
}


#VRML V1.0 ascii

Separator {
    DEF Viewer Info {
        string  "Examiner"
    }
    DEF Cameras Switch {
        whichChild      -1
        DEF Home PerspectiveCamera {
            position    0 0 4.18154
        }
    }
    LOD {
        center  0 0 0
        range   [ 5, 9, 15 ]
        Cone {
        }
        Sphere {
        }
        Cylinder {
        }
        Cube {
        }
    }
}