-
Notifications
You must be signed in to change notification settings - Fork 4
/
ShapeDistance.h
43 lines (32 loc) · 1.41 KB
/
ShapeDistance.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
Pharmit
Copyright (c) David Ryan Koes, University of Pittsburgh and contributors.
All rights reserved.
Pharmit is licensed under both the BSD 3-clause license and the GNU
Public License version 2. Any use of the code that retains its reliance
on the GPL-licensed OpenBabel library is subject to the terms of the GPL2.
Use of the Pharmit code independently of OpenBabel (or any other
GPL2 licensed software) may choose between the BSD or GPL licenses.
See the LICENSE file provided with the distribution for more information.
*/
/*
* ShapeDistance.h
*
* Created on: Oct 17, 2011
* Author: dkoes
*/
#ifndef SHAPEDISTANCE_H_
#define SHAPEDISTANCE_H_
#include "MappableOctTree.h"
typedef
float (*shapeMetricFn)(const MappableOctTree* leftMIV, const MappableOctTree* leftMSV,
const MappableOctTree* rightMIV, const MappableOctTree* rightMSV);
//a global function for performing shape comparisons between MIV/MSV pairs
extern shapeMetricFn shapeDistance;
enum DistanceFunction {RelativeVolume, AbsVolume, Hausdorff,RelativeTriple, AbsoluteTriple,IncludeExclude,RelVolExclude};
//set shapedistance to the requested function, hausdoff needs the dim
extern void setDistance(DistanceFunction df);
float searchVolumeDist(const MappableOctTree* obj, const MappableOctTree* MIV,
const MappableOctTree* MSV, float& min, float& max);
float volumeDist(const MappableOctTree* x, const MappableOctTree* y);
#endif /* SHAPEDISTANCE_H_ */