Пример #1
0
  /** Clear the child node list of all children - both VRML and OpenGL. */
  protected void clearChildren() {

    int size = vfChildren.size();
    for (int i = 0; i < size; i++) {
      OGLVRMLNode node = (OGLVRMLNode) vfChildren.get(i);
      Node ogl_node = (Node) oglChildMap.get(node);
      removedChildren.add(ogl_node);
      oglChildMap.remove(node);
    }

    if (!inSetup) {
      if (implGroup.isLive()) {
        implGroup.boundsChanged(this);
      } else {
        removedChildren.clear();
        implGroup.removeAllChildren();
      }
    }

    if (sensorList != null) sensorList.clear();

    OGLUserData data = (OGLUserData) implGroup.getUserData();

    if (data != null) {
      data.sensors = null;
    }

    super.clearChildren();
  }