| 613 | } |
| 614 | |
| 615 | S32 TSShapeInstance::setDetailFromPosAndScale( const SceneRenderState *state, |
| 616 | const Point3F &pos, |
| 617 | const Point3F &scale ) |
| 618 | { |
| 619 | VectorF camVector = pos - state->getDiffuseCameraPosition(); |
| 620 | F32 dist = getMax( camVector.len(), 0.01f ); |
| 621 | F32 invScale = ( 1.0f / getMax( getMax( scale.x, scale.y ), scale.z ) ); |
| 622 | |
| 623 | return setDetailFromDistance( state, dist * invScale ); |
| 624 | } |
| 625 | |
| 626 | S32 TSShapeInstance::setDetailFromDistance( const SceneRenderState *state, F32 scaledDistance ) |
| 627 | { |
no test coverage detected