| 984 | } |
| 985 | |
| 986 | int Object::GetComplexity(int level, const FrameBase& pos) const |
| 987 | { |
| 988 | // preview draw with given level |
| 989 | // return number of faces |
| 990 | if (level == LOD_INVISIBLE) |
| 991 | { |
| 992 | return 0; // invisible LOD |
| 993 | } |
| 994 | LODShape* lshape = GetShapeOnPos(pos.Position()); |
| 995 | if (!lshape) |
| 996 | { |
| 997 | return 0; |
| 998 | } |
| 999 | Shape* shape = lshape->Level(level); |
| 1000 | if (!shape) |
| 1001 | { |
| 1002 | return 0; |
| 1003 | } |
| 1004 | int nFaces = shape->NFaces(); |
| 1005 | if (shape->NProxies() > 0) |
| 1006 | { |
| 1007 | float dist2 = GScene->GetCamera()->Position().Distance2(pos.Position()); |
| 1008 | nFaces += GetProxyComplexity(level, pos, dist2); |
| 1009 | } |
| 1010 | return nFaces; |
| 1011 | } |
| 1012 | |
| 1013 | void Object::DrawDecal(int forceLOD, ClipFlags clipFlags, const FrameBase& pos) |
| 1014 | { |
no test coverage detected