Go to the documentation of this file.00001
00022 #ifndef OBJECTCONTAINER_H
00023 #define OBJECTCONTAINER_H
00024 #include "lo/ServiceLocatedObject.h"
00025
00026
00027 namespace jlo
00028 {
00029
00030
00038 class ObjectContainer : public ServiceLocatedObject
00039 {
00040 public:
00041
00050 ObjectContainer (ServiceLocatedObject* locatedObject, double x , double y , double z ,
00051 double roll , double pitch , double yaw ,
00052 double sigmaX=0.0, double sigmaY=0.0 , double sigmaZ=0.0,
00053 double sigmaRoll=0.0, double sigmaPitch=0.0 , double sigmaYaw=0.0) :
00054 ServiceLocatedObject(locatedObject, x , y , z ,
00055 roll , pitch , yaw ,
00056 sigmaX, sigmaY , sigmaZ,
00057 sigmaRoll, sigmaPitch , sigmaYaw),
00058 m_semaStatic(true)
00059 {
00060 referenceCounter = 1;
00061 }
00062
00063
00064
00073 ObjectContainer (ServiceLocatedObject* locatedObject, const Matrix &matrix , const Matrix &covariance) :
00074 ServiceLocatedObject(locatedObject, matrix, covariance),
00075 m_semaStatic(true)
00076 {
00077 referenceCounter = 1;
00078 }
00079
00080
00085 virtual unsigned long GetLOType(){return LO_TYPE_PHYSICAL;}
00086
00087
00088
00097 virtual void AddAttachedObject(ServiceLocatedObject* lo);
00098
00099
00104 virtual void RemoveAttachedObject(ServiceLocatedObject* lo);
00105
00106
00107
00116 virtual void PropagateMovement(ServiceLocatedObject*(* copy)(ServiceLocatedObject*, ServiceLocatedObject*), unsigned long (*del)(ServiceLocatedObject*), void (*updated)(unsigned long), ServiceLocatedObject* parent_copy = NULL);
00117 protected:
00118 virtual bool NeedCopy ();
00119 virtual void TellParentNeedCopy(){ m_needCopy++; m_relation->TellParentNeedCopy();}
00120 virtual void TellParentNeedNoCopy(){ if(m_needCopy > 0){ m_needCopy--; m_relation->TellParentNeedNoCopy();}}
00121
00122 public:
00123
00124
00129 std::vector<ServiceLocatedObject*> m_attachedLocatedObjectList;
00130
00134 bool m_semaStatic;
00135
00136 protected:
00137
00143 virtual ReturnMatrix Get ( );
00144
00150 virtual ReturnMatrix GetInv ( ) ;
00151
00157 virtual unsigned long Move (const Matrix &matrix, const Matrix& covMatrix);
00158 };
00159 }
00160 #endif