| 795 | } |
| 796 | |
| 797 | void Object::DrawProxies(int level, ClipFlags clipFlags, const Matrix4& transform, const Matrix4& invTransform, |
| 798 | float dist2, float z2, const LightList& lights) |
| 799 | { |
| 800 | Shape* sShape = _shape->LevelOpaque(level); |
| 801 | |
| 802 | // draw all proxy objects |
| 803 | for (int i = 0; i < sShape->NProxies(); i++) |
| 804 | { |
| 805 | const ProxyObject& proxy = sShape->Proxy(i); |
| 806 | |
| 807 | // smart clipping par of obj->Draw |
| 808 | Matrix4Val pTransform = transform * proxy.obj->Transform(); |
| 809 | Matrix4Val invPTransform = proxy.invTransform * invTransform; |
| 810 | |
| 811 | // LOD detection |
| 812 | LODShapeWithShadow* pshape = proxy.obj->GetShapeOnPos(pTransform.Position()); |
| 813 | if (!pshape) |
| 814 | { |
| 815 | continue; |
| 816 | } |
| 817 | int level = GScene->LevelFromDistance2(pshape, dist2, pTransform.Scale(), pTransform.Direction(), |
| 818 | GScene->GetCamera()->Direction()); |
| 819 | if (level == LOD_INVISIBLE) |
| 820 | { |
| 821 | continue; |
| 822 | } |
| 823 | |
| 824 | FrameWithInverse pFrame(pTransform, invPTransform); |
| 825 | |
| 826 | // construct FrameWithInverse from transform and invTransform |
| 827 | |
| 828 | proxy.obj->Draw(level, ClipAll, pFrame); |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | // pos is used mainly for proper proxy object positioning. This is the main function |
| 833 | // used for object rendering. Default implementation performs Object::Animate before and |
nothing calls this directly
no test coverage detected