Ejemplo n.º 1
0
  // SharedGroup specific data at SetLive.
  @Override
  void setAuxData(SetLiveState s, int index, int hkIndex) {
    int i, size;

    // Group's setAuxData()
    super.setAuxData(s, index, hkIndex);

    branchGroupPaths.add(hkIndex, s.branchGroupPaths.get(index));

    if (orderedPaths == null) {
      orderedPaths = new ArrayList<OrderedPath>(1);
    }
    orderedPaths.add(hkIndex, s.orderedPaths.get(index));

    if (switchStates == null) {
      switchStates = new ArrayList<SwitchState>(1);
    }
    switchStates.add(hkIndex, s.switchStates.get(index));

    if (viewLists == null) {
      viewLists = new ArrayList<ArrayList<View>>(1);
    }
    // If there are some ViewSpecificGroups in the path above this SharedGroup
    //	System.err.println("====> hkIndex = "+hkIndex+" s.viewLists = "+s.viewLists);
    if (s.viewLists != null) {
      viewLists.add(hkIndex, s.viewLists.get(index));
    } else {
      viewLists.add(hkIndex, null);
    }

    if (lights == null) {
      lights = new ArrayList<ArrayList<LightRetained>>(1);
    }
    if (s.lights != null) {
      lights.add(hkIndex, s.lights.get(index));
    } else {
      lights.add(hkIndex, null);
    }

    if (fogs == null) {
      fogs = new ArrayList<ArrayList<FogRetained>>(1);
    }
    if (s.fogs != null) {
      fogs.add(hkIndex, s.fogs.get(index));
    } else {
      fogs.add(hkIndex, null);
    }

    if (modelClips == null) {
      modelClips = new ArrayList<ArrayList<ModelClipRetained>>(1);
    }
    if (s.modelClips != null) {
      modelClips.add(hkIndex, s.modelClips.get(index));
    } else {
      modelClips.add(hkIndex, null);
    }

    if (altAppearances == null) {
      altAppearances = new ArrayList<ArrayList<AlternateAppearanceRetained>>(1);
    }
    if (s.altAppearances != null) {
      altAppearances.add(hkIndex, s.altAppearances.get(index));
    } else {
      altAppearances.add(hkIndex, null);
    }
  }
 void setAuxData(SetLiveState s, int index, int hkIndex) {
   super.setAuxData(s, index, hkIndex);
   perPathData[hkIndex] = new TransformGroupData();
   perPathData[hkIndex].switchState = (SwitchState) s.switchStates.get(hkIndex);
 }