File tree Expand file tree Collapse file tree 4 files changed +36
-4
lines changed
Interaction/UI/FPSMonitor Expand file tree Collapse file tree 4 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ function vtkFPSMonitor(publicAPI, model) {
6262 function updateInformations ( ) {
6363 const infoItems = [ ] ;
6464 if ( model . renderWindow ) {
65+ const realView = model . renderWindow . getViews ( ) [ 0 ] ;
66+ if ( realView && realView . getSize ) {
67+ infoItems . push (
68+ `<label class="${ style . label } ">Resolution</label><span class="${
69+ style . value
70+ } ">${ realView . getSize ( ) . join ( 'x' ) } </span>`
71+ ) ;
72+ }
73+
6574 const stats = model . renderWindow . getStatistics ( ) ;
6675 const keys = Object . keys ( stats ) ;
6776 keys . sort ( ) ;
Original file line number Diff line number Diff line change @@ -264,6 +264,32 @@ function vtkGlyph3DMapper(publicAPI, model) {
264264 model . buildTime . modified ( ) ;
265265 }
266266 } ;
267+
268+ publicAPI . getPrimativeCount = ( ) => {
269+ const glyph = publicAPI . getInputData ( 1 ) ;
270+ const mult =
271+ publicAPI
272+ . getInputData ( )
273+ . getPoints ( )
274+ . getNumberOfValues ( ) / 3 ;
275+
276+ const pcount = {
277+ points : mult * glyph . getPoints ( ) . getNumberOfValues ( ) / 3 ,
278+ verts :
279+ mult *
280+ ( glyph . getVerts ( ) . getNumberOfValues ( ) -
281+ glyph . getVerts ( ) . getNumberOfCells ( ) ) ,
282+ lines :
283+ mult *
284+ ( glyph . getLines ( ) . getNumberOfValues ( ) -
285+ 2 * glyph . getLines ( ) . getNumberOfCells ( ) ) ,
286+ triangles :
287+ mult *
288+ ( glyph . getPolys ( ) . getNumberOfValues ( ) -
289+ 3 * glyph . getLines ( ) . getNumberOfCells ( ) ) ,
290+ } ;
291+ return pcount ;
292+ } ;
267293}
268294
269295// ----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -504,7 +504,7 @@ function vtkMapper(publicAPI, model) {
504504 publicAPI . getPrimativeCount = ( ) => {
505505 const input = publicAPI . getInputData ( ) ;
506506 const pcount = {
507- points : input . getPoints ( ) . getNumberOfValues ( ) ,
507+ points : input . getPoints ( ) . getNumberOfValues ( ) / 3 ,
508508 verts :
509509 input . getVerts ( ) . getNumberOfValues ( ) -
510510 input . getVerts ( ) . getNumberOfCells ( ) ,
Original file line number Diff line number Diff line change @@ -82,9 +82,6 @@ function vtkRenderWindow(publicAPI, model) {
8282 . map ( ( keyName ) => `${ keyName } : ${ results [ keyName ] } ` )
8383 . join ( '\n' ) ;
8484
85- if ( results . points ) {
86- results . points /= 3 ;
87- }
8885 return results ;
8986 } ;
9087
You can’t perform that action at this time.
0 commit comments