11 #ifndef GUI_SceneCameras_h
12 #define GUI_SceneCameras_h
45 CameraInfo() : myType(OBJ_NODE), myOpId(-999), myAltOpId(-999) {}
49 : myType(OBJ_NODE), myOpId(op_id), myIsLight(false) {}
52 : myType(OBJ_NODE), myOpId(op_id), myIsLight(true) {}
55 : myType(DRAWABLE), myLookId(look_id), myName(name) {}
58 : myType(GEO_PRIM), myOpId(op_id), myIndex(index), myName(name),
63 : myType(type), myOpId(op_id), myName(name), myIsLight(is_light),
68 if(cam.
isValid() != isValid() ||
69 myType != cam.myType ||
70 myOpId != cam.myOpId ||
71 myLookId != cam.myLookId ||
72 myIsLight != cam.myIsLight)
76 if(myType == GEO_PRIM && myIndex != cam.myIndex)
78 if((myType == COP_NODE || myType == USD_PRIM) && myName!=cam.myName)
88 int opId()
const {
return myOpId; }
89 int lookId()
const {
return myLookId; }
93 bool isLight()
const {
return myIsLight; }
101 bool myIsLight =
false;
111 void removeCameras(
int look_id);
113 bool hasCameras(
int look_id)
const {
return myCameras.contains(look_id); }
116 void getCameras(
UT_Array<std::pair<UT_StringHolder,CameraInfo>> &cams,
117 ContextType menu_type);
120 void getLights(
UT_Array<std::pair<UT_StringHolder,CameraInfo>> &lights,
121 ContextType menu_type);
124 const CameraInfo &camera);
127 const CameraInfo &camera);
132 SourceType cam_source,
Collection class for all cameras in a scene, from all sources.
CameraInfo(int op_id, GA_Index index, const UT_StringHolder &name)
CameraInfo(int op_id, const UT_StringHolder &name, SourceType type, bool is_light, int alt_op=-999)
DrawableBinding
The binding that drawable cameras are registered with.
GLint GLint GLsizei GLint GLenum GLenum type
CameraInfo(int op_id, LightType)
bool hasCameras(int look_id) const
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
UT_StringHolder getCameraName(const cgltf_data &data, const cgltf_camera &camera)
GLuint const GLchar * name
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
CameraInfo(int look_id, const UT_StringHolder &name, TypeGT)
UT_Map< int, UT_StringMap< CameraInfo > > myCameras
GUI_SceneCameras::SourceType type() const
bool operator==(const CameraInfo &cam) const
GA_Index primIndex() const
SourceType
Where the camera is generated from.
const UT_StringHolder & name() const