| 240 | } |
| 241 | |
| 242 | void PhysicsShapeData::_onResourceChanged( const Torque::Path &path ) |
| 243 | { |
| 244 | if (mShapeAsset.isNull()) |
| 245 | return; |
| 246 | |
| 247 | if ( path != Path(mShapeAsset->getShapeFilePath()) ) |
| 248 | return; |
| 249 | |
| 250 | _setShape(getShape()); |
| 251 | |
| 252 | // Reload the changed shape. |
| 253 | PhysicsCollisionRef reloadcolShape; |
| 254 | |
| 255 | if ( !mShape ) |
| 256 | { |
| 257 | Con::warnf( ConsoleLogEntry::General, "PhysicsShapeData::_onResourceChanged: Could not reload %s.", path.getFileName().c_str() ); |
| 258 | return; |
| 259 | } |
| 260 | |
| 261 | // Reload the collision shape. |
| 262 | reloadcolShape = mShape->buildColShape( false, Point3F::One ); |
| 263 | |
| 264 | if ( bool(reloadcolShape)) |
| 265 | colShape = reloadcolShape; |
| 266 | |
| 267 | mReloadSignal.trigger(); |
| 268 | } |
| 269 | |
| 270 | bool PhysicsShapeData::preload( bool server, String &errorBuffer ) |
| 271 | { |
nothing calls this directly
no test coverage detected