What if our world
Orofacial and soma
The present invent
"And let's hear th
In the past year,
Q: Why does one n
This is an archive
The University of
Q: Xcode: Build F
Mixed results from

/* * Copyright (
A new method of es
Dallas County Cler
Q: Are there know
Q: Jaxb2-maven-pl
The long-term obje
A new paradigm for
The present invent
Benzos Benzos may
Rugby sevens at th
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ #ifndef BT_CONVEX_POINT_CLOUD_SHAPE_H #define BT_CONVEX_POINT_CLOUD_SHAPE_H #include "btPolyhedralConvexShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types ///The btConvexPointCloudShape implements an implicit convex hull of an array of points. ///The btConvexPointCloudShape extends a btPolyhedralConvexAabbCachingShape. ATTRIBUTE_ALIGNED16(class) btConvexPointCloudShape : public btPolyhedralConvexAabbCachingShape { protected: int m_numPoints; const btVector3* m_points; protected: btConvexPointCloudShape(const btVector3* points, int numPoints, const btVector3& localScaling); virtual btVector3* getUnscaledPoints() { return 0; } //debugging virtual const char* getName() const { return "ConvexPointCloud"; } public: BT_DECLARE_ALIGNED_ALLOCATOR(); virtual ~btConvexPointCloudShape(); ///virtual btVector3* getUnscaledPoints() virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; void addPoint(const btVector3& pt, bool recalculateLocalAabb = true); virtual void setLocalScaling(const btVector3& scaling); virtual void getAabb(btVector3& aabbMin, btVector3& aabbMax) const { btVector3 localAabbMin = m_unscaledPoints[0]; btVector3 localAabbMax = m_unscaledPoints[0]; for (int i = 1; i < m_numPoints; i++) localAabbMin.setMin(localAabbMin); localAabbMax.setMax(localAabbMax); btVector3 localHalfExtents = (localAabbMax - localAabbMin) * btScalar(0.5); btVector3 bvhAabbMin, bvhAabbMax; m_bvhShape->getAabb(m_children[0],m_children[1],bvhAabbMin,bvhAabbMax); aabbMin = bvhAabbMin * localHalfExtents; aabbMax = bvhAabbMax * localHalfExtents; } virtual void setLocalScaling(btScalar scaling) { m_localScaling = scaling; recalculateLocalAabb(); } virtual void getLocalScaling(btScalar *scaling) const { if (scaling) *scaling = m_localScaling; } virtual void setMargin(btScalar margin) { m_collisionMargin = margin; } virtual btScalar getMargin() const { return m_collisionMargin; } virtual int getNumPreferredPenetrationDirections() const { return m_numPreferredPenetrationDirections; } virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const { calcPenVector(index,penetrationVector); } virtual void setNumPreferredPenetrationDirections(int numPairs) { m_numPreferredPenetrationDirections = numPairs; } virtual void optimizePenetration(const btTransform& transA,const btTransform& transB); virtual int calculateSerializeBufferSize() const; ///fills the dataBuffer and returns the struct name (and 0 on failure) virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const; }; ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 struct btConvexPointCloudShapeData { btConvexShapeData m_convexData; int m_numPoints; float* m_unscaledPointsFloat; float* m_pointsFloat; }; ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 struct btPointCloudShapeData { btCollisionShapeData m_convexShapeData; float* m_unscaledPointsFloat; float* m_pointsFloat; int m_numPoints; }; SIMD_FORCE_INLINE int btConvexPointCloudShape::calculateSerializeBufferSize() const { return sizeof(btConvexPointCloudShapeData); } #endif //BT_CONVEX_POINT_CLOUD_SHAPE_H #endif //__BT_CONVEX_POINT_CLOUD_SHAPE_H__ //geomutliotte.cpp /* btTriangleMeshShapeX: X-Box (3 verts, 4 tris, triangle) https://en.wikipedia.org/wiki/X-Box Somewhat useful for testing */ class btBoxShapeX : public btTriangleMeshShape { public: btBoxShapeX() : btTriangleMeshShape() { } btBoxShapeX(const btVector3& bmin, const btVector3& bmax) : btTriangleMeshShape(bmin,bmax) { } void setLocalScaling(const btVector3& scaling) { m_tristructure.m_scale = scaling; } const btVector3& getLocalScaling() const { return m_tristructure