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