VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weaponComponentInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
15 #include "vrfutil/rwTemplatedMap.h"
16 
18 
21 {
22 public:
23 
25 
26 private:
29 
30 public:
31  //constructor
32  DtWeaponComponentInterface(const DtLocalObject* vrfObject,
33  const DtString& rwName = DtString::nullString(),
34  DtReaderWriterRegistry* parentRegistry = 0);
35 
36  //copy constructor
38  const DtString& rwName = DtString::nullString(),
39  DtReaderWriterRegistry* parentRegistry = 0);
40 
41  //assignment operator
43  const DtWeaponComponentInterface& orig);
44 
45  //destructor
46  virtual ~DtWeaponComponentInterface();
47 
48  //returns a copy of the PSR
50  const DtString& rwName = DtString::nullString(),
51  DtReaderWriterRegistry* parentRegistry = 0) const;
52 
54  virtual DtString type() const;
55 
57 
58  virtual void setTargetSelectionCriteria(const DtTargetSelectionCriteria& tsc);
59  virtual const DtTargetSelectionCriteria& targetSelectionCriteria() const;
61 
64  virtual void updateRegionEvaluator();
69  virtual bool locationWithinRegion(const DtVector& localLocation) const;
70 
72 
73  virtual void setTarget(const DtEntityTargetInformation& target);
74  virtual const DtEntityTargetInformation& target() const;
76 
77  virtual void clearTarget();
78  virtual bool hasTarget() const;
79 
81 
82  virtual void addTargetFiringUpon(const DtUUID& target);
83  virtual void removeTargetFiringUpon(const DtUUID& target);
84  virtual const DtRwTemplatedUUIDList& targetsFiringUpon() const;
86 
88  static DtVrfProcessStateRepository* creator(const DtString& name,
89  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
90 
91 protected:
94  virtual void setupRegionEvaluator();
95 
96 protected:
99 
102 
107 
109 };
Definition: rwTemplatedList.h:189
UUID is a unique ID wrapper class.
Definition: uuid.h:59
const DtBaseWeaponComponentInterface & operator=(const DtBaseWeaponComponentInterface &orig)
Definition: readerWriterRegistry.h:39
Definition: entityTargetInformation.h:28
Defines a criteria for choosing targets for a single weapon system. This class stores all the informa...
Definition: targetSelectionCriteria.h:27
DtTargetSelectionCriteria myTargetSelectionCriteria
Target selection data for this weapon.
Definition: weaponComponentInterface.h:98
DtRwTemplatedMapPtr< DtRwUUID, DtRwUUID > MunitionToTargetMap
Definition: weaponComponentInterface.h:24
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Definition: rwTemplatedMap.h:97
An abstract base class for all evaluators of spatial filters. The evaluation of spatial filters is sp...
Definition: spatialFilterEvaluator.h:30
DtSpatialFilterEvaluator * myRegionEvaluator
Definition: weaponComponentInterface.h:108
virtual bool locationWithinRegion(const DtVector &localLocation) const =0
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
virtual void updateRegionEvaluator()=0
This must be called before calling locationWithinRegion() if the host entity has moved at all since t...
DtEntityTargetInformation myTarget
Information about current target specified by the target selection controller.
Definition: weaponComponentInterface.h:101
Abstract base class for all psrs that will serve as an interface between a controlling component on t...
Definition: baseWeaponComponentInterface.h:28
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
DtRwTemplatedUUIDList myTargetsFiringUpon
The current targets that have been fired upon. Used only by missile launchers (as of VRF 4...
Definition: weaponComponentInterface.h:106
Represents the interface between the DtTargetSelectionController and a weapon system.
Definition: weaponComponentInterface.h:20
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

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)