| 1051 | } |
| 1052 | |
| 1053 | GroundCoverCell* GroundCover::_generateCell( const Point2I& index, |
| 1054 | const Box3F& bounds, |
| 1055 | U32 placementCount, |
| 1056 | S32 randSeed ) |
| 1057 | { |
| 1058 | PROFILE_SCOPE(GroundCover_GenerateCell); |
| 1059 | |
| 1060 | const Vector<SceneObject*> terrainBlocks = getContainer()->getTerrains(); |
| 1061 | if ( terrainBlocks.empty() ) |
| 1062 | return NULL; |
| 1063 | |
| 1064 | // Grab a free cell or allocate a new one. |
| 1065 | GroundCoverCell* cell; |
| 1066 | if ( mFreeCellList.empty() ) |
| 1067 | { |
| 1068 | cell = new GroundCoverCell(); |
| 1069 | mAllocCellList.push_back( cell ); |
| 1070 | } |
| 1071 | else |
| 1072 | { |
| 1073 | cell = mFreeCellList.last(); |
| 1074 | mFreeCellList.pop_back(); |
| 1075 | } |
| 1076 | |
| 1077 | cell->mDirty = true; |
| 1078 | cell->mIndex = index; |
| 1079 | cell->mBounds = bounds; |
| 1080 | |
| 1081 | Point3F pos( 0, 0, 0 ); |
| 1082 | |
| 1083 | Box3F renderBounds = bounds; |
| 1084 | Point3F point; |
| 1085 | Point3F normal; |
| 1086 | F32 h; |
| 1087 | Point2F cp, uv; |
| 1088 | bool hit; |
| 1089 | GroundCoverCell::Placement p; |
| 1090 | F32 rotation; |
| 1091 | F32 size; |
| 1092 | F32 sizeExponent; |
| 1093 | Point2I lpos; |
| 1094 | //F32 value; |
| 1095 | VectorF right; |
| 1096 | StringTableEntry matName = StringTable->EmptyString(); |
| 1097 | bool firstElem = true; |
| 1098 | |
| 1099 | TerrainBlock *terrainBlock = NULL; |
| 1100 | |
| 1101 | cell->mBillboards.clear(); |
| 1102 | cell->mBillboards.reserve( placementCount ); |
| 1103 | cell->mShapes.clear(); |
| 1104 | cell->mShapes.reserve( placementCount ); |
| 1105 | |
| 1106 | F32 terrainSquareSize, |
| 1107 | oneOverTerrainLength, |
| 1108 | oneOverTerrainSquareSize; |
| 1109 | const GBitmap* terrainLM = NULL; |
| 1110 |
nothing calls this directly
no test coverage detected