~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.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:
189
189
        //!@{
190
190
 
191
191
        //! Base method for determinig which kind of GIMPACT shape we get
192
 
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() = 0;
 
192
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const = 0 ;
193
193
 
194
194
        //! gets boxset
195
195
        SIMD_FORCE_INLINE btGImpactBoxSet * getBoxSet()
276
276
        //! virtual method for ray collision
277
277
        virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback)  const
278
278
        {
 
279
        (void) rayFrom; (void) rayTo; (void) resultCallback;
279
280
        }
280
281
 
281
282
        //! Function for retrieve triangles.
284
285
        */
285
286
        virtual void    processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
286
287
        {
 
288
        (void) callback; (void) aabbMin; (void) aabbMax;
287
289
        }
288
290
 
289
291
        //!@}
302
304
        class CompoundPrimitiveManager:public btPrimitiveManagerBase
303
305
        {
304
306
        public:
 
307
                virtual ~CompoundPrimitiveManager() {}
305
308
                btGImpactCompoundShape * m_compoundShape;
306
309
 
307
310
 
308
311
                CompoundPrimitiveManager(const CompoundPrimitiveManager& compound)
 
312
            : btPrimitiveManagerBase()
309
313
                {
310
314
                        m_compoundShape = compound.m_compoundShape;
311
315
                }
348
352
                virtual void get_primitive_triangle(int prim_index,btPrimitiveTriangle & triangle) const
349
353
                {
350
354
                        btAssert(0);
 
355
            (void) prim_index; (void) triangle;
351
356
                }
352
357
 
353
358
        };
364
369
 
365
370
        btGImpactCompoundShape(bool children_has_transform = true)
366
371
        {
 
372
        (void) children_has_transform;
367
373
                m_primitive_manager.m_compoundShape = this;
368
374
                m_box_set.setPrimitiveManager(&m_primitive_manager);
369
375
        }
477
483
 
478
484
        virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const
479
485
        {
 
486
        (void) prim_index; (void) triangle;
480
487
                btAssert(0);
481
488
        }
482
489
 
483
490
        virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
484
491
        {
 
492
        (void) prim_index; (void) tetrahedron;
485
493
                btAssert(0);
486
494
        }
487
495
 
494
502
                return "GImpactCompound";
495
503
        }
496
504
 
497
 
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType()
 
505
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
498
506
        {
499
507
                return CONST_GIMPACT_COMPOUND_SHAPE;
500
508
        }
550
558
                }
551
559
 
552
560
                TrimeshPrimitiveManager(const TrimeshPrimitiveManager & manager)
 
561
            : btPrimitiveManagerBase()
553
562
                {
554
563
                        m_meshInterface = manager.m_meshInterface;
555
564
                        m_part = manager.m_part;
582
591
 
583
592
                }
584
593
 
 
594
                virtual ~TrimeshPrimitiveManager() {}
585
595
 
586
596
                void lock()
587
597
                {
746
756
        //! Gets the children
747
757
        virtual btCollisionShape* getChildShape(int index)
748
758
        {
 
759
        (void) index;
749
760
                btAssert(0);
750
761
                return NULL;
751
762
        }
755
766
        //! Gets the child
756
767
        virtual const btCollisionShape* getChildShape(int index) const
757
768
        {
 
769
        (void) index;
758
770
                btAssert(0);
759
771
                return NULL;
760
772
        }
762
774
        //! Gets the children transform
763
775
        virtual btTransform     getChildTransform(int index) const
764
776
        {
 
777
        (void) index;
765
778
                btAssert(0);
766
779
                return btTransform();
767
780
        }
772
785
        */
773
786
        virtual void setChildTransform(int index, const btTransform & transform)
774
787
        {
 
788
        (void) index;
 
789
        (void) transform;
775
790
                btAssert(0);
776
791
        }
777
792
 
801
816
                return "GImpactMeshShapePart";
802
817
        }
803
818
 
804
 
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType()
 
819
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
805
820
        {
806
821
                return CONST_GIMPACT_TRIMESH_SHAPE_PART;
807
822
        }
825
840
 
826
841
        virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
827
842
        {
 
843
        (void) prim_index;
 
844
        (void) tetrahedron;
828
845
                btAssert(0);
829
846
        }
830
847
 
1036
1053
 
1037
1054
        virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const
1038
1055
        {
 
1056
        (void) prim_index; (void) triangle;
1039
1057
                btAssert(0);
1040
1058
        }
1041
1059
 
1042
1060
        virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
1043
1061
        {
 
1062
        (void) prim_index; (void) tetrahedron;
1044
1063
                btAssert(0);
1045
1064
        }
1046
1065
 
1063
1082
    */
1064
1083
    virtual void getChildAabb(int child_index,const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
1065
1084
    {
 
1085
        (void) child_index; (void) t; (void) aabbMin; (void) aabbMax;
1066
1086
        btAssert(0);
1067
1087
    }
1068
1088
 
1069
1089
        //! Gets the children
1070
1090
        virtual btCollisionShape* getChildShape(int index)
1071
1091
        {
 
1092
        (void) index;
1072
1093
                btAssert(0);
1073
1094
                return NULL;
1074
1095
        }
1077
1098
        //! Gets the child
1078
1099
        virtual const btCollisionShape* getChildShape(int index) const
1079
1100
        {
 
1101
        (void) index;
1080
1102
                btAssert(0);
1081
1103
                return NULL;
1082
1104
        }
1084
1106
        //! Gets the children transform
1085
1107
        virtual btTransform     getChildTransform(int index) const
1086
1108
        {
 
1109
        (void) index;
1087
1110
                btAssert(0);
1088
1111
                return btTransform();
1089
1112
        }
1094
1117
        */
1095
1118
        virtual void setChildTransform(int index, const btTransform & transform)
1096
1119
        {
 
1120
        (void) index; (void) transform;
1097
1121
                btAssert(0);
1098
1122
        }
1099
1123
 
1100
1124
 
1101
 
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType()
 
1125
        virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
1102
1126
        {
1103
1127
                return CONST_GIMPACT_TRIMESH_SHAPE;
1104
1128
        }
1116
1140
        It gives the triangles in local space
1117
1141
        */
1118
1142
        virtual void    processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
1119
 
};
 
1143
 
 
1144
        virtual int     calculateSerializeBufferSize() const;
 
1145
 
 
1146
        ///fills the dataBuffer and returns the struct name (and 0 on failure)
 
1147
        virtual const char*     serialize(void* dataBuffer, btSerializer* serializer) const;
 
1148
 
 
1149
};
 
1150
 
 
1151
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
 
1152
struct  btGImpactMeshShapeData
 
1153
{
 
1154
        btCollisionShapeData    m_collisionShapeData;
 
1155
 
 
1156
        btStridingMeshInterfaceData m_meshInterface;
 
1157
 
 
1158
        btVector3FloatData      m_localScaling;
 
1159
 
 
1160
        float   m_collisionMargin;
 
1161
 
 
1162
        int             m_gimpactSubType;
 
1163
};
 
1164
 
 
1165
SIMD_FORCE_INLINE       int     btGImpactMeshShape::calculateSerializeBufferSize() const
 
1166
{
 
1167
        return sizeof(btGImpactMeshShapeData);
 
1168
}
1120
1169
 
1121
1170
 
1122
1171
#endif //GIMPACT_MESH_SHAPE_H