Skip to content

Commit 4d0eee0

Browse files
committed
[operations] Added a namespace for NeedleOperations and a function to remove points ahead of the tip
1 parent ebd68b8 commit 4d0eee0

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <sofa/collisionAlgorithm/operations/NeedleOperations.h>
2+
3+
namespace sofa::collisionAlgorithm::Operations::Needle {
4+
5+
//int register_Project_Edge = Operation::register_func<EdgeProximity>(&toolbox::EdgeToolBox::project);
6+
7+
}
8+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#pragma once
2+
3+
#include <sofa/collisionAlgorithm/BaseOperation.h>
4+
#include <sofa/collisionAlgorithm/BaseProximity.h>
5+
6+
namespace sofa::collisionAlgorithm::Operations::Needle
7+
{
8+
9+
class PrunePointsAheadOfTip
10+
: public GenericOperation<PrunePointsAheadOfTip, // Type of the operation
11+
bool, // Default return type
12+
std::vector<BaseProximity::SPtr>&,
13+
const BaseProximity::SPtr& // Parameters
14+
>
15+
{
16+
public:
17+
bool defaultFunc(std::vector<BaseProximity::SPtr>&, const BaseProximity::SPtr&) const override
18+
{
19+
return false;
20+
}
21+
22+
void notFound(const std::type_info& id) const override
23+
{
24+
msg_error("Needle::PrunePointsAheadOfTip")
25+
<< "The operation PrunePointsAheadOfTipOperation is not registered with for type = "
26+
<< sofa::helper::NameDecoder::decodeFullName(id);
27+
}
28+
};
29+
30+
} // namespace sofa::collisionAlgorithm::Operations::Needle

0 commit comments

Comments
 (0)