File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
Sources/Rendering/Core/RenderWindow Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -61,20 +61,24 @@ function vtkRenderWindow(publicAPI, model) {
6161 } ;
6262
6363 publicAPI . getStatistics = ( ) => {
64- const results = { propCount : 0 } ;
64+ const results = { propCount : 0 , invisiblePropCount : 0 } ;
6565 model . renderers . forEach ( ( ren ) => {
6666 const props = ren . getViewProps ( ) ;
6767 props . forEach ( ( prop ) => {
68- results . propCount += 1 ;
69- const mpr = prop . getMapper ( ) ;
70- if ( mpr && mpr . getPrimativeCount ) {
71- const pcount = mpr . getPrimativeCount ( ) ;
72- Object . keys ( pcount ) . forEach ( ( keyName ) => {
73- if ( ! results [ keyName ] ) {
74- results [ keyName ] = 0 ;
75- }
76- results [ keyName ] += pcount [ keyName ] ;
77- } ) ;
68+ if ( prop . getVisibility ( ) ) {
69+ results . propCount += 1 ;
70+ const mpr = prop . getMapper ( ) ;
71+ if ( mpr && mpr . getPrimativeCount ) {
72+ const pcount = mpr . getPrimativeCount ( ) ;
73+ Object . keys ( pcount ) . forEach ( ( keyName ) => {
74+ if ( ! results [ keyName ] ) {
75+ results [ keyName ] = 0 ;
76+ }
77+ results [ keyName ] += pcount [ keyName ] ;
78+ } ) ;
79+ }
80+ } else {
81+ results . invisiblePropCount += 1 ;
7882 }
7983 } ) ;
8084 } ) ;
You can’t perform that action at this time.
0 commit comments