Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/BroadphaseCollision/btDbvt.cpp
| Show All 32 Lines | static DBVT_INLINE int indexof(const btDbvtNode* node) | ||||
| return(node->parent->childs[1]==node); | return(node->parent->childs[1]==node); | ||||
| } | } | ||||
| // | // | ||||
| static DBVT_INLINE btDbvtVolume merge( const btDbvtVolume& a, | static DBVT_INLINE btDbvtVolume merge( const btDbvtVolume& a, | ||||
| const btDbvtVolume& b) | const btDbvtVolume& b) | ||||
| { | { | ||||
| #if (DBVT_MERGE_IMPL==DBVT_IMPL_SSE) | #if (DBVT_MERGE_IMPL==DBVT_IMPL_SSE) | ||||
| ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtAabbMm)]); | ATTRIBUTE_ALIGNED16( char locals[sizeof(btDbvtAabbMm)]); | ||||
| btDbvtVolume& res=*(btDbvtVolume*)locals; | btDbvtVolume* ptr = (btDbvtVolume*) locals; | ||||
| btDbvtVolume& res=*ptr; | |||||
| #else | #else | ||||
| btDbvtVolume res; | btDbvtVolume res; | ||||
| #endif | #endif | ||||
| Merge(a,b,res); | Merge(a,b,res); | ||||
| return(res); | return(res); | ||||
| } | } | ||||
| // volume+edge lengths | // volume+edge lengths | ||||
| ▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | static void split( const tNodeArray& leaves, | ||||
| } | } | ||||
| } | } | ||||
| // | // | ||||
| static btDbvtVolume bounds( const tNodeArray& leaves) | static btDbvtVolume bounds( const tNodeArray& leaves) | ||||
| { | { | ||||
| #if DBVT_MERGE_IMPL==DBVT_IMPL_SSE | #if DBVT_MERGE_IMPL==DBVT_IMPL_SSE | ||||
| ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtVolume)]); | ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtVolume)]); | ||||
| btDbvtVolume& volume=*(btDbvtVolume*)locals; | btDbvtVolume* ptr = (btDbvtVolume*) locals; | ||||
| btDbvtVolume& volume=*ptr; | |||||
| volume=leaves[0]->volume; | volume=leaves[0]->volume; | ||||
| #else | #else | ||||
| btDbvtVolume volume=leaves[0]->volume; | btDbvtVolume volume=leaves[0]->volume; | ||||
| #endif | #endif | ||||
| for(int i=1,ni=leaves.size();i<ni;++i) | for(int i=1,ni=leaves.size();i<ni;++i) | ||||
| { | { | ||||
| Merge(volume,leaves[i]->volume,volume); | Merge(volume,leaves[i]->volume,volume); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,034 Lines • Show Last 20 Lines | |||||