//=========================================================================
//#
//#  vtkActorToPF.h                                   ##   ##
//#                                                   ##   ## 
//#  Authors: Paul Rajlich                            #######
//#  Email: prajlich@ncsa.uiuc.edu                    ##   ##
//#  Date created:                                    ##   ##
//#
//#  Description: function prototypes
//#
//=========================================================================
//# Copyright (C) 1997-2006 Paul Rajlich, NCSA
//# Distributed under the terms of the GNU Library General Public License (LGPL)
//# as published by the Free Software Foundation
//=========================================================================

#ifndef VTK_ACTOR_TO_PF_H
#define VTK_ACTOR_TO_PF_H

#include <Performer/pf/pfTraverser.h>
#include <Performer/pf/pfGeode.h>
#include <Performer/pr/pfGeoSet.h>
#include <Performer/pr/pfLPointState.h>
#include <Performer/pfutil.h>
#include "vtkActor.h"
#include "vtkPolyDataMapper.h"
#ifdef VTK4
#include "vtkCellArray.h"
#endif
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cmath>
#ifndef WIN32
#include <unistd.h>
#else
#include <windows.h>
#endif
#include <fcntl.h>

// vtkActorToPF - translates vtkActor to pfGeode. If geode is NULL, new one
//   will be created. Optional verbose parameter prints debugging and
//   performance information.
pfGeode* vtkActorToPF(vtkActor *actor, pfGeode *geode = NULL, int verbose=0);

// helper functions
void vtkActorToGeoSets(vtkActor *actor, pfGeoSet *gsets[], int verbose);
pfGeoSet *processPrimitive(vtkActor *a, vtkCellArray *prims, int pType, int v);
void updateTexture(vtkActor *actor, pfGeoSet *gset, pfGeoState *gstate, int v);

#endif
