~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef BT_INTERNAL_EDGE_UTILITY_H
 
3
#define BT_INTERNAL_EDGE_UTILITY_H
 
4
 
 
5
#include "LinearMath/btHashMap.h"
 
6
#include "LinearMath/btVector3.h"
 
7
 
 
8
#include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"
 
9
 
 
10
///The btInternalEdgeUtility helps to avoid or reduce artifacts due to wrong collision normals caused by internal edges.
 
11
///See also http://code.google.com/p/bullet/issues/detail?id=27
 
12
 
 
13
class btBvhTriangleMeshShape;
 
14
class btCollisionObject;
 
15
class btManifoldPoint;
 
16
class btIDebugDraw;
 
17
 
 
18
 
 
19
 
 
20
enum btInternalEdgeAdjustFlags
 
21
{
 
22
        BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1,
 
23
        BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2, //double sided options are experimental, single sided is recommended
 
24
        BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4
 
25
};
 
26
 
 
27
 
 
28
///Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'
 
29
void    btGenerateInternalEdgeInfo (btBvhTriangleMeshShape*trimeshShape, btTriangleInfoMap* triangleInfoMap);
 
30
 
 
31
 
 
32
///Call the btFixMeshNormal to adjust the collision normal, using the triangle info map (generated using btGenerateInternalEdgeInfo)
 
33
///If this info map is missing, or the triangle is not store in this map, nothing will be done
 
34
void    btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject* trimeshColObj0,const btCollisionObject* otherColObj1, int partId0, int index0, int normalAdjustFlags = 0);
 
35
 
 
36
///Enable the BT_INTERNAL_EDGE_DEBUG_DRAW define and call btSetDebugDrawer, to get visual info to see if the internal edge utility works properly.
 
37
///If the utility doesn't work properly, you might have to adjust the threshold values in btTriangleInfoMap
 
38
//#define BT_INTERNAL_EDGE_DEBUG_DRAW
 
39
 
 
40
#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
 
41
void    btSetDebugDrawer(btIDebugDraw* debugDrawer);
 
42
#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
 
43
 
 
44
 
 
45
#endif //BT_INTERNAL_EDGE_UTILITY_H
 
46