| 2840 | //---------------------------------------------------------------------------- |
| 2841 | |
| 2842 | bool ShapeBase::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &, const SphereF &) |
| 2843 | { |
| 2844 | if ( !mShapeInstance ) |
| 2845 | return false; |
| 2846 | |
| 2847 | polyList->setTransform(&mObjToWorld, mObjScale); |
| 2848 | polyList->setObject(this); |
| 2849 | |
| 2850 | if ( context == PLC_Selection ) |
| 2851 | { |
| 2852 | mShapeInstance->animate(); |
| 2853 | mShapeInstance->buildPolyList(polyList,mShapeInstance->getCurrentDetail()); |
| 2854 | return true; |
| 2855 | } |
| 2856 | else if ( context == PLC_Export ) |
| 2857 | { |
| 2858 | // Try to call on the client so we can export materials |
| 2859 | ShapeBase* exportObj = this; |
| 2860 | if ( isServerObject() && getClientObject() ) |
| 2861 | exportObj = dynamic_cast<ShapeBase*>(getClientObject()); |
| 2862 | |
| 2863 | S32 dl = 0; |
| 2864 | exportObj->mShapeInstance->animate(); |
| 2865 | exportObj->mShapeInstance->buildPolyList(polyList, dl); |
| 2866 | return true; |
| 2867 | } |
| 2868 | else |
| 2869 | { |
| 2870 | bool ret = false; |
| 2871 | for (U32 i = 0; i < mDataBlock->collisionDetails.size(); i++) |
| 2872 | { |
| 2873 | mShapeInstance->buildPolyList(polyList,mDataBlock->collisionDetails[i]); |
| 2874 | ret = true; |
| 2875 | } |
| 2876 | |
| 2877 | return ret; |
| 2878 | } |
| 2879 | } |
| 2880 | |
| 2881 | void ShapeBase::buildConvex(const Box3F& box, Convex* convex) |
| 2882 | { |
no test coverage detected