MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / recursiveDraw

Method recursiveDraw

source/MRViewer/MRViewportDraw.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13void 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
31bool Viewport::draw( const VisualObject& obj, DepthFunction depthFunc, RenderModelPassMask pass, const TransparencyMode& transparentMode ) const
32{

Callers 2

drawSceneMethod · 0.80
doPassesMethod · 0.80

Calls 2

isVisibleMethod · 0.80
xfMethod · 0.45

Tested by

no test coverage detected