Bullet Collision Detection & Physics Library
btGImpactShape.h
Go to the documentation of this file.
1 
4 /*
5 This source file is part of GIMPACT Library.
6 
7 For the latest info, see http://gimpact.sourceforge.net/
8 
9 Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
10 email: projectileman@yahoo.com
11 
12 
13 This software is provided 'as-is', without any express or implied warranty.
14 In no event will the authors be held liable for any damages arising from the use of this software.
15 Permission is granted to anyone to use this software for any purpose,
16 including commercial applications, and to alter it and redistribute it freely,
17 subject to the following restrictions:
18 
19 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.
20 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
21 3. This notice may not be removed or altered from any source distribution.
22 */
23 
24 #ifndef GIMPACT_SHAPE_H
25 #define GIMPACT_SHAPE_H
26 
34 #include "LinearMath/btVector3.h"
35 #include "LinearMath/btTransform.h"
36 #include "LinearMath/btMatrix3x3.h"
38 
39 #include "btGImpactQuantizedBvh.h" // box tree class
40 
43 
45 {
49 };
50 
53 {
54 public:
56  {
57  m_numVertices = 4;
58  }
59 
61  const btVector3& v0, const btVector3& v1,
62  const btVector3& v2, const btVector3& v3)
63  {
64  m_vertices[0] = v0;
65  m_vertices[1] = v1;
66  m_vertices[2] = v2;
67  m_vertices[3] = v3;
69  }
70 };
71 
74 {
75 protected:
79  btGImpactBoxSet m_box_set; // optionally boxset
80 
83  virtual void calcLocalAABB()
84  {
86  if (m_box_set.getNodeCount() == 0)
87  {
89  }
90  else
91  {
92  m_box_set.update();
93  }
95 
97  }
98 
99 public:
101  {
104  m_needs_update = true;
105  localScaling.setValue(1.f, 1.f, 1.f);
106  }
107 
109 
116  {
117  if (!m_needs_update) return;
118  calcLocalAABB();
119  m_needs_update = false;
120  }
121 
123 
126  void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
127  {
128  btAABB transformedbox = m_localAABB;
129  transformedbox.appy_transform(t);
130  aabbMin = transformedbox.m_min;
131  aabbMax = transformedbox.m_max;
132  }
133 
135  virtual void postUpdate()
136  {
137  m_needs_update = true;
138  }
139 
142  {
143  return m_localAABB;
144  }
145 
146  virtual int getShapeType() const
147  {
149  }
150 
154  virtual void setLocalScaling(const btVector3& scaling)
155  {
156  localScaling = scaling;
157  postUpdate();
158  }
159 
160  virtual const btVector3& getLocalScaling() const
161  {
162  return localScaling;
163  }
164 
165  virtual void setMargin(btScalar margin)
166  {
167  m_collisionMargin = margin;
168  int i = getNumChildShapes();
169  while (i--)
170  {
171  btCollisionShape* child = getChildShape(i);
172  child->setMargin(margin);
173  }
174 
175  m_needs_update = true;
176  }
177 
180 
182  virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const = 0;
183 
186  {
187  return &m_box_set;
188  }
189 
192  {
193  if (m_box_set.getNodeCount() == 0) return false;
194  return true;
195  }
196 
198  virtual const btPrimitiveManagerBase* getPrimitiveManager() const = 0;
199 
201  virtual int getNumChildShapes() const = 0;
202 
204  virtual bool childrenHasTransform() const = 0;
205 
207  virtual bool needsRetrieveTriangles() const = 0;
208 
210  virtual bool needsRetrieveTetrahedrons() const = 0;
211 
212  virtual void getBulletTriangle(int prim_index, btTriangleShapeEx& triangle) const = 0;
213 
214  virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx& tetrahedron) const = 0;
215 
217  virtual void lockChildShapes() const
218  {
219  }
220 
221  virtual void unlockChildShapes() const
222  {
223  }
224 
227  {
228  getPrimitiveManager()->get_primitive_triangle(index, triangle);
229  }
230 
232 
234  virtual void getChildAabb(int child_index, const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
235  {
236  btAABB child_aabb;
237  getPrimitiveManager()->get_primitive_box(child_index, child_aabb);
238  child_aabb.appy_transform(t);
239  aabbMin = child_aabb.m_min;
240  aabbMax = child_aabb.m_max;
241  }
242 
244  virtual btCollisionShape* getChildShape(int index) = 0;
245 
247  virtual const btCollisionShape* getChildShape(int index) const = 0;
248 
250  virtual btTransform getChildTransform(int index) const = 0;
251 
253 
256  virtual void setChildTransform(int index, const btTransform& transform) = 0;
257 
259 
261  virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const
262  {
263  (void)rayFrom;
264  (void)rayTo;
265  (void)resultCallback;
266  }
267 
269 
272  virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const
273  {
274  (void)callback;
275  (void)aabbMin;
276  (void)aabbMax;
277  }
278 
280 
283  virtual void processAllTrianglesRay(btTriangleCallback* /*callback*/, const btVector3& /*rayFrom*/, const btVector3& /*rayTo*/) const
284  {
285  }
286 
288 };
289 
291 
295 {
296 public:
299  {
300  public:
303 
306  {
307  m_compoundShape = compound.m_compoundShape;
308  }
309 
311  {
312  m_compoundShape = compoundShape;
313  }
314 
316  {
317  m_compoundShape = NULL;
318  }
319 
320  virtual bool is_trimesh() const
321  {
322  return false;
323  }
324 
325  virtual int get_primitive_count() const
326  {
327  return (int)m_compoundShape->getNumChildShapes();
328  }
329 
330  virtual void get_primitive_box(int prim_index, btAABB& primbox) const
331  {
332  btTransform prim_trans;
334  {
335  prim_trans = m_compoundShape->getChildTransform(prim_index);
336  }
337  else
338  {
339  prim_trans.setIdentity();
340  }
341  const btCollisionShape* shape = m_compoundShape->getChildShape(prim_index);
342  shape->getAabb(prim_trans, primbox.m_min, primbox.m_max);
343  }
344 
345  virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle& triangle) const
346  {
347  btAssert(0);
348  (void)prim_index;
349  (void)triangle;
350  }
351  };
352 
353 protected:
357 
358 public:
359  btGImpactCompoundShape(bool children_has_transform = true)
360  {
361  (void)children_has_transform;
364  }
365 
367  {
368  }
369 
371  virtual bool childrenHasTransform() const
372  {
373  if (m_childTransforms.size() == 0) return false;
374  return true;
375  }
376 
379  {
380  return &m_primitive_manager;
381  }
382 
385  {
386  return &m_primitive_manager;
387  }
388 
390  virtual int getNumChildShapes() const
391  {
392  return m_childShapes.size();
393  }
394 
396  void addChildShape(const btTransform& localTransform, btCollisionShape* shape)
397  {
398  btAssert(shape->isConvex());
399  m_childTransforms.push_back(localTransform);
400  m_childShapes.push_back(shape);
401  }
402 
405  {
406  btAssert(shape->isConvex());
407  m_childShapes.push_back(shape);
408  }
409 
411  virtual btCollisionShape* getChildShape(int index)
412  {
413  return m_childShapes[index];
414  }
415 
417  virtual const btCollisionShape* getChildShape(int index) const
418  {
419  return m_childShapes[index];
420  }
421 
423 
425  virtual void getChildAabb(int child_index, const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
426  {
427  if (childrenHasTransform())
428  {
429  m_childShapes[child_index]->getAabb(t * m_childTransforms[child_index], aabbMin, aabbMax);
430  }
431  else
432  {
433  m_childShapes[child_index]->getAabb(t, aabbMin, aabbMax);
434  }
435  }
436 
438  virtual btTransform getChildTransform(int index) const
439  {
441  return m_childTransforms[index];
442  }
443 
445 
448  virtual void setChildTransform(int index, const btTransform& transform)
449  {
451  m_childTransforms[index] = transform;
452  postUpdate();
453  }
454 
456  virtual bool needsRetrieveTriangles() const
457  {
458  return false;
459  }
460 
462  virtual bool needsRetrieveTetrahedrons() const
463  {
464  return false;
465  }
466 
467  virtual void getBulletTriangle(int prim_index, btTriangleShapeEx& triangle) const
468  {
469  (void)prim_index;
470  (void)triangle;
471  btAssert(0);
472  }
473 
474  virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx& tetrahedron) const
475  {
476  (void)prim_index;
477  (void)tetrahedron;
478  btAssert(0);
479  }
480 
482  virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const;
483 
484  virtual const char* getName() const
485  {
486  return "GImpactCompound";
487  }
488 
490  {
492  }
493 };
494 
496 
503 {
504 public:
506 
510  {
511  public:
515  int m_part;
517  const unsigned char* vertexbase;
518  int numverts;
520  int stride;
521  const unsigned char* indexbase;
523  int numfaces;
525 
527  {
528  m_meshInterface = NULL;
529  m_part = 0;
530  m_margin = 0.01f;
531  m_scale = btVector3(1.f, 1.f, 1.f);
532  m_lock_count = 0;
533  vertexbase = 0;
534  numverts = 0;
535  stride = 0;
536  indexbase = 0;
537  indexstride = 0;
538  numfaces = 0;
539  }
540 
543  {
545  m_part = manager.m_part;
546  m_margin = manager.m_margin;
547  m_scale = manager.m_scale;
548  m_lock_count = 0;
549  vertexbase = 0;
550  numverts = 0;
551  stride = 0;
552  indexbase = 0;
553  indexstride = 0;
554  numfaces = 0;
555  }
556 
558  btStridingMeshInterface* meshInterface, int part)
559  {
560  m_meshInterface = meshInterface;
561  m_part = part;
563  m_margin = 0.1f;
564  m_lock_count = 0;
565  vertexbase = 0;
566  numverts = 0;
567  stride = 0;
568  indexbase = 0;
569  indexstride = 0;
570  numfaces = 0;
571  }
572 
574 
575  void lock()
576  {
577  if (m_lock_count > 0)
578  {
579  m_lock_count++;
580  return;
581  }
585 
586  m_lock_count = 1;
587  }
588 
589  void unlock()
590  {
591  if (m_lock_count == 0) return;
592  if (m_lock_count > 1)
593  {
594  --m_lock_count;
595  return;
596  }
598  vertexbase = NULL;
599  m_lock_count = 0;
600  }
601 
602  virtual bool is_trimesh() const
603  {
604  return true;
605  }
606 
607  virtual int get_primitive_count() const
608  {
609  return (int)numfaces;
610  }
611 
613  {
614  return (int)numverts;
615  }
616 
617  SIMD_FORCE_INLINE void get_indices(int face_index, unsigned int& i0, unsigned int& i1, unsigned int& i2) const
618  {
619  if (indicestype == PHY_SHORT)
620  {
621  unsigned short* s_indices = (unsigned short*)(indexbase + face_index * indexstride);
622  i0 = s_indices[0];
623  i1 = s_indices[1];
624  i2 = s_indices[2];
625  }
626  else
627  {
628  unsigned int* i_indices = (unsigned int*)(indexbase + face_index * indexstride);
629  i0 = i_indices[0];
630  i1 = i_indices[1];
631  i2 = i_indices[2];
632  }
633  }
634 
635  SIMD_FORCE_INLINE void get_vertex(unsigned int vertex_index, btVector3& vertex) const
636  {
637  if (type == PHY_DOUBLE)
638  {
639  double* dvertices = (double*)(vertexbase + vertex_index * stride);
640  vertex[0] = btScalar(dvertices[0] * m_scale[0]);
641  vertex[1] = btScalar(dvertices[1] * m_scale[1]);
642  vertex[2] = btScalar(dvertices[2] * m_scale[2]);
643  }
644  else
645  {
646  float* svertices = (float*)(vertexbase + vertex_index * stride);
647  vertex[0] = svertices[0] * m_scale[0];
648  vertex[1] = svertices[1] * m_scale[1];
649  vertex[2] = svertices[2] * m_scale[2];
650  }
651  }
652 
653  virtual void get_primitive_box(int prim_index, btAABB& primbox) const
654  {
655  btPrimitiveTriangle triangle;
656  get_primitive_triangle(prim_index, triangle);
658  triangle.m_vertices[0],
659  triangle.m_vertices[1], triangle.m_vertices[2], triangle.m_margin);
660  }
661 
662  virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle& triangle) const
663  {
664  unsigned int indices[3];
665  get_indices(prim_index, indices[0], indices[1], indices[2]);
666  get_vertex(indices[0], triangle.m_vertices[0]);
667  get_vertex(indices[1], triangle.m_vertices[1]);
668  get_vertex(indices[2], triangle.m_vertices[2]);
669  triangle.m_margin = m_margin;
670  }
671 
672  SIMD_FORCE_INLINE void get_bullet_triangle(int prim_index, btTriangleShapeEx& triangle) const
673  {
674  unsigned int indices[3];
675  get_indices(prim_index, indices[0], indices[1], indices[2]);
676  get_vertex(indices[0], triangle.m_vertices1[0]);
677  get_vertex(indices[1], triangle.m_vertices1[1]);
678  get_vertex(indices[2], triangle.m_vertices1[2]);
679  triangle.setMargin(m_margin);
680  }
681  };
682 
683 protected:
685 
686 public:
688  {
690  }
691 
692  btGImpactMeshShapePart(btStridingMeshInterface* meshInterface, int part);
693  virtual ~btGImpactMeshShapePart();
694 
696  virtual bool childrenHasTransform() const
697  {
698  return false;
699  }
700 
702  virtual void lockChildShapes() const;
703  virtual void unlockChildShapes() const;
704 
706  virtual int getNumChildShapes() const
707  {
709  }
710 
712  virtual btCollisionShape* getChildShape(int index)
713  {
714  (void)index;
715  btAssert(0);
716  return NULL;
717  }
718 
720  virtual const btCollisionShape* getChildShape(int index) const
721  {
722  (void)index;
723  btAssert(0);
724  return NULL;
725  }
726 
728  virtual btTransform getChildTransform(int index) const
729  {
730  (void)index;
731  btAssert(0);
732  return btTransform();
733  }
734 
736 
739  virtual void setChildTransform(int index, const btTransform& transform)
740  {
741  (void)index;
742  (void)transform;
743  btAssert(0);
744  }
745 
748  {
749  return &m_primitive_manager;
750  }
751 
753  {
754  return &m_primitive_manager;
755  }
756 
757  virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const;
758 
759  virtual const char* getName() const
760  {
761  return "GImpactMeshShapePart";
762  }
763 
765  {
767  }
768 
770  virtual bool needsRetrieveTriangles() const
771  {
772  return true;
773  }
774 
776  virtual bool needsRetrieveTetrahedrons() const
777  {
778  return false;
779  }
780 
781  virtual void getBulletTriangle(int prim_index, btTriangleShapeEx& triangle) const
782  {
783  m_primitive_manager.get_bullet_triangle(prim_index, triangle);
784  }
785 
786  virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx& tetrahedron) const
787  {
788  (void)prim_index;
789  (void)tetrahedron;
790  btAssert(0);
791  }
792 
794  {
796  }
797 
798  SIMD_FORCE_INLINE void getVertex(int vertex_index, btVector3& vertex) const
799  {
800  m_primitive_manager.get_vertex(vertex_index, vertex);
801  }
802 
804  {
805  m_primitive_manager.m_margin = margin;
806  postUpdate();
807  }
808 
810  {
812  }
813 
814  virtual void setLocalScaling(const btVector3& scaling)
815  {
816  m_primitive_manager.m_scale = scaling;
817  postUpdate();
818  }
819 
820  virtual const btVector3& getLocalScaling() const
821  {
823  }
824 
826  {
827  return (int)m_primitive_manager.m_part;
828  }
829 
830  virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const;
831  virtual void processAllTrianglesRay(btTriangleCallback* callback, const btVector3& rayFrom, const btVector3& rayTo) const;
832 };
833 
835 
843 {
845 
846 protected:
849  {
850  for (int i = 0; i < meshInterface->getNumSubParts(); ++i)
851  {
852  btGImpactMeshShapePart* newpart = new btGImpactMeshShapePart(meshInterface, i);
853  m_mesh_parts.push_back(newpart);
854  }
855  }
856 
858  virtual void calcLocalAABB()
859  {
861  int i = m_mesh_parts.size();
862  while (i--)
863  {
864  m_mesh_parts[i]->updateBound();
866  }
867  }
868 
869 public:
871  {
872  m_meshInterface = meshInterface;
873  buildMeshParts(meshInterface);
874  }
875 
877  {
878  int i = m_mesh_parts.size();
879  while (i--)
880  {
882  delete part;
883  }
885  }
886 
888  {
889  return m_meshInterface;
890  }
891 
893  {
894  return m_meshInterface;
895  }
896 
897  int getMeshPartCount() const
898  {
899  return m_mesh_parts.size();
900  }
901 
903  {
904  return m_mesh_parts[index];
905  }
906 
907  const btGImpactMeshShapePart* getMeshPart(int index) const
908  {
909  return m_mesh_parts[index];
910  }
911 
912  virtual void setLocalScaling(const btVector3& scaling)
913  {
914  localScaling = scaling;
915 
916  int i = m_mesh_parts.size();
917  while (i--)
918  {
920  part->setLocalScaling(scaling);
921  }
922 
923  m_needs_update = true;
924  }
925 
926  virtual void setMargin(btScalar margin)
927  {
928  m_collisionMargin = margin;
929 
930  int i = m_mesh_parts.size();
931  while (i--)
932  {
934  part->setMargin(margin);
935  }
936 
937  m_needs_update = true;
938  }
939 
941  virtual void postUpdate()
942  {
943  int i = m_mesh_parts.size();
944  while (i--)
945  {
947  part->postUpdate();
948  }
949 
950  m_needs_update = true;
951  }
952 
953  virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const;
954 
957  {
958  btAssert(0);
959  return NULL;
960  }
961 
963  virtual int getNumChildShapes() const
964  {
965  btAssert(0);
966  return 0;
967  }
968 
970  virtual bool childrenHasTransform() const
971  {
972  btAssert(0);
973  return false;
974  }
975 
977  virtual bool needsRetrieveTriangles() const
978  {
979  btAssert(0);
980  return false;
981  }
982 
984  virtual bool needsRetrieveTetrahedrons() const
985  {
986  btAssert(0);
987  return false;
988  }
989 
990  virtual void getBulletTriangle(int prim_index, btTriangleShapeEx& triangle) const
991  {
992  (void)prim_index;
993  (void)triangle;
994  btAssert(0);
995  }
996 
997  virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx& tetrahedron) const
998  {
999  (void)prim_index;
1000  (void)tetrahedron;
1001  btAssert(0);
1002  }
1003 
1005  virtual void lockChildShapes() const
1006  {
1007  btAssert(0);
1008  }
1009 
1010  virtual void unlockChildShapes() const
1011  {
1012  btAssert(0);
1013  }
1014 
1016 
1018  virtual void getChildAabb(int child_index, const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
1019  {
1020  (void)child_index;
1021  (void)t;
1022  (void)aabbMin;
1023  (void)aabbMax;
1024  btAssert(0);
1025  }
1026 
1028  virtual btCollisionShape* getChildShape(int index)
1029  {
1030  (void)index;
1031  btAssert(0);
1032  return NULL;
1033  }
1034 
1036  virtual const btCollisionShape* getChildShape(int index) const
1037  {
1038  (void)index;
1039  btAssert(0);
1040  return NULL;
1041  }
1042 
1044  virtual btTransform getChildTransform(int index) const
1045  {
1046  (void)index;
1047  btAssert(0);
1048  return btTransform();
1049  }
1050 
1052 
1055  virtual void setChildTransform(int index, const btTransform& transform)
1056  {
1057  (void)index;
1058  (void)transform;
1059  btAssert(0);
1060  }
1061 
1063  {
1065  }
1066 
1067  virtual const char* getName() const
1068  {
1069  return "GImpactMesh";
1070  }
1071 
1072  virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const;
1073 
1075 
1078  virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const;
1079 
1080  virtual void processAllTrianglesRay(btTriangleCallback* callback, const btVector3& rayFrom, const btVector3& rayTo) const;
1081 
1082  virtual int calculateSerializeBufferSize() const;
1083 
1085  virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
1086 };
1087 
1090 {
1092 
1094 
1096 
1098 
1100 };
1101 
1103 {
1104  return sizeof(btGImpactMeshShapeData);
1105 }
1106 
1107 #endif //GIMPACT_MESH_SHAPE_H
btCollisionShapeData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btCollisionShape.h:151
btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_count
virtual int get_primitive_count() const
Definition: btGImpactShape.h:325
btGImpactMeshShape::needsRetrieveTetrahedrons
virtual bool needsRetrieveTetrahedrons() const
Determines if this shape has tetrahedrons.
Definition: btGImpactShape.h:984
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager
TrimeshPrimitiveManager()
Definition: btGImpactShape.h:526
btGImpactMeshShapePart::calculateLocalInertia
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Definition: btGImpactShape.cpp:119
btGImpactMeshShapePart::getNumChildShapes
virtual int getNumChildShapes() const
Gets the number of children.
Definition: btGImpactShape.h:706
btGImpactMeshShape::unlockChildShapes
virtual void unlockChildShapes() const
Definition: btGImpactShape.h:1010
btGImpactShapeInterface::unlockChildShapes
virtual void unlockChildShapes() const
Definition: btGImpactShape.h:221
btGImpactMeshShapePart::setLocalScaling
virtual void setLocalScaling(const btVector3 &scaling)
Definition: btGImpactShape.h:814
btGImpactMeshShape::getChildShape
virtual btCollisionShape * getChildShape(int index)
Gets the children.
Definition: btGImpactShape.h:1028
btGImpactCompoundShape::childrenHasTransform
virtual bool childrenHasTransform() const
if true, then its children must get transforms.
Definition: btGImpactShape.h:371
btGImpactMeshShapePart::getChildTransform
virtual btTransform getChildTransform(int index) const
Gets the children transform.
Definition: btGImpactShape.h:728
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_count
virtual int get_primitive_count() const
Definition: btGImpactShape.h:607
btGImpactMeshShapePart::TrimeshPrimitiveManager::indexstride
int indexstride
Definition: btGImpactShape.h:522
btGImpactMeshShape::calculateLocalInertia
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Definition: btGImpactShape.cpp:156
btGImpactQuantizedBvh.h
btGImpactShapeInterface::localScaling
btVector3 localScaling
Definition: btGImpactShape.h:78
btGImpactCompoundShape::m_childShapes
btAlignedObjectArray< btCollisionShape * > m_childShapes
Definition: btGImpactShape.h:356
btCollisionShape.h
btGImpactMeshShapePart::getBulletTriangle
virtual void getBulletTriangle(int prim_index, btTriangleShapeEx &triangle) const
Definition: btGImpactShape.h:781
btGImpactMeshShape::getNumChildShapes
virtual int getNumChildShapes() const
Gets the number of children.
Definition: btGImpactShape.h:963
btGImpactMeshShape::needsRetrieveTriangles
virtual bool needsRetrieveTriangles() const
Determines if this shape has triangles.
Definition: btGImpactShape.h:977
btGImpactMeshShapePart::TrimeshPrimitiveManager::~TrimeshPrimitiveManager
virtual ~TrimeshPrimitiveManager()
Definition: btGImpactShape.h:573
btGImpactMeshShape::buildMeshParts
void buildMeshParts(btStridingMeshInterface *meshInterface)
Definition: btGImpactShape.h:848
btGImpactShapeInterface::needsRetrieveTriangles
virtual bool needsRetrieveTriangles() const =0
Determines if this shape has triangles.
btGImpactMeshShape::serialize
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition: btGImpactShape.cpp:264
btConcaveShape::m_collisionMargin
btScalar m_collisionMargin
Definition: btConcaveShape.h:41
btGImpactMeshShape::getChildAabb
virtual void getChildAabb(int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
Retrieves the bound from a child.
Definition: btGImpactShape.h:1018
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_box
virtual void get_primitive_box(int prim_index, btAABB &primbox) const
Definition: btGImpactShape.h:653
btVector3::setValue
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
Definition: btVector3.h:640
btGImpactMeshShape::rayTest
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
virtual method for ray collision
Definition: btGImpactShape.cpp:188
btGImpactMeshShapePart::TrimeshPrimitiveManager::m_lock_count
int m_lock_count
Definition: btGImpactShape.h:516
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:294
btGImpactCompoundShape::getPrimitiveManager
virtual const btPrimitiveManagerBase * getPrimitiveManager() const
Obtains the primitive manager.
Definition: btGImpactShape.h:378
btGImpactShapeInterface::getBoxSet
const btGImpactBoxSet * getBoxSet() const
gets boxset
Definition: btGImpactShape.h:185
btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_box
virtual void get_primitive_box(int prim_index, btAABB &primbox) const
Definition: btGImpactShape.h:330
btGImpactCompoundShape::addChildShape
void addChildShape(const btTransform &localTransform, btCollisionShape *shape)
Use this method for adding children. Only Convex shapes are allowed.
Definition: btGImpactShape.h:396
btGImpactCompoundShape::calculateLocalInertia
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
Calculates the exact inertia tensor for this shape.
Definition: btGImpactShape.cpp:78
btGImpactShapeInterface::setMargin
virtual void setMargin(btScalar margin)
Definition: btGImpactShape.h:165
btConcaveShape
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
Definition: btConcaveShape.h:37
btGImpactMeshShapePart::btGImpactMeshShapePart
btGImpactMeshShapePart()
Definition: btGImpactShape.h:687
btStridingMeshInterface.h
btGImpactQuantizedBvh::getGlobalBox
btAABB getGlobalBox() const
Definition: btGImpactQuantizedBvh.h:179
btGImpactShapeInterface::lockChildShapes
virtual void lockChildShapes() const
call when reading child shapes
Definition: btGImpactShape.h:217
btGImpactShapeInterface::rayTest
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btCollisionWorld::RayResultCallback &resultCallback) const
virtual method for ray collision
Definition: btGImpactShape.h:261
btGImpactShapeInterface::getLocalScaling
virtual const btVector3 & getLocalScaling() const
Definition: btGImpactShape.h:160
btGImpactCompoundShape::CompoundPrimitiveManager::is_trimesh
virtual bool is_trimesh() const
determines if this manager consist on only triangles, which special case will be optimized
Definition: btGImpactShape.h:320
btGImpactCompoundShape::addChildShape
void addChildShape(btCollisionShape *shape)
Use this method for adding children. Only Convex shapes are allowed.
Definition: btGImpactShape.h:404
btGImpactShapeInterface::getLocalBox
const btAABB & getLocalBox()
Obtains the local box, which is the global calculated box of the total of subshapes.
Definition: btGImpactShape.h:141
btGImpactMeshShape::calcLocalAABB
virtual void calcLocalAABB()
use this function for perfofm refit in bounding boxes
Definition: btGImpactShape.h:858
btGImpactCompoundShape::getChildTransform
virtual btTransform getChildTransform(int index) const
Gets the children transform.
Definition: btGImpactShape.h:438
btConcaveShape.h
btGImpactMeshShape::getMeshInterface
btStridingMeshInterface * getMeshInterface()
Definition: btGImpactShape.h:887
btAlignedObjectArray::clear
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
Definition: btAlignedObjectArray.h:183
btGImpactMeshShapePart
This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface.
Definition: btGImpactShape.h:502
btGImpactShapeInterface::getBulletTetrahedron
virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx &tetrahedron) const =0
btGImpactCompoundShape::getNumChildShapes
virtual int getNumChildShapes() const
Gets the number of children.
Definition: btGImpactShape.h:390
btGImpactShapeInterface::setLocalScaling
virtual void setLocalScaling(const btVector3 &scaling)
Definition: btGImpactShape.h:154
btPrimitiveTriangle::m_margin
btScalar m_margin
Definition: btTriangleShapeEx.h:74
btGImpactShapeInterface::needsRetrieveTetrahedrons
virtual bool needsRetrieveTetrahedrons() const =0
Determines if this shape has tetrahedrons.
btGImpactCompoundShape::btGImpactCompoundShape
btGImpactCompoundShape(bool children_has_transform=true)
Definition: btGImpactShape.h:359
btGImpactMeshShapePart::childrenHasTransform
virtual bool childrenHasTransform() const
if true, then its children must get transforms.
Definition: btGImpactShape.h:696
btGImpactMeshShape::getName
virtual const char * getName() const
Definition: btGImpactShape.h:1067
btTetrahedronShape.h
btGImpactMeshShape::getGImpactShapeType
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
Subshape member functions.
Definition: btGImpactShape.h:1062
btGImpactMeshShape::m_meshInterface
btStridingMeshInterface * m_meshInterface
Definition: btGImpactShape.h:844
btCollisionMargin.h
btMatrix3x3.h
btGImpactShapeInterface::calcLocalAABB
virtual void calcLocalAABB()
use this function for perfofm refit in bounding boxes use this function for perfofm refit in bounding...
Definition: btGImpactShape.h:83
btBU_Simplex1to4::m_numVertices
int m_numVertices
Definition: btTetrahedronShape.h:27
btPrimitiveManagerBase::get_primitive_triangle
virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle &triangle) const =0
retrieves only the points of the triangle, and the collision margin
btGImpactMeshShapePart::TrimeshPrimitiveManager
Trimesh primitive manager.
Definition: btGImpactShape.h:509
btGImpactMeshShape::setLocalScaling
virtual void setLocalScaling(const btVector3 &scaling)
Definition: btGImpactShape.h:912
btGImpactMeshShape
This class manages a mesh supplied by the btStridingMeshInterface interface.
Definition: btGImpactShape.h:842
btGImpactCompoundShape::CompoundPrimitiveManager::m_compoundShape
btGImpactCompoundShape * m_compoundShape
Definition: btGImpactShape.h:302
btGImpactMeshShapePart::getChildShape
virtual btCollisionShape * getChildShape(int index)
Gets the children.
Definition: btGImpactShape.h:712
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager
CompoundPrimitiveManager(btGImpactCompoundShape *compoundShape)
Definition: btGImpactShape.h:310
btGImpactCompoundShape::getGImpactShapeType
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
Subshape member functions.
Definition: btGImpactShape.h:489
btGImpactShapeInterface::btGImpactShapeInterface
btGImpactShapeInterface()
Definition: btGImpactShape.h:100
btGImpactCompoundShape::m_primitive_manager
CompoundPrimitiveManager m_primitive_manager
Definition: btGImpactShape.h:354
btGImpactMeshShapePart::TrimeshPrimitiveManager::stride
int stride
Definition: btGImpactShape.h:520
btGImpactMeshShapePart::TrimeshPrimitiveManager::vertexbase
const unsigned char * vertexbase
Definition: btGImpactShape.h:517
btTriangleShape.h
btVector3FloatData
Definition: btVector3.h:1281
btCollisionWorld.h
btGImpactShapeInterface::getAabb
void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
If the Bounding box is not updated, then this class attemps to calculate it.
Definition: btGImpactShape.h:126
GIMPACT_SHAPE_PROXYTYPE
Used for GIMPACT Trimesh integration.
Definition: btBroadphaseProxy.h:61
btTransform::setIdentity
void setIdentity()
Set this transformation to the identity.
Definition: btTransform.h:166
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager
TrimeshPrimitiveManager(btStridingMeshInterface *meshInterface, int part)
Definition: btGImpactShape.h:557
btGImpactMeshShapePart::getChildShape
virtual const btCollisionShape * getChildShape(int index) const
Gets the child.
Definition: btGImpactShape.h:720
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager
CompoundPrimitiveManager(const CompoundPrimitiveManager &compound)
Definition: btGImpactShape.h:304
btGImpactShapeInterface::getGImpactShapeType
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const =0
Subshape member functions.
btStridingMeshInterface
The btStridingMeshInterface is the interface class for high performance generic access to triangle me...
Definition: btStridingMeshInterface.h:26
btGImpactShapeInterface::getChildAabb
virtual void getChildAabb(int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
Retrieves the bound from a child.
Definition: btGImpactShape.h:234
btGImpactCompoundShape::m_childTransforms
btAlignedObjectArray< btTransform > m_childTransforms
Definition: btGImpactShape.h:355
btGImpactCompoundShape::needsRetrieveTriangles
virtual bool needsRetrieveTriangles() const
Determines if this shape has triangles.
Definition: btGImpactShape.h:456
btCollisionShape::m_shapeType
int m_shapeType
Definition: btCollisionShape.h:30
btAABB
Axis aligned box.
Definition: btBoxCollision.h:214
btVector3.h
btCollisionShape
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
Definition: btCollisionShape.h:26
btPrimitiveTriangle
Definition: btTriangleShapeEx.h:69
btTriangleShapeEx
Helper class for colliding Bullet Triangle Shapes.
Definition: btTriangleShapeEx.h:126
btAssert
#define btAssert(x)
Definition: btScalar.h:133
btGImpactMeshShapeData::m_gimpactSubType
int m_gimpactSubType
Definition: btGImpactShape.h:1099
PHY_DOUBLE
Definition: btConcaveShape.h:28
btGImpactMeshShape::getMeshPart
const btGImpactMeshShapePart * getMeshPart(int index) const
Definition: btGImpactShape.h:907
btGImpactMeshShapeData::m_collisionMargin
float m_collisionMargin
Definition: btGImpactShape.h:1097
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_vertex_count
int get_vertex_count() const
Definition: btGImpactShape.h:612
btGImpactMeshShapePart::getGImpactShapeType
virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
Subshape member functions.
Definition: btGImpactShape.h:764
btGImpactMeshShape::getMeshPartCount
int getMeshPartCount() const
Definition: btGImpactShape.h:897
btGImpactCompoundShape::getCompoundPrimitiveManager
CompoundPrimitiveManager * getCompoundPrimitiveManager()
Obtains the compopund primitive manager.
Definition: btGImpactShape.h:384
btGImpactMeshShapeData::m_meshInterface
btStridingMeshInterfaceData m_meshInterface
Definition: btGImpactShape.h:1093
btGImpactShapeInterface::m_needs_update
bool m_needs_update
Definition: btGImpactShape.h:77
btGImpactMeshShapePart::TrimeshPrimitiveManager::type
PHY_ScalarType type
Definition: btGImpactShape.h:519
btGImpactMeshShapePart::TrimeshPrimitiveManager::lock
void lock()
Definition: btGImpactShape.h:575
btGImpactShapeInterface::m_box_set
btGImpactBoxSet m_box_set
Definition: btGImpactShape.h:79
btGImpactMeshShape::getChildShape
virtual const btCollisionShape * getChildShape(int index) const
Gets the child.
Definition: btGImpactShape.h:1036
btGImpactShapeInterface::getPrimitiveManager
virtual const btPrimitiveManagerBase * getPrimitiveManager() const =0
Obtains the primitive manager.
btGImpactMeshShape::setMargin
virtual void setMargin(btScalar margin)
Definition: btGImpactShape.h:926
PHY_ScalarType
PHY_ScalarType
PHY_ScalarType enumerates possible scalar types.
Definition: btConcaveShape.h:25
btGImpactMeshShape::btGImpactMeshShape
btGImpactMeshShape(btStridingMeshInterface *meshInterface)
Definition: btGImpactShape.h:870
btGImpactCompoundShape::getChildAabb
virtual void getChildAabb(int child_index, const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
Retrieves the bound from a child.
Definition: btGImpactShape.h:425
btGImpactShapeInterface::postUpdate
virtual void postUpdate()
Tells to this object that is needed to refit the box set.
Definition: btGImpactShape.h:135
btGImpactBoxSet
btGImpactQuantizedBvh btGImpactBoxSet
declare Quantized trees, (you can change to float based trees)
Definition: btGImpactShape.h:42
btCollisionShape::getAabb
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_vertex
void get_vertex(unsigned int vertex_index, btVector3 &vertex) const
Definition: btGImpactShape.h:635
btGImpactCompoundShape::CompoundPrimitiveManager
compound primitive manager
Definition: btGImpactShape.h:298
btGImpactMeshShapePart::getVertexCount
int getVertexCount() const
Definition: btGImpactShape.h:793
btGImpactMeshShapePart::getMargin
btScalar getMargin() const
Definition: btGImpactShape.h:809
btTransform.h
btTriangleCallback
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
Definition: btTriangleCallback.h:23
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:28
btGImpactMeshShapePart::TrimeshPrimitiveManager::indicestype
PHY_ScalarType indicestype
Definition: btGImpactShape.h:524
btPrimitiveTriangle::m_vertices
btVector3 m_vertices[3]
Definition: btTriangleShapeEx.h:72
btGImpactQuantizedBvh::update
void update()
node manager prototype functions
Definition: btGImpactQuantizedBvh.h:200
btAABB::invalidate
void invalidate()
Definition: btBoxCollision.h:273
btGImpactShapeInterface::getNumChildShapes
virtual int getNumChildShapes() const =0
Gets the number of children.
btGImpactMeshShape::childrenHasTransform
virtual bool childrenHasTransform() const
if true, then its children must get transforms.
Definition: btGImpactShape.h:970
btGImpactMeshShapePart::TrimeshPrimitiveManager::m_margin
btScalar m_margin
Definition: btGImpactShape.h:512
btGImpactMeshShapePart::TrimeshPrimitiveManager::is_trimesh
virtual bool is_trimesh() const
determines if this manager consist on only triangles, which special case will be optimized
Definition: btGImpactShape.h:602
btGImpactMeshShape::processAllTriangles
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles.
Definition: btGImpactShape.cpp:245
btGImpactQuantizedBvh::setPrimitiveManager
void setPrimitiveManager(btPrimitiveManagerBase *primitive_manager)
Definition: btGImpactQuantizedBvh.h:186
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:80
btGImpactMeshShapePart::setChildTransform
virtual void setChildTransform(int index, const btTransform &transform)
Sets the children transform.
Definition: btGImpactShape.h:739
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_bullet_triangle
void get_bullet_triangle(int prim_index, btTriangleShapeEx &triangle) const
Definition: btGImpactShape.h:672
btGImpactMeshShape::getChildTransform
virtual btTransform getChildTransform(int index) const
Gets the children transform.
Definition: btGImpactShape.h:1044
btGImpactMeshShape::~btGImpactMeshShape
virtual ~btGImpactMeshShape()
Definition: btGImpactShape.h:876
btGImpactMeshShapePart::needsRetrieveTetrahedrons
virtual bool needsRetrieveTetrahedrons() const
Determines if this shape has tetrahedrons.
Definition: btGImpactShape.h:776
btGImpactCompoundShape::getBulletTetrahedron
virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx &tetrahedron) const
Definition: btGImpactShape.h:474
btTetrahedronShapeEx::btTetrahedronShapeEx
btTetrahedronShapeEx()
Definition: btGImpactShape.h:55
btGImpactMeshShape::getMeshPart
btGImpactMeshShapePart * getMeshPart(int index)
Definition: btGImpactShape.h:902
btGImpactShapeInterface::getChildShape
virtual btCollisionShape * getChildShape(int index)=0
Gets the children.
btStridingMeshInterface::getLockedReadOnlyVertexIndexBase
virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int &numverts, PHY_ScalarType &type, int &stride, const unsigned char **indexbase, int &indexstride, int &numfaces, PHY_ScalarType &indicestype, int subpart=0) const =0
eGIMPACT_SHAPE_TYPE
eGIMPACT_SHAPE_TYPE
Definition: btGImpactShape.h:44
btGImpactMeshShapePart::lockChildShapes
virtual void lockChildShapes() const
call when reading child shapes
Definition: btGImpactShape.cpp:54
btGImpactMeshShape::postUpdate
virtual void postUpdate()
Tells to this object that is needed to refit all the meshes.
Definition: btGImpactShape.h:941
btGImpactMeshShape::calculateSerializeBufferSize
virtual int calculateSerializeBufferSize() const
Definition: btGImpactShape.h:1102
btGImpactMeshShapePart::setMargin
void setMargin(btScalar margin)
Definition: btGImpactShape.h:803
btGImpactCompoundShape::getChildShape
virtual btCollisionShape * getChildShape(int index)
Gets the children.
Definition: btGImpactShape.h:411
btGImpactMeshShape::getBulletTetrahedron
virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx &tetrahedron) const
Definition: btGImpactShape.h:997
btGImpactMeshShape::processAllTrianglesRay
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles.
Definition: btGImpactShape.cpp:254
btStridingMeshInterface::getScaling
const btVector3 & getScaling() const
Definition: btStridingMeshInterface.h:80
btGImpactMeshShapeData::m_collisionShapeData
btCollisionShapeData m_collisionShapeData
Definition: btGImpactShape.h:1091
btAlignedObjectArray< btTransform >
btPolyhedralConvexAabbCachingShape::recalcLocalAabb
void recalcLocalAabb()
Definition: btPolyhedralConvexShape.cpp:505
btAABB::calc_from_triangle_margin
void calc_from_triangle_margin(const CLASS_POINT &V1, const CLASS_POINT &V2, const CLASS_POINT &V3, btScalar margin)
Definition: btBoxCollision.h:320
btTriangleShape::m_vertices1
btVector3 m_vertices1[3]
Definition: btTriangleShape.h:28
btGImpactCompoundShape::getBulletTriangle
virtual void getBulletTriangle(int prim_index, btTriangleShapeEx &triangle) const
Definition: btGImpactShape.h:467
btCollisionShape::isConvex
bool isConvex() const
Definition: btCollisionShape.h:69
btGImpactMeshShapePart::unlockChildShapes
virtual void unlockChildShapes() const
Definition: btGImpactShape.cpp:65
btGImpactMeshShape::m_mesh_parts
btAlignedObjectArray< btGImpactMeshShapePart * > m_mesh_parts
Definition: btGImpactShape.h:847
SIMD_FORCE_INLINE
#define SIMD_FORCE_INLINE
Definition: btScalar.h:83
btGImpactMeshShapePart::getLocalScaling
virtual const btVector3 & getLocalScaling() const
Definition: btGImpactShape.h:820
btGImpactCompoundShape::setChildTransform
virtual void setChildTransform(int index, const btTransform &transform)
Sets the children transform.
Definition: btGImpactShape.h:448
btGImpactMeshShape::lockChildShapes
virtual void lockChildShapes() const
call when reading child shapes
Definition: btGImpactShape.h:1005
btGImpactMeshShapePart::needsRetrieveTriangles
virtual bool needsRetrieveTriangles() const
Determines if this shape has triangles.
Definition: btGImpactShape.h:770
CONST_GIMPACT_COMPOUND_SHAPE
Definition: btGImpactShape.h:46
btGImpactShapeInterface::getChildTransform
virtual btTransform getChildTransform(int index) const =0
Gets the children transform.
btSerializer
Definition: btSerializer.h:65
btPrimitiveManagerBase
Prototype Base class for primitive classification.
Definition: btGImpactBvh.h:149
CONST_GIMPACT_TRIMESH_SHAPE
Definition: btGImpactShape.h:48
btAABB::m_max
btVector3 m_max
Definition: btBoxCollision.h:219
btGImpactMeshShape::getMeshInterface
const btStridingMeshInterface * getMeshInterface() const
Definition: btGImpactShape.h:892
btCollisionShape::setMargin
virtual void setMargin(btScalar margin)=0
btGImpactShapeInterface
Base class for gimpact shapes.
Definition: btGImpactShape.h:73
btGImpactShapeInterface::processAllTrianglesRay
virtual void processAllTrianglesRay(btTriangleCallback *, const btVector3 &, const btVector3 &) const
Function for retrieve triangles.
Definition: btGImpactShape.h:283
btGImpactCompoundShape::~btGImpactCompoundShape
virtual ~btGImpactCompoundShape()
Definition: btGImpactShape.h:366
btAABB::merge
void merge(const btAABB &box)
Merges a Box.
Definition: btBoxCollision.h:374
btAABB::appy_transform
void appy_transform(const btTransform &trans)
Apply a transform to an AABB.
Definition: btBoxCollision.h:342
btTetrahedronShapeEx::setVertices
void setVertices(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &v3)
Definition: btGImpactShape.h:60
btGImpactMeshShapePart::getPart
int getPart() const
Definition: btGImpactShape.h:825
btGImpactCompoundShape
btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once
Definition: btGImpactShape.h:294
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_primitive_triangle
virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle &triangle) const
retrieves only the points of the triangle, and the collision margin
Definition: btGImpactShape.h:662
btGImpactShapeInterface::getBulletTriangle
virtual void getBulletTriangle(int prim_index, btTriangleShapeEx &triangle) const =0
btGImpactMeshShapePart::TrimeshPrimitiveManager::get_indices
void get_indices(int face_index, unsigned int &i0, unsigned int &i1, unsigned int &i2) const
Definition: btGImpactShape.h:617
btGImpactMeshShapeData::m_localScaling
btVector3FloatData m_localScaling
Definition: btGImpactShape.h:1095
btGImpactCompoundShape::CompoundPrimitiveManager::~CompoundPrimitiveManager
virtual ~CompoundPrimitiveManager()
Definition: btGImpactShape.h:301
btStridingMeshInterface::getNumSubParts
virtual int getNumSubParts() const =0
getNumSubParts returns the number of seperate subparts each subpart has a continuous array of vertice...
btGImpactShapeInterface::processAllTriangles
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles.
Definition: btGImpactShape.h:272
btGImpactMeshShapePart::TrimeshPrimitiveManager::numverts
int numverts
Definition: btGImpactShape.h:518
btGImpactMeshShapePart::TrimeshPrimitiveManager::unlock
void unlock()
Definition: btGImpactShape.h:589
btGImpactMeshShapePart::TrimeshPrimitiveManager::indexbase
const unsigned char * indexbase
Definition: btGImpactShape.h:521
btGImpactShapeInterface::setChildTransform
virtual void setChildTransform(int index, const btTransform &transform)=0
Sets the children transform.
btGImpactMeshShapePart::getBulletTetrahedron
virtual void getBulletTetrahedron(int prim_index, btTetrahedronShapeEx &tetrahedron) const
Definition: btGImpactShape.h:786
btGImpactShapeInterface::getPrimitiveTriangle
void getPrimitiveTriangle(int index, btPrimitiveTriangle &triangle) const
if this trimesh
Definition: btGImpactShape.h:226
btBU_Simplex1to4
The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex collision shapes....
Definition: btTetrahedronShape.h:23
btBU_Simplex1to4::m_vertices
btVector3 m_vertices[4]
Definition: btTetrahedronShape.h:28
btConvexInternalShape::setMargin
virtual void setMargin(btScalar margin)
Definition: btConvexInternalShape.h:102
btGImpactCompoundShape::CompoundPrimitiveManager::CompoundPrimitiveManager
CompoundPrimitiveManager()
Definition: btGImpactShape.h:315
btGImpactShapeInterface::m_localAABB
btAABB m_localAABB
Definition: btGImpactShape.h:76
CONST_GIMPACT_TRIMESH_SHAPE_PART
Definition: btGImpactShape.h:47
btGImpactMeshShape::getPrimitiveManager
virtual const btPrimitiveManagerBase * getPrimitiveManager() const
Obtains the primitive manager.
Definition: btGImpactShape.h:956
btAlignedObjectArray.h
btGImpactCompoundShape::getChildShape
virtual const btCollisionShape * getChildShape(int index) const
Gets the children.
Definition: btGImpactShape.h:417
btGImpactMeshShapePart::getVertex
void getVertex(int vertex_index, btVector3 &vertex) const
Definition: btGImpactShape.h:798
btGImpactMeshShapePart::TrimeshPrimitiveManager::TrimeshPrimitiveManager
TrimeshPrimitiveManager(const TrimeshPrimitiveManager &manager)
Definition: btGImpactShape.h:541
btGImpactMeshShapePart::TrimeshPrimitiveManager::m_part
int m_part
Definition: btGImpactShape.h:515
btGImpactShapeInterface::getShapeType
virtual int getShapeType() const
Definition: btGImpactShape.h:146
btAABB::m_min
btVector3 m_min
Definition: btBoxCollision.h:218
btGImpactMeshShapePart::getTrimeshPrimitiveManager
TrimeshPrimitiveManager * getTrimeshPrimitiveManager()
Definition: btGImpactShape.h:752
btGImpactMeshShapePart::m_primitive_manager
TrimeshPrimitiveManager m_primitive_manager
Definition: btGImpactShape.h:684
btStridingMeshInterfaceData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btStridingMeshInterface.h:138
btGImpactMeshShapePart::getName
virtual const char * getName() const
Definition: btGImpactShape.h:759
btGImpactShapeInterface::childrenHasTransform
virtual bool childrenHasTransform() const =0
if true, then its children must get transforms.
btPrimitiveManagerBase::get_primitive_box
virtual void get_primitive_box(int prim_index, btAABB &primbox) const =0
btGImpactQuantizedBvh::getNodeCount
int getNodeCount() const
node count
Definition: btGImpactQuantizedBvh.h:238
btCollisionWorld::RayResultCallback
RayResultCallback is used to report new raycast results.
Definition: btCollisionWorld.h:195
btGImpactMeshShape::setChildTransform
virtual void setChildTransform(int index, const btTransform &transform)
Sets the children transform.
Definition: btGImpactShape.h:1055
btAlignedObjectArray::push_back
void push_back(const T &_Val)
Definition: btAlignedObjectArray.h:264
btGImpactCompoundShape::getName
virtual const char * getName() const
Definition: btGImpactShape.h:484
btGImpactMeshShape::getBulletTriangle
virtual void getBulletTriangle(int prim_index, btTriangleShapeEx &triangle) const
Definition: btGImpactShape.h:990
btStridingMeshInterface::unLockReadOnlyVertexBase
virtual void unLockReadOnlyVertexBase(int subpart) const =0
btGImpactMeshShapeData
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition: btGImpactShape.h:1089
btGImpactShapeInterface::updateBound
void updateBound()
performs refit operation
Definition: btGImpactShape.h:115
btGImpactMeshShapePart::processAllTriangles
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const
Function for retrieve triangles.
Definition: btGImpactShape.cpp:218
btGImpactMeshShapePart::getPrimitiveManager
virtual const btPrimitiveManagerBase * getPrimitiveManager() const
Obtains the primitive manager.
Definition: btGImpactShape.h:747
btGImpactShapeInterface::hasBoxSet
bool hasBoxSet() const
Determines if this class has a hierarchy structure for sorting its primitives.
Definition: btGImpactShape.h:191
btGImpactMeshShapePart::TrimeshPrimitiveManager::numfaces
int numfaces
Definition: btGImpactShape.h:523
btGImpactMeshShapePart::~btGImpactMeshShapePart
virtual ~btGImpactMeshShapePart()
Definition: btGImpactShape.cpp:46
btGImpactQuantizedBvh
Structure for containing Boxes.
Definition: btGImpactQuantizedBvh.h:156
btGImpactCompoundShape::CompoundPrimitiveManager::get_primitive_triangle
virtual void get_primitive_triangle(int prim_index, btPrimitiveTriangle &triangle) const
retrieves only the points of the triangle, and the collision margin
Definition: btGImpactShape.h:345
btGImpactMeshShapePart::processAllTrianglesRay
virtual void processAllTrianglesRay(btTriangleCallback *callback, const btVector3 &rayFrom, const btVector3 &rayTo) const
Function for retrieve triangles.
Definition: btGImpactShape.cpp:192
btAlignedObjectArray::size
int size() const
return the number of elements in the array
Definition: btAlignedObjectArray.h:149
PHY_SHORT
Definition: btConcaveShape.h:30
btGImpactCompoundShape::needsRetrieveTetrahedrons
virtual bool needsRetrieveTetrahedrons() const
Determines if this shape has tetrahedrons.
Definition: btGImpactShape.h:462
btGImpactMeshShapePart::TrimeshPrimitiveManager::m_scale
btVector3 m_scale
Definition: btGImpactShape.h:514
btGImpactMeshShapePart::TrimeshPrimitiveManager::m_meshInterface
btStridingMeshInterface * m_meshInterface
Definition: btGImpactShape.h:513
btTetrahedronShapeEx
Helper class for tetrahedrons.
Definition: btGImpactShape.h:52
btGImpactQuantizedBvh::buildSet
void buildSet()
this rebuild the entire set
Definition: btGImpactQuantizedBvh.cpp:270