| 272 | } |
| 273 | |
| 274 | void Forest::getLocalWindTrees( const Point3F &camPos, F32 radius, Vector<TreePlacementInfo> *placementInfo ) |
| 275 | { |
| 276 | PROFILE_SCOPE( Forest_getLocalWindTrees ); |
| 277 | |
| 278 | Vector<ForestItem> items; |
| 279 | items.reserve( placementInfo->capacity() ); |
| 280 | mData->getItems( camPos, radius, &items ); |
| 281 | |
| 282 | TreePlacementInfo treeInfo; |
| 283 | dMemset( &treeInfo, 0, sizeof ( TreePlacementInfo ) ); |
| 284 | |
| 285 | // Reserve some space in the output. |
| 286 | placementInfo->reserve( items.size() ); |
| 287 | |
| 288 | // Build an info struct for each returned item. |
| 289 | Vector<ForestItem>::const_iterator iter = items.begin(); |
| 290 | for ( ; iter != items.end(); iter++ ) |
| 291 | { |
| 292 | // Skip over any zero wind elements here and |
| 293 | // just keep them out of the final list. |
| 294 | treeInfo.dataBlock = iter->getData(); |
| 295 | if ( treeInfo.dataBlock->mWindScale < 0.001f ) |
| 296 | continue; |
| 297 | |
| 298 | treeInfo.pos = iter->getPosition(); |
| 299 | treeInfo.scale = iter->getScale(); |
| 300 | treeInfo.itemKey = iter->getKey(); |
| 301 | placementInfo->push_back( treeInfo ); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | void Forest::applyRadialImpulse( const Point3F &origin, F32 radius, F32 magnitude ) |
| 306 | { |
nothing calls this directly
no test coverage detected