VR-Forces 4.1.1 Class Documentation
objectSensor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
8 
11 
12 #pragma once
13 
14 #include "vrfobjcore/simCmpnt.h"
17 
21 class DtObjectSensorPSR;
26 class DtObjectType;
29 class DtVectorInputPort;
30 class DtInputPortGroup;
31 
46 {
47 private:
50 
53  orig);
54 
56  const DtObjectSensor & operator=(const
57  DtObjectSensor & orig);
58 
59 public:
60 
63  DtObjectSensor(const DtString& name,
64  DtVrfObject* owner,
65  DtSimManager* simManager,
66  DtComponentDescriptor* desc = 0,
67  DtReaderWriterRegistry* parentRegistry = 0);
68 
70  virtual ~DtObjectSensor();
71 
76  virtual bool init();
77 
80  virtual DtString type() const;
81 
90  virtual void tick();
91 
96  virtual bool tickWhileDestroyed() const;
97 
101  virtual int sensorType() const;
102 
106  static DtSimComponent * creator(const DtString& name,
107  DtVrfObject* owner,
108  DtSimManager* simManager,
109  DtComponentDescriptor* desc = 0,
110  DtReaderWriterRegistry* parentRegistry = 0);
111 
112 protected:
113 
115  virtual bool createPortGroups();
116 
118  virtual bool createPorts();
119 
125  virtual DtObjectSensorPSR* createPSR();
126 
130  virtual const char* defaultPSRType() const;
131 
138  virtual void updateDetectableObjectsList();
139 
144 
145 
146  DtCompositePredicate objectTypeForcePredicate(const DtObjectType&,
147  const DtNLengthIntegerVector& forceTypes);
149  DtCompositePredicate objectTypeForcePredicate(const DtObjectType&,
150  const std::list<DtU8>& forceTypes);
152 
156  virtual bool initSensorGeometry();
157 
161  virtual void setupGeometryForDetection();
162 
166  virtual DtVector localSensorPosition() const;
167 
171  virtual DtTaitBryan localSensorOrientation() const;
172 
179  virtual bool processObjects();
180 
189  virtual bool detectObject(DtVrfObject* object,
190  DtRwSensorContactInfo* contactInfo);
191 
202  virtual bool continueDetectingObject(DtVrfObject* object,
203  DtRwSensorContactInfo* contactInfo, bool& contactInfoModified);
204 
207  virtual bool objectWithinSensorGeometry(DtVrfObject* object) const;
208 
211  virtual double rangeSquaredToObject(const DtVrfObject* object) const;
212 
215  virtual double rangeToObject(const DtVrfObject* object) const;
216 
218  virtual void clearObjectRangeCache() const;
219 
221  virtual void printTargets() const;
222 
225  virtual void updateDetectedObjectListPort();
226 
228  virtual bool createAndInitSensorMonitor();
229 
231  virtual bool objectInDetectableList(DtVrfObject*) const;
232 
235  static void hostilitiesChangedCallback(DtU8 force, void* usr);
236  virtual void processHostilitiesChanged(DtU8 force);
237 
238 protected:
239 
241 
242 
243 
244 
245 
246 
247 
248 
259 
260 
261 
266 
274 
284 
286 
289 
293 
298 
309 
310 };
311 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)