/**
   * Notification that the construction phase of this node has finished. If the node would like to
   * do any internal processing, such as setting up geometry, then go for it now.
   */
  public void setupFinished() {
    if (!inSetup) return;

    super.setupFinished();

    if (pTextureProperties != null) pTextureProperties.setupFinished();
    else if (vfTextureProperties != null) vfTextureProperties.setupFinished();
  }
  /**
   * Notification that the construction phase of this node has finished. If the node would like to
   * do any internal processing, such as setting up geometry, then go for it now.
   */
  public void setupFinished() {
    if (!inSetup) return;

    super.setupFinished();

    if (pShape != null) pShape.setupFinished();

    if (vfShape != null) vfShape.setupFinished();
  }
  /**
   * Check to make sure the picking target node being added is of the correct type. If not, issue an
   * error.
   *
   * @param target The node to check that it follows the requirements
   * @throws InvalidFieldValueException The node is not a grouping or shape node
   */
  protected void checkPickTargetType(VRMLNodeType target) throws InvalidFieldValueException {

    if ((target instanceof VRMLGroupingNodeType) || (target instanceof VRMLShapeNodeType)) return;

    if (!(target instanceof VRMLProtoInstance))
      throw new InvalidFieldValueException(
          "pickTarget node not a group or shape node type: " + target.getVRMLNodeName());

    VRMLProtoInstance proto = (VRMLProtoInstance) target;
    VRMLNodeType node = proto.getImplementationNode();

    while ((node != null) && (node instanceof VRMLProtoInstance))
      node = ((VRMLProtoInstance) node).getImplementationNode();

    if ((node != null)
        && (!(node instanceof VRMLGroupingNodeType) && !(node instanceof VRMLShapeNodeType)))
      throw new InvalidFieldValueException(
          "pickTarget proto instance not a group or shape node type: " + target.getVRMLNodeName());
  }
  /**
   * Notification that the construction phase of this node has finished. If the node would like to
   * do any internal processing, such as setting up geometry, then go for it now.
   */
  public void setupFinished() {
    if (!inSetup) return;

    super.setupFinished();

    if (pPickingGeometry != null) pPickingGeometry.setupFinished();
    if (vfPickingGeometry != null) vfPickingGeometry.setupFinished();

    numPickTarget = targetList.size();
    vfPickTarget = new VRMLNodeType[numPickTarget];
    for (int i = 0; i < numPickTarget; i++) {
      VRMLNodeType p = (VRMLNodeType) targetList.get(i);
      p.setupFinished();
      vfPickTarget[i] = p;
    }

    targetList = null;

    updateChildren(vfPickTarget, numPickTarget);
  }