| 205 | } |
| 206 | |
| 207 | U32 OptimizedPolyList::insertMaterial(BaseMatInstance* baseMat) |
| 208 | { |
| 209 | S32 retIdx = -1; |
| 210 | |
| 211 | if ( !baseMat ) |
| 212 | return retIdx; |
| 213 | |
| 214 | Material* mat = dynamic_cast<Material*>(baseMat->getMaterial()); |
| 215 | |
| 216 | for (U32 i = 0; i < mMaterialList.size(); i++) |
| 217 | { |
| 218 | Material* testMat = dynamic_cast<Material*>(mMaterialList[i]->getMaterial()); |
| 219 | |
| 220 | if (mat && testMat) |
| 221 | { |
| 222 | if (testMat == mat) |
| 223 | { |
| 224 | retIdx = i; |
| 225 | break; |
| 226 | } |
| 227 | } |
| 228 | else if (mMaterialList[i] == baseMat) |
| 229 | { |
| 230 | retIdx = i; |
| 231 | break; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | if (retIdx == -1) |
| 236 | { |
| 237 | retIdx = mMaterialList.size(); |
| 238 | mMaterialList.push_back(baseMat); |
| 239 | } |
| 240 | |
| 241 | return (U32)retIdx; |
| 242 | } |
| 243 | |
| 244 | U32 OptimizedPolyList::insertVertex(const Point3F& point, const Point3F& normal, |
| 245 | const Point2F& uv0, const Point2F& uv1) |
nothing calls this directly
no test coverage detected