Imported Upstream version 2.81
[platform/upstream/libbullet.git] / Extras / ConvexDecomposition / splitplane.h
1 #ifndef SPLIT_PLANE_H
2
3 #define SPLIT_PLANE_H
4
5 //** Computes an 'optimal' split plane for the supplied mesh.
6 //** needs much improvement since it currently just splits along
7 //** the longest side of the AABB.
8 /*----------------------------------------------------------------------
9                 Copyright (c) 2004 Open Dynamics Framework Group
10                                         www.physicstools.org
11                 All rights reserved.
12
13                 Redistribution and use in source and binary forms, with or without modification, are permitted provided
14                 that the following conditions are met:
15
16                 Redistributions of source code must retain the above copyright notice, this list of conditions
17                 and the following disclaimer.
18
19                 Redistributions in binary form must reproduce the above copyright notice,
20                 this list of conditions and the following disclaimer in the documentation
21                 and/or other materials provided with the distribution.
22
23                 Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
24                 be used to endorse or promote products derived from this software without specific prior written permission.
25
26                 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
27                 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28                 DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29                 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30                 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31                 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32                 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 -----------------------------------------------------------------------*/
34
35 // http://codesuppository.blogspot.com
36 //
37 // mailto: jratcliff@infiniplex.net
38 //
39 // http://www.amillionpixels.us
40 //
41
42
43
44 namespace ConvexDecomposition
45 {
46
47 class ConvexDecompInterface;
48
49 bool computeSplitPlane(unsigned int vcount,
50                        const float *vertices,
51                        unsigned int tcount,
52                        const unsigned int *indices,
53                        ConvexDecompInterface *callback,
54                        float *plane);
55
56
57 }
58
59 #endif