VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtExampleEffectsDriver.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 #pragma once
10 
11 #include "exampleEffectsPlugin.h"
12 
13 #include <vrvCore/DtDriver.h>
15 
16 #include <unordered_map>
17 
18 #include <matrix/vlTaitBryan.h>
19 #include <matrix/vlVector.h>
20 
21 namespace makVrv
22 {
23  class DtDe;
24  class DtEntityFacade;
25  class DtParticleSystemModelAgent;
26  class MyParticleSystemModelAgent;
27 }
28 
29 
33 {
34 public:
35 
38 
40  virtual ~DtExampleEffectsDriver();
41 
44 
47  virtual const std::string& className() const;
48 
51  virtual bool onStart();
52 
55  virtual bool onStop();
56 
59  virtual bool onTick();
60 
63  virtual void slot_displayEngineAdded( const makVrv::DtDeRecord& igRecord );
65 
67  virtual void toggleDamage(makVrv::DtDe& de);
68 
69  // Function for connecting our color-based key bindings to the
70  // particile system shader manager
71  virtual void changeColorOverride(int color, float deltaChange);
72 
73 protected:
74 
77  makVrv::DtEntityFacade* createEntityFacade( makVrv::DtAgentManager& am, makVrv::DtElementID elementId,
78  const makVrv::DtModelSetRealizationManager::ModelSetRealizations& modelSets, bool distribute );
79 
80 protected:
81 
82  typedef std::unordered_map<int,makVrv::DtUniqueID> SceneObjectIdsByModelSet;
84 
86 
88 
89  // Agents for creating the flames, smoke plume, and detonation effects. Note
90  // that for the smoke plume, we use our extended MyParticleSystemModel, which
91  // creates a shader to modify the smoke plume color
92  makVrv::DtParticleSystemModelAgent* myFlamesAgent;
93  makVrv::MyParticleSystemModelAgent* mySmokePlumeAgent;
94  makVrv::DtParticleSystemModelAgent* myDetonationAgent;
95 };
Contains makVrv::DtModelSetRealizationManager class.
makVrv::DtParticleSystemModelAgent * myFlamesAgent
Definition: DtExampleEffectsDriver.h:92
#define DT_DLL_EXAMPLEEFFECTSPLUGIN
Definition: exampleEffectsPlugin.h:18
A Record of an IG instance.
Definition: DtDeRecord.h:24
virtual void slot_displayEngineAdded(const DtDeRecord &igRecord)
Called when a display engine is added. Override if you want the driver to do something when a display...
makVrv::DtParticleSystemModelAgent * myDetonationAgent
Definition: DtExampleEffectsDriver.h:94
bool myDamagedFlag
Definition: DtExampleEffectsDriver.h:87
makVrv::MyParticleSystemModelAgent * mySmokePlumeAgent
Definition: DtExampleEffectsDriver.h:93
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
std::unordered_map< int, makVrv::DtUniqueID > SceneObjectIdsByModelSet
Definition: DtExampleEffectsDriver.h:82
virtual bool onStart()=0
Start the host output. Create all objects for an existing host connection.
The DtEntityFacade is a facade around agents that make up an entity. This entity facade represents a ...
Definition: DtEntityFacade.h:35
virtual bool onTick()=0
Tick.
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:31
Contains DLL export macros.
This driver demonstrates drawing communication lines.
Definition: DtExampleEffectsDriver.h:32
virtual const std::string & className() const =0
Get this driver&#39;s class name.
makVrv::DtEntityFacade * myEntityFacade
Definition: DtExampleEffectsDriver.h:85
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition: DtAgentManager.h:38
Contains makVrv:DtDriver class.
std::map< DtModelSetId, bool > ModelSetRealizations
Definition: DtModelSetRealizationManager.h:42
virtual bool onStop()=0
Stop the host output. All scene object created by the host should be destroyed.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
SceneObjectIdsByModelSet mySceneObjectIds
Definition: DtExampleEffectsDriver.h:83

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)