Actin®  Version 5.2.0
Software for Robotics Simulation and Control
ecSystemShapeProximityState.h
Go to the documentation of this file.
1 #ifndef ecSystemShapeProximityState_H_
2 #define ecSystemShapeProximityState_H_
3 //------------------------------------------------------------------------------
4 // Copyright (c) 2004-2013 Energid Technologies. All rights reserved.
5 //
10 //
11 //------------------------------------------------------------------------------
12 #include <actinCore/actinCore_config.h> // Required to be first header.
13 #include "ecShapeProximityData.h"
14 #include <foundCore/ecVector.h>
15 #include <xml/ecXmlBasicType.h>
16 #include <xml/ecXmlCompType.h>
17 #include "ecBaseShapeDataCache.h"
18 
21 
26 {
27 public:
30  (
31  );
32 
35  (
36  );
37 
40  (
41  const EcSystemShapeProximityState& orig
42  );
43 
46  (
47  const EcSystemShapeProximityState& orig
48  );
49 
51  EcBoolean operator==
52  (
53  const EcSystemShapeProximityState& orig
54  ) const;
55 
57  virtual EcBoolean xmlInit
58  (
59  ) EC_OVERRIDE;
60 
62  virtual EcXmlObject* clone
63  (
64  ) const EC_OVERRIDE;
65 
67  virtual void registerComponents
68  (
69  ) EC_OVERRIDE;
70 
72  virtual EcBoolean equality
73  (
74  const EcXmlObject* other
75  ) const EC_OVERRIDE;
76 
78  virtual EcXmlObject* newObject
79  (
80  ) const EC_OVERRIDE;
81 
83  virtual EcBoolean read
84  (
85  EcXmlReader& stream
86  ) EC_OVERRIDE;
87 
89  virtual EcBoolean write
90  (
91  EcXmlWriter& stream
92  ) const EC_OVERRIDE;
93 
96  (
97  );
98 
101  virtual EcBoolean allocateAndSetProximityVector
102  (
103  const EcShapeStateCacheKey& shape1,
104  const EcShapeStateCacheKey& shape2,
105  const EcInt32Vector3D& systemNumShapes,
106  const EcVector& proxVec
107  ) ;
108 
112  virtual const EcVector& allocateAndGetProximityVector
113  (
114  const EcShapeStateCacheKey& shape1,
115  const EcShapeStateCacheKey& shape2,
116  const EcInt32Vector3D& systemNumShapes
117  ) const;
118 
120  virtual EcBoolean setProximityVector
121  (
122  const EcShapeStateCacheKey& shapeIndex1,
123  const EcShapeStateCacheKey& shapeIndex2,
124  const EcVector& proxVec
125  ) ;
126 
128  virtual const EcVector& getProximityVector
129  (
130  const EcShapeStateCacheKey& shape1,
131  const EcShapeStateCacheKey& shape2
132  ) const;
133 
134 
137  virtual EcBoolean setDistance
138  (
139  const EcShapeStateCacheKey& shapeIndex1,
140  const EcShapeStateCacheKey& shapeIndex2,
141  const EcReal& dist
142  ) ;
143 
145  virtual const EcReal& getDistance
146  (
147  const EcShapeStateCacheKey& shape1,
148  const EcShapeStateCacheKey& shape2
149  ) const;
150 
153  virtual EcBoolean allocateAndSetProximityDistance
154  (
155  const EcShapeStateCacheKey& shape1,
156  const EcShapeStateCacheKey& shape2,
157  const EcInt32Vector3D& systemNumShapes,
158  const EcReal& dist
159  ) ;
160 
164  virtual const EcReal& allocateAndGetProximityDistance
165  (
166  const EcShapeStateCacheKey& shape1,
167  const EcShapeStateCacheKey& shape2,
168  const EcInt32Vector3D& systemNumShapes
169  ) const;
170 
173  virtual void invalidateAll
174  (
175  );
176 
180  virtual EcBoolean isValid
181  (
182  const EcShapeStateCacheKey& shape1,
183  const EcShapeStateCacheKey& shape2
184  )const;
185 
189  virtual EcBoolean isDistanceValid
190  (
191  const EcShapeStateCacheKey& shape1,
192  const EcShapeStateCacheKey& shape2
193  )const;
194 
196  virtual void setUpdateTime
197  (
198  const EcU64& uTime
199  );
200 
202  virtual const EcU64& updateTime
203  (
204  )const;
205 
209  virtual void setValid
210  (
211  const EcShapeStateCacheKey& shape1,
212  const EcShapeStateCacheKey& shape2
213  );
214 
217  virtual EcBoolean allocateAndSetProximityData
218  (
219  const EcShapeStateCacheKey& shape1,
220  const EcShapeStateCacheKey& shape2,
221  const EcInt32Vector3D& systemNumShapes,
222  const EcShapeProximityData& datum
223  );
224 
228  virtual const EcShapeProximityData* allocateAndGetProximityData
229  (
230  const EcShapeStateCacheKey& shape1,
231  const EcShapeStateCacheKey& shape2,
232  const EcInt32Vector3D& systemNumShapes
233  ) const;
234 
236  virtual EcBoolean setProximityData
237  (
238  const EcShapeStateCacheKey& shapeIndex1,
239  const EcShapeStateCacheKey& shapeIndex2,
240  const EcShapeProximityData& datum
241  );
242 
244  virtual const EcShapeProximityData* getProximityData
245  (
246  const EcShapeStateCacheKey& shape1,
247  const EcShapeStateCacheKey& shape2
248  ) const;
249 
251  virtual EcShapeProximityData* getProximityData
252  (
253  const EcShapeStateCacheKey& shape1,
254  const EcShapeStateCacheKey& shape2
255  ) ;
256 
258  virtual EcBoolean insertPenetrationPointShape1Primary
259  (
260  const EcShapeStateCacheKey& shape1,
261  const EcShapeStateCacheKey& shape2,
262  const EcVector& point
263  );
264 
266  virtual EcBoolean insertPenetrationPointShape2Primary
267  (
268  const EcShapeStateCacheKey& shape1,
269  const EcShapeStateCacheKey& shape2,
270  const EcVector& point
271  );
272 
274  virtual EcBoolean setFrictionMode
275  (
276  const EcShapeStateCacheKey& shape1,
277  const EcShapeStateCacheKey& shape2,
279  );
280 
282  virtual EcBoolean collisionOccured
283  (
284  const EcShapeStateCacheKey& shape1,
285  const EcShapeStateCacheKey& shape2
286  )const;
287 
289  virtual void setCollisionOccured
290  (
291  const EcShapeStateCacheKey& shape1,
292  const EcShapeStateCacheKey& shape2,
293  const EcBoolean flag
294  );
295 
297  virtual EcBoolean resetPenetrationPointBuffers
298  (
299  const EcShapeStateCacheKey& shape1,
300  const EcShapeStateCacheKey& shape2
301  );
302 
304  virtual void setIsInitialized
305  (
306  const EcBoolean& init
307  );
308 
310  virtual EcBoolean isInitialized
311  (
312  )const;
313 
314 
317  (
318  const EcInt32Vector3D& systemNumShapes
319  ) EC_OVERRIDE;
320 
322  virtual EcBoolean setWitnessPoints
323  (
324  const EcShapeStateCacheKey& shapeIndex1,
325  const EcShapeStateCacheKey& shapeIndex2,
326  const EcVector& witnessPointA,
327  const EcVector& witnessPointB
328  );
329 
331  virtual EcBoolean getWitnessPoints
332  (
333  const EcShapeStateCacheKey& shape1,
334  const EcShapeStateCacheKey& shape2,
335  EcVector& witnessPointA,
336  EcVector& witnessPointB
337  ) const;
338 
342  virtual EcBoolean areWitnessPointsValid
343  (
344  const EcShapeStateCacheKey& shape1,
345  const EcShapeStateCacheKey& shape2
346  ) const;
347 
348  virtual const EcToken& token
349  (
350  ) const EC_OVERRIDE;
351 
352 protected:
355 
358 
360 
363 
366 };
367 
368 #endif // ecSystemShapeProximityState_H_
Holds a class to describe a shape proximity related data.
virtual EcXmlObject * newObject() const EC_OVERRIDE
virtual new that returns an EcXmlObject
virtual EcBoolean read(EcXmlReader &stream) EC_OVERRIDE
reads this object from an XML stream
static EcBaseShapeDataCache nullObject()
gets a null link
#define EC_OVERRIDE
Add wrapper around c++11 override keyword.
Definition: ecMacros.h:36
Defines a class for describing a key for accessing the shape proximity database.
std::vector< EcInt32VectorVector > EcInt32Vector3D
a general 3D 32-bit signed integer vector
Definition: ecTypes.h:183
static const EcShapeProximityData m_theNullShapeData
const data
virtual EcBoolean write(EcXmlWriter &stream) const EC_OVERRIDE
writes this object to an XML stream
An EcString-like class that holds a tag and a namespace.
Definition: ecToken.h:41
A base class for xml objects.
Definition: ecXmlObject.h:23
boost::uint64_t EcU64
64-bit unsigned integer
Definition: ecTypes.h:59
EcBoolean m_IsInitialized
is initialized
Holds a description of the class used to cache the closest points between pairs of shapes...
Configuration header for the foundation hierarchy.
Holds state information related to the proximity of shapes in the system.
virtual EcBoolean equality(const EcXmlObject *other) const EC_OVERRIDE
equality - virtual equality to an EcXmlObject pointer
bool EcBoolean
Boolean (0 or 1)
Definition: ecTypes.h:21
XML file writer.
Definition: ecXmlWriter.h:19
EcF64 EcReal
Alias for 64-bit float.
Definition: ecTypes.h:30
EcShapeProximityData m_ShapeData
mutable data for speed
An XML file reader.
Definition: ecXmlReader.h:17
EcU64 m_CurrentUpdateTime
the timer used for determining data freshness
virtual EcXmlObject * clone() const EC_OVERRIDE
clone - a virtual constructor to an EcXmlObject pointer
virtual void registerComponents() EC_OVERRIDE
register components with the parent
EcBaseShapeDataCache< EcShapeProximityData > EcBaseSystemShapeProximityState
type definition of EcBaseShapeDataCache<EcShapeProximityData> to be used as a base class ...
virtual EcBoolean xmlInit() EC_OVERRIDE
initialize XML components for reading and writing
virtual EcBoolean resizeDatabaseToSystem(const EcInt32Vector3D &systemNumShapes)
resize the database to the number of shapes in each link of each manipulator in the system ...
#define EC_ACTINCORE_GEOMETRY_DECL
geometry directory
A three-element vector.
Definition: ecVector.h:20
virtual const EcToken & token() const EC_OVERRIDE
gets the xml token used for writing out.
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.