Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

pandatool/src/maya/mayaApi.h

Go to the documentation of this file.
00001 // Filename: mayaApi.h
00002 // Created by:  drose (15Apr02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef MAYAAPI_H
00020 #define MAYAAPI_H
00021 
00022 #include "pandatoolbase.h"
00023 #include "distanceUnit.h"
00024 #include "coordinateSystem.h"
00025 #include "referenceCount.h"
00026 #include "pointerTo.h"
00027 
00028 class Filename;
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : MayaApi
00032 // Description : This class presents a wrapper around the global
00033 //               Maya interface.  While the reference count is held,
00034 //               it keeps the Maya interface open, and closes the
00035 //               interface when the object destructs.
00036 ////////////////////////////////////////////////////////////////////
00037 class MayaApi : public ReferenceCount {
00038 protected:
00039   MayaApi(const string &program_name);
00040   MayaApi(const MayaApi &copy);
00041   void operator = (const MayaApi &copy);
00042 
00043 public:
00044   ~MayaApi();
00045 
00046   static PT(MayaApi) open_api(string program_name = "");
00047   bool is_valid() const;
00048 
00049   bool read(const Filename &filename);
00050   bool write(const Filename &filename);
00051   bool clear();
00052 
00053   DistanceUnit get_units();
00054   CoordinateSystem get_coordinate_system();
00055 
00056 private:
00057   bool _is_valid;
00058   bool _plug_in;
00059   static MayaApi *_global_api;
00060 };
00061 
00062 #endif

Generated on Fri May 2 03:21:18 2003 for Panda-Tool by doxygen1.3