Line |
Branch |
Exec |
Source |
1 |
|
|
// Copyright (C) 2009, 2010 by Florent Lamiraux, Thomas Moulard, JRL. |
2 |
|
|
// |
3 |
|
|
// This file is part of the hpp-affordance-corba. |
4 |
|
|
// |
5 |
|
|
// This software is provided "as is" without warranty of any kind, |
6 |
|
|
// either expressed or implied, including but not limited to the |
7 |
|
|
// implied warranties of fitness for a particular purpose. |
8 |
|
|
// |
9 |
|
|
// See the COPYING file for more information. |
10 |
|
|
|
11 |
|
|
#ifndef HPP_AFFORDANCE_CORBA_IMPL_HH |
12 |
|
|
#define HPP_AFFORDANCE_CORBA_IMPL_HH |
13 |
|
|
#include <coal/BVH/BVH_model.h> |
14 |
|
|
#include <omniORB4/CORBA.h> |
15 |
|
|
|
16 |
|
|
#include "affordance-idl.hh" |
17 |
|
|
#include "hpp/corbaserver/affordance/fwd.hh" |
18 |
|
|
#include "hpp/corbaserver/affordance/server.hh" |
19 |
|
|
#include "hpp/corbaserver/problem-solver-map.hh" |
20 |
|
|
#include "hpp/core/problem-solver.hh" |
21 |
|
|
|
22 |
|
|
namespace hpp { |
23 |
|
|
namespace affordanceCorba { |
24 |
|
|
namespace impl { |
25 |
|
|
class Afford : public virtual POA_hpp::corbaserver::affordance::Afford { |
26 |
|
|
public: |
27 |
|
|
Afford(); |
28 |
|
|
|
29 |
|
✗ |
void setServer(Server* server) { server_ = server; } |
30 |
|
|
|
31 |
|
|
Afford(const core::ProblemSolverPtr_t& problemSolver); |
32 |
|
|
|
33 |
|
|
void resetAffordanceConfig(); |
34 |
|
|
|
35 |
|
|
affordance::OperationBases_t createOperations(); |
36 |
|
|
|
37 |
|
|
void setAffordanceConfig(const char* affType, const hpp::doubleSeq& conf); |
38 |
|
|
|
39 |
|
|
hpp::doubleSeq* getAffordanceConfig(const char* affType); |
40 |
|
|
|
41 |
|
|
void setMargin(const char* affType, CORBA::Double margin); |
42 |
|
|
|
43 |
|
|
void setNeighbouringTriangleMargin(const char* affType, |
44 |
|
|
CORBA::Double nbTriMargin); |
45 |
|
|
|
46 |
|
|
void setMinimumArea(const char* affType, CORBA::Double minArea); |
47 |
|
|
|
48 |
|
|
bool checkModel(const char* obstacleName); |
49 |
|
|
|
50 |
|
|
void affordanceAnalysis( |
51 |
|
|
const char* obstacleName, const affordance::OperationBases_t& operations, |
52 |
|
|
std::vector<double> reduceSizes = std::vector<double>()); |
53 |
|
|
|
54 |
|
|
void analyseObject(const char* obstacleName, |
55 |
|
|
const hpp::doubleSeq& reduceSizesCorba); |
56 |
|
|
|
57 |
|
|
void analyseAll(const hpp::doubleSeq& reduceSizesCorba); |
58 |
|
|
|
59 |
|
|
void deleteAffordancesByType(const char* affordance, |
60 |
|
|
const char* obstacleName); |
61 |
|
|
|
62 |
|
|
void deleteAffordances(const char* obstacleName); |
63 |
|
|
|
64 |
|
|
void addAffObjects(const affordance::OperationBases_t& ops, |
65 |
|
|
const std::vector<affordance::CollisionObjects_t>& affObjs, |
66 |
|
|
const char* obstacleName); |
67 |
|
|
|
68 |
|
|
hpp::doubleSeqSeqSeqSeq* getAffordancePoints(const char* affordance); |
69 |
|
|
|
70 |
|
|
hpp::Names_t* getAffRefObstacles(const char* affordance); |
71 |
|
|
|
72 |
|
|
hpp::Names_t* getAffordanceTypes(); |
73 |
|
|
|
74 |
|
|
hpp::Names_t* getAffordanceConfigTypes(); |
75 |
|
|
|
76 |
|
|
private: |
77 |
|
|
Server* server_; |
78 |
|
✗ |
core::ProblemSolverPtr_t problemSolver() { return server_->problemSolver(); } |
79 |
|
|
}; // class Afford |
80 |
|
|
} // namespace impl |
81 |
|
|
} // namespace affordanceCorba |
82 |
|
|
} // namespace hpp |
83 |
|
|
|
84 |
|
|
#endif // HPP_AFFORDANCE_CORBA_IMPL_HH |
85 |
|
|
|