HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
COP_CameraRegistry.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS: Global registry of the viewer cameras.
7  *
8  */
9 
10 #pragma once
11 
12 #include "COPZ_API.h"
13 
14 #include <UT/UT_Lock.h>
15 #include <OBJ/OBJ_Camera.h>
16 
17 ///
18 /// Stores cameras for other nodes to possibly retrieve
19 /// Currently only one path, ideally will allow multiple viewport
20 /// simultaneously.
21 ///
23 {
24 public:
25  class CameraInfo
26  {
27  public:
30  };
31 
32  static CameraInfo fetchCamera(const char *viewname);
33  static void stashCamera(const UT_StringHolder &viewname,
34  const CameraInfo &info);
35 
36  static void registerNode(const OP_Node *node,
37  const UT_StringHolder &viewname);
38  static void deregisterNode(const OP_Node *node);
39 
40 protected:
41  static COP_CameraRegistry *getRegistry();
42 
43  CameraInfo _fetchCamera(const char *viewname);
44  void _stashCamera(const UT_StringHolder &viewname,
45  const CameraInfo &info);
46  void _registerNode(const OP_Node *node,
47  const UT_StringHolder &viewname);
48  void _deregisterNode(const OP_Node *node);
49 
53 };
54 
55 
UT_Map< int, UT_StringHolder > myOpNodes
UT_StringMap< CameraInfo > myCameras
#define COPZ_API
Definition: COPZ_API.h:8