17 #ifndef OPENHRP_COLISIONDETECTOR_IMPL_H_INCLUDED 18 #define OPENHRP_COLISIONDETECTOR_IMPL_H_INCLUDED 23 #include <hrpCorba/CollisionDetector.hh> 24 #include <hrpCorba/ModelLoader.hh> 33 virtual public PortableServer::RefCountServantBase
43 virtual void registerCharacter(
const char*
name, BodyInfo_ptr bodyInfo);
45 virtual void addCollisionPair(
const LinkPair& colPair);
48 virtual CORBA::Boolean queryIntersectionForDefinedPairs(
49 CORBA::Boolean checkAll,
50 const CharacterPositionSequence& characterPositions,
51 LinkPairSequence_out collidedPairs
55 virtual CORBA::Boolean queryIntersectionForGivenPairs(
56 CORBA::Boolean checkAll,
57 const LinkPairSequence& checkPairs,
58 const CharacterPositionSequence& characterPositions,
59 LinkPairSequence_out collidedPairs
62 virtual CORBA::Boolean queryContactDeterminationForDefinedPairs(
63 const CharacterPositionSequence& characterPositions,
64 CollisionSequence_out collisions
67 virtual CORBA::Boolean queryContactDeterminationForGivenPairs(
68 const LinkPairSequence& checkPairs,
69 const CharacterPositionSequence& characterPositions,
70 CollisionSequence_out collisions
73 virtual void queryDistanceForDefinedPairs(
74 const CharacterPositionSequence& characterPositions,
75 DistanceSequence_out distances
79 virtual void queryDistanceForGivenPairs(
80 const LinkPairSequence& checkPairs,
81 const CharacterPositionSequence& characterPositions,
82 DistanceSequence_out distances
85 virtual CORBA::Double queryDistanceWithRay(
86 const DblArray3 point,
90 virtual DblSequence* scanDistanceWithRay(
const DblArray3 p,
const DblArray9 R, CORBA::Double step, CORBA::Double range);
120 void addCollisionPairSub(
const LinkPair& linkPair, vector<ColdetModelPairExPtr>& io_coldetPairs);
121 void updateAllLinkPositions(
const CharacterPositionSequence& characterPositions);
122 bool detectAllCollisions(vector<ColdetModelPairExPtr>& coldetPairs, CollisionSequence_out& out_collisions);
123 bool detectCollisionsOfLinkPair(
124 ColdetModelPairEx& coldetPair, CollisionPointSequence& out_collisionPoints,
const bool addCollisionPoints);
125 bool detectIntersectionOfLinkPair(ColdetModelPairExPtr& coldetPair);
126 bool detectCollidedLinkPairs(
127 vector<ColdetModelPairExPtr>& coldetPairs, LinkPairSequence_out& out_collidedPairs,
const bool checkAll);
128 bool detectIntersectingLinkPairs(
129 vector<ColdetModelPairExPtr>& coldetPairs, LinkPairSequence_out& out_collidedPairs,
const bool checkAll);
130 void computeDistances(
131 vector<ColdetModelPairExPtr>& coldetPairs, DistanceSequence_out& out_distances);
136 :
virtual public POA_OpenHRP::CollisionDetectorFactory,
137 virtual public PortableServer::RefCountServantBase
145 CollisionDetector_ptr
create();
map< string, ColdetBodyPtr > StringToColdetBodyMap
boost::intrusive_ptr< ColdetBody > ColdetBodyPtr
png_infop png_charpp name
StringToColdetBodyMap bodyInfoToColdetBodyMap
StringToColdetBodyMap nameToColdetBodyMap
vector< ColdetModelPairExPtr > coldetModelPairs
local int destroy(gz_stream *s)
ColdetModelPairEx(ColdetBodyPtr &body0, ColdetModelPtr &link0, ColdetBodyPtr &body1, ColdetModelPtr &link1, double tolerance=0)
static BodyCustomizerHandle create(BodyHandle bodyHandle, const char *modelName)
boost::intrusive_ptr< ColdetModel > ColdetModelPtr
intrusive_ptr< ColdetModelPairEx > ColdetModelPairExPtr