ssMultibeamRenderModule.h

Go to the documentation of this file.
00001 /* $Id: ssMultibeamRenderModule.h,v 1.7 2005/12/29 10:16:50 pfb Exp $ */
00002 
00003 /*=========================================================================
00004 
00005   Program:   ParaView
00006   Module:    $RCSfile: ssMultibeamRenderModule.h,v $
00007   Language:  C++
00008   Date:      $Date: 2005/12/29 10:16:50 $
00009   Version:   $Revision: 1.7 $
00010 
00011 Copyright (c) 2000-2001 Kitware Inc. 469 Clifton Corporate Parkway,
00012 Clifton Park, NY, 12065, USA.
00013 All rights reserved.
00014 
00015 Redistribution and use in source and binary forms, with or without
00016 modification, are permitted provided that the following conditions are met:
00017 
00018  * Redistributions of source code must retain the above copyright notice,
00019    this list of conditions and the following disclaimer.
00020 
00021  * Redistributions in binary form must reproduce the above copyright notice,
00022    this list of conditions and the following disclaimer in the documentation
00023    and/or other materials provided with the distribution.
00024 
00025  * Neither the name of Kitware nor the names of any contributors may be used
00026    to endorse or promote products derived from this software without specific 
00027    prior written permission.
00028 
00029  * Modified source versions must be plainly marked as such, and must not be
00030    misrepresented as being the original software.
00031 
00032 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00033 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00034 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00035 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00036 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00037 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00038 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00039 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00040 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00041 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00042 
00043 =========================================================================*/
00044 
00045 /*=========================================================================
00046 This module copied from ParaView's V1.0 vtkPVRenderView and modified as
00047 appropiate.
00048 =========================================================================*/
00049 
00054 #ifndef _ssMultibeamRenderModule_h
00055 #define _ssMultibeamRenderModule_h
00056 
00061 #include "vtkObject.h"
00062 
00063 class ssMultibeamApplication;
00064 class ssMultibeamWindow;
00065 class vtkMultiProcessController;
00066 class vtkPVData;
00067 class vtkPVSource;
00068 class vtkPVSourceList;
00069 class vtkRenderer;
00070 class vtkRenderWindow;
00071 class vtkCollection;
00072 class vtkPVPartDisplay;
00073 
00074 class VTK_EXPORT ssMultibeamRenderModule : public vtkObject
00075   {
00076   //****************************************************************************
00077                              public:
00078 
00084   static ssMultibeamRenderModule* New();
00085 
00086 //BTX
00090 //  vtkTypeMacro(ssMultibeamRenderModule, vtkObject);
00091   vtkTypeRevisionMacro(ssMultibeamRenderModule, vtkObject);
00092 //ETX
00093 
00099   void PrintSelf(ostream& os, vtkIndent indent);
00100 
00105   virtual void Application(ssMultibeamApplication *app);
00106 
00111   ssMultibeamApplication *Application() const;
00112 
00118   void ComputeVisiblePropBounds(double bounds[6]); 
00119   
00123   void AddPVSource(vtkPVSource *pvs);
00124   void RemovePVSource(vtkPVSource *pvs);
00125   
00129   virtual void StillRender();
00130 
00134   virtual void InteractiveRender();
00135 
00136   // Are we currently in interactive mode?
00137   //int IsInteractive() { return this->Interactive; }
00138   
00143   vtkRenderer *GetRenderer();
00144 
00149   vtkRenderer *GetPlanRenderer() const;
00150 
00155   vtkRenderer *GetAcrossRenderer() const;
00156 
00161   vtkRenderer *GetAlongRenderer() const;
00162 
00167   vtkRenderWindow *GetPlanRenderWindow() const;
00168 
00173   vtkRenderWindow *GetAcrossRenderWindow() const;
00174 
00179   vtkRenderWindow *GetAlongRenderWindow() const;
00180 
00181   //const char *GetRenderWindowTclName() {return this->RenderWindowTclName;}
00182 
00189   void SetBackgroundColor(float r, float g, float b);
00190 
00195   virtual void SetBackgroundColor(float *c) {this->SetBackgroundColor(c[0],c[1],c[2]);}
00196 
00203   vtkGetStringMacro(PlanRendererTclName);
00204 
00211   vtkGetStringMacro(AcrossRendererTclName);
00212 
00219   vtkGetStringMacro(AlongRendererTclName);
00220 
00227   vtkGetStringMacro(PlanRenderWindowTclName);
00228 
00235   vtkGetStringMacro(AcrossRenderWindowTclName);
00236 
00243   vtkGetStringMacro(AlongRenderWindowTclName);
00244 
00249   void SetUseTriangleStrips(int val);
00250   
00255   void SetUseImmediateMode(int val);
00256     
00262   void SetUseParallelProjection(int val);
00263 
00268   vtkSetMacro(RenderInterruptsEnabled, int);
00269 
00274   vtkGetMacro(RenderInterruptsEnabled, int);
00275 
00276   vtkBooleanMacro(RenderInterruptsEnabled, int);
00277 
00283   virtual float GetZBufferValue(int x, int y);
00284 
00295   vtkSetMacro(TotalVisibleMemorySizeValid, int);
00296 
00307   vtkGetMacro(TotalVisibleMemorySizeValid, int);
00308 
00309 //******************************************************************************
00310                              protected:
00311 
00312   ssMultibeamRenderModule();
00313   ~ssMultibeamRenderModule();
00314 
00319   virtual void UpdateAllPVData();
00320  
00321   ssMultibeamApplication *application;
00322   vtkRenderer*      PlanRenderer;
00323   vtkRenderer*      AcrossRenderer;
00324   vtkRenderer*      AlongRenderer;
00325   vtkRenderWindow*  PlanRenderWindow;
00326   vtkRenderWindow*  AcrossRenderWindow;
00327   vtkRenderWindow*  AlongRenderWindow;
00328 
00329   //int Interactive;
00330   int TotalVisibleMemorySizeValid;
00331   
00332   char *PlanRendererTclName;
00333   char *AcrossRendererTclName;
00334   char *AlongRendererTclName;
00335   vtkSetStringMacro(PlanRendererTclName);  
00336   vtkSetStringMacro(AcrossRendererTclName);
00337   vtkSetStringMacro(AlongRendererTclName);
00338    
00339   char *PlanRenderWindowTclName;
00340   char *AcrossRenderWindowTclName;
00341   char *AlongRenderWindowTclName;
00342 
00347   vtkSetStringMacro(PlanRenderWindowTclName);
00348 
00353   vtkSetStringMacro(AcrossRenderWindowTclName);
00354 
00359   vtkSetStringMacro(AlongRenderWindowTclName);
00360     
00361   double StillRenderTime;
00362   double InteractiveRenderTime;
00363 
00364   int DisableRenderingFlag;
00365   int RenderInterruptsEnabled;
00366 
00367   unsigned long ResetCameraClippingRangeTag;
00368 
00369 //******************************************************************************
00370                              private:
00371 
00372   ssMultibeamRenderModule(const ssMultibeamRenderModule&); // Not implemented
00373   void operator=(const ssMultibeamRenderModule&); // Not implemented
00374 };
00375 
00376 /*
00377  * $Log: ssMultibeamRenderModule.h,v $
00378  * Revision 1.7  2005/12/29 10:16:50  pfb
00379  * Changes made in upgrade to ParaView 2.2.1, VTK 4.5.0
00380  *
00381  * Revision 1.6  2005/05/10 17:08:00  pfb
00382  * Added module info.
00383  *
00384  * Revision 1.5  2004/06/24 08:45:56  pfb
00385  * Added Plan, Across and Along Renderers.
00386  *
00387  * Revision 1.4  2004/04/27 12:13:23  pfb
00388  * Added Plan, Across and Along Render Windows.
00389  *
00390  * Revision 1.3  2004/03/29 09:10:03  pfb
00391  * Worked over comments.
00392  *
00393  * Revision 1.2  2004/02/15 16:15:13  pfb
00394  * Moved from MultibeamRenderModule to ssMultibeamRenderModule.
00395  *
00396  * Revision 1.1  2004/02/03 10:57:53  pfb
00397  * Initial rev.
00398  *
00399  *
00400  */
00401 
00405 #endif