| 11 | { |
| 12 | |
| 13 | void Viewport::recursiveDraw( const Object& obj, DepthFunction depthFunc, const AffineXf3f& rootXf, RenderModelPassMask renderType, const TransparencyMode& transparentMode, int* numDraws ) const |
| 14 | { |
| 15 | if ( !obj.isVisible( id ) ) |
| 16 | return; |
| 17 | auto xfCopy = rootXf * obj.xf( id ); |
| 18 | auto visObj = obj.asType<VisualObject>(); |
| 19 | if ( visObj ) |
| 20 | { |
| 21 | if ( draw( *visObj, xfCopy, DepthFunction::Default, renderType, transparentMode ) ) |
| 22 | { |
| 23 | if ( numDraws ) |
| 24 | ++( *numDraws ); |
| 25 | } |
| 26 | } |
| 27 | for ( const auto& child : obj.children() ) |
| 28 | recursiveDraw( *child, depthFunc, xfCopy, renderType, transparentMode, numDraws ); |
| 29 | } |
| 30 | |
| 31 | bool Viewport::draw( const VisualObject& obj, DepthFunction depthFunc, RenderModelPassMask pass, const TransparencyMode& transparentMode ) const |
| 32 | { |