VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
imGuiLocalObjectList.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
6 #pragma once
7 
9 #include <vector>
10 #include <memory>
11 #include "makImgui/imgui.h"
12 #include <unordered_map>
13 #include "vrfutil/uuid.h"
14 
16 class DtLocalObject;
17 
18 
21 {
22  const DtLocalObject* myLocalObject = nullptr;
23  bool mySelected = false;
25 };
26 
27 using DtImGuiLocalObjectInfoPtr = std::shared_ptr<DtImGuiLocalObjectInfo>;
28 
31 {
32 public:
33  DtImGuiLocalObjectList(DtLocalObjectManager* localObjectManager);
34  virtual ~DtImGuiLocalObjectList();
35  virtual void init();
36 
38  virtual void updateImgui();
39 
40 protected:
41  static void objectAddedCallback(const DtLocalObject* obj, void* usr);
42  virtual void processObjectAdded(const DtLocalObject* obj);
43  static void objectRemovedCallback(const DtLocalObject* obj, void* usr);
44  virtual void processObjectRemoved(const DtLocalObject* obj);
45 
46  virtual void resortList();
47 
48  virtual void updateImGuiLocalObject(const DtLocalObject* localObj, DtImGuiLocalObjectInfoPtr objInfo);
49 
50 protected:
51 
52  DtLocalObjectManager* myLocalObjectManager = nullptr;
54  std::vector<DtImGuiLocalObjectInfoPtr> mySortedObjectList;
55  bool myResortNeeded = true;
56  std::unordered_map<DtUUID, DtImGuiLocalObjectInfoPtr> myObjectInfoMap;
57 
58 };
class DtLocalObjectManager:
Definition: localObjectManager.h:157
std::unordered_map< DtUUID, DtImGuiLocalObjectInfoPtr > myObjectInfoMap
Definition: imGuiLocalObjectList.h:56
Contains the DtUUID class declaration.
Renders a list of local entities, and also windows for any entities selected from that list...
Definition: imGuiLocalObjectList.h:30
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::vector< DtImGuiLocalObjectInfoPtr > mySortedObjectList
This list will be maintained in the order that the entities are being displayed in the table...
Definition: imGuiLocalObjectList.h:54
ImGuiTextFilter myInternalStateFilter
Definition: imGuiLocalObjectList.h:24
std::shared_ptr< DtImGuiLocalObjectInfo > DtImGuiLocalObjectInfoPtr
Definition: imGuiLocalObjectList.h:27
Definition: imgui.h:2080
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
const DtLocalObject * myLocalObject
Definition: imGuiLocalObjectList.h:22
Set of imGui render data that is kept on a per-entity basis.
Definition: imGuiLocalObjectList.h:20
bool mySelected
Definition: imGuiLocalObjectList.h:23
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)