TViewerX3D


class description - source file - inheritance tree

class TViewerX3D : public TGMainFrame

    private:
void CreateViewer(const char* name) void DeleteX3DWindow() Bool_t HandleContainerButton(Event_t* ev) void InitX3DWindow() public:
TViewerX3D TViewerX3D(TVirtualPad* pad, Option_t* option, const char* title = "X3D Viewer", UInt_t width = 800, UInt_t height = 600) TViewerX3D TViewerX3D(TVirtualPad* pad, Option_t* option, const char* title, Int_t x, Int_t y, UInt_t width, UInt_t height) TViewerX3D TViewerX3D(TViewerX3D&) virtual void ~TViewerX3D() static TClass* Class() virtual void CloseWindow() Int_t ExecCommand(Int_t px, Int_t py, char command) void GetPosition(Float_t& longitude, Float_t& latitude, Float_t& psi) void Iconify() virtual TClass* IsA() const virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) void Show() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void Update()

Data Members

    private:
TVirtualPad* fPad pad that should be displayed in X3D TString fOption option string to be passed to X3D Window_t fX3DWin X3D window TGCanvas* fCanvas canvas widget TX3DContainer* fContainer container containing X3D window TGMenuBar* fMenuBar menubar TGPopupMenu* fFileMenu file menu TGPopupMenu* fHelpMenu help menu TGLayoutHints* fMenuBarLayout menubar layout hints TGLayoutHints* fMenuBarItemLayout layout hints for menu in menubar TGLayoutHints* fMenuBarHelpLayout layout hint for help menu in menubar TGLayoutHints* fCanvasLayout layout for canvas widget static Bool_t fgActive TViewerX3D is a singleton

Class Description

                                                                      
 TViewerX3D                                                           
                                                                      
 C++ interface to the X3D viewer                                      
                                                                      


TViewerX3D(TVirtualPad *pad, Option_t *option, const char *title, UInt_t width, UInt_t height) : TGMainFrame(gClient->GetRoot(), width, height)
 Create ROOT X3D viewer.

TViewerX3D(TVirtualPad *pad, Option_t *option, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height) : TGMainFrame(gClient->GetRoot(), width, height)
 Create ROOT X3D viewer.

~TViewerX3D()
 Delete ROOT X3D viewer.

void CreateViewer(const char *name)
 Create the actual canvas.

Int_t ExecCommand(Int_t px, Int_t py, char command)
 This function may be called from a script to animate an X3D picture
 px, py  mouse position
command = 0       --- move to px,py
        = w       --- wireframe mode
        = e       --- hidden line mode
        = r       --- hidden surface mode
        = u       --- move object down
        = i       --- move object up
        = o       --- toggle controls style
        = s       --- toggle stereo display
        = d       --- toggle blue stereo view
        = f       --- toggle double buffer
        = h       --- move object right
        = j       --- move object forward
        = k       --- move object backward
        = l       --- move object left
        = x a     --- rotate about x
        = y b     --- rotate about y
        = z c     --- rotate about z
        = 1 2 3   --- autorotate about x
        = 4 5 6   --- autorotate about y
        = 7 8 9   --- autorotate about z
        = [ ] { } --- adjust focus
 Example:

void GetPosition(Float_t &longitude, Float_t &latitude, Float_t &psi)

void InitX3DWindow()
 Setup geometry and initialize X3D.

void DeleteX3DWindow()
 Close X3D window.

void CloseWindow()
 In case window is closed via WM we get here.

void Update()
 Update X3D viewer.

Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
 Handle menu and other command generated by the user.

Bool_t HandleContainerButton(Event_t *ev)
 After button release get current position and update associated pad.



Inline Functions


               void Iconify()
               void Show()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         TViewerX3D TViewerX3D(TViewerX3D&)


Author: Rene Brun 05/09/99
Last update: root/x3d:$Name: $:$Id: TViewerX3D.cxx,v 1.6 2002/01/16 13:53:53 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.