| 2689 | //---------------------------------------------------------------------------- |
| 2690 | |
| 2691 | bool ShapeBase::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &, const SphereF &) |
| 2692 | { |
| 2693 | if ( !mShapeInstance ) |
| 2694 | return false; |
| 2695 | |
| 2696 | polyList->setTransform(&mObjToWorld, mObjScale); |
| 2697 | polyList->setObject(this); |
| 2698 | |
| 2699 | if ( context == PLC_Selection ) |
| 2700 | { |
| 2701 | mShapeInstance->animate(); |
| 2702 | mShapeInstance->buildPolyList(polyList,mShapeInstance->getCurrentDetail()); |
| 2703 | return true; |
| 2704 | } |
| 2705 | else if ( context == PLC_Export ) |
| 2706 | { |
| 2707 | // Try to call on the client so we can export materials |
| 2708 | ShapeBase* exportObj = this; |
| 2709 | if ( isServerObject() && getClientObject() ) |
| 2710 | exportObj = dynamic_cast<ShapeBase*>(getClientObject()); |
| 2711 | |
| 2712 | S32 dl = 0; |
| 2713 | exportObj->mShapeInstance->animate(); |
| 2714 | exportObj->mShapeInstance->buildPolyList(polyList, dl); |
| 2715 | return true; |
| 2716 | } |
| 2717 | else |
| 2718 | { |
| 2719 | bool ret = false; |
| 2720 | for (U32 i = 0; i < mDataBlock->collisionDetails.size(); i++) |
| 2721 | { |
| 2722 | mShapeInstance->buildPolyList(polyList,mDataBlock->collisionDetails[i]); |
| 2723 | ret = true; |
| 2724 | } |
| 2725 | |
| 2726 | return ret; |
| 2727 | } |
| 2728 | } |
| 2729 | |
| 2730 | void ShapeBase::buildConvex(const Box3F& box, Convex* convex) |
| 2731 | { |
no test coverage detected