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 
15 
18 class DtLocalObject;
19 
20 
23 {
24  const DtLocalObject* myLocalObject = nullptr;
25  bool mySelected = false;
27 };
28 
29 using DtImGuiLocalObjectInfoPtr = std::shared_ptr<DtImGuiLocalObjectInfo>;
30 
33 {
34 public:
35  DtImGuiLocalObjectList(DtLocalObjectManager* localObjectManager);
36  virtual ~DtImGuiLocalObjectList();
37  virtual void init();
38 
40  virtual void updateImgui();
41 
42 protected:
43  static void objectAddedCallback(const DtLocalObject* obj, void* usr);
44  virtual void processObjectAdded(const DtLocalObject* obj);
45  static void objectRemovedCallback(const DtLocalObject* obj, void* usr);
46  virtual void processObjectRemoved(const DtLocalObject* obj);
47  static void objectConvertedToRemoteCallback(const DtObjectTransferredInformation& info, void* usr);
48  virtual void processObjectConvertedToRemote(const DtObjectTransferredInformation& info);
49  static void objectConvertedToLocalCallback(const DtLocalObject* obj, void* usr);
50  virtual void processObjectConvertedToLocal(const DtLocalObject* obj);
51 
52  virtual void resortList();
53 
54  virtual void updateImGuiLocalObject(const DtLocalObject* localObj, DtImGuiLocalObjectInfoPtr objInfo);
55 
56 protected:
57 
58  DtLocalObjectManager* myLocalObjectManager = nullptr;
60  std::vector<DtImGuiLocalObjectInfoPtr> mySortedObjectList;
61  bool myResortNeeded = true;
62  std::unordered_map<DtUUID, DtImGuiLocalObjectInfoPtr> myObjectInfoMap;
63 
64 };
class DtLocalObjectManager:
Definition: localObjectManager.h:164
std::unordered_map< DtUUID, DtImGuiLocalObjectInfoPtr > myObjectInfoMap
Definition: imGuiLocalObjectList.h:62
Contains the DtUUID class declaration.
Definition: localObjectManager.h:139
Renders a list of local entities, and also windows for any entities selected from that list...
Definition: imGuiLocalObjectList.h:32
#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:60
ImGuiTextFilter myInternalStateFilter
Definition: imGuiLocalObjectList.h:26
std::shared_ptr< DtImGuiLocalObjectInfo > DtImGuiLocalObjectInfoPtr
Definition: imGuiLocalObjectList.h:29
Definition: imgui.h:2080
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
const DtLocalObject * myLocalObject
Definition: imGuiLocalObjectList.h:24
Set of imGui render data that is kept on a per-entity basis.
Definition: imGuiLocalObjectList.h:22
bool mySelected
Definition: imGuiLocalObjectList.h:25
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)