class TViewerX3D: public TVirtualViewer3D


TViewerX3D

C++ interface to the X3D viewer


Function Members (Methods)

public:
TViewerX3D(TVirtualPad* pad)
TViewerX3D(const TViewerX3D&)
TViewerX3D(TVirtualPad* pad, Option_t* option, const char* title = "X3D Viewer", UInt_t width = 800, UInt_t height = 600)
TViewerX3D(TVirtualPad* pad, Option_t* option, const char* title, Int_t x, Int_t y, UInt_t width, UInt_t height)
virtual~TViewerX3D()
voidTObject::AbstractMethod(const char* method) const
virtual voidAddCompositeOp(UInt_t)
virtual Int_tAddObject(const TBuffer3D& buffer, Bool_t* addChildren = 0)
virtual Int_tAddObject(UInt_t placedID, const TBuffer3D& buffer, Bool_t* addChildren = 0)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidBeginScene()
virtual voidTObject::Browse(TBrowser* b)
virtual Bool_tBuildingScene() const
virtual Bool_tTVirtualViewer3D::CanLoopOnPrimitives() const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidClose()
virtual voidCloseComposite()
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTVirtualViewer3D::DrawViewer()
virtual voidTObject::Dump() constMENU
virtual voidEndScene()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Int_tExecCommand(Int_t px, Int_t py, char command)
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
voidGetPosition(Float_t& longitude, Float_t& latitude, Float_t& psi)
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
voidIconify()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
virtual voidTVirtualViewer3D::ObjectPaint(TObject*, Option_t* = "")
virtual Bool_tOpenComposite(const TBuffer3D&, Bool_t* = 0)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TViewerX3D&operator=(const TViewerX3D&)
virtual voidTVirtualViewer3D::PadPaint(TVirtualPad*)
virtual voidTObject::Paint(Option_t* option = "")
voidPaintPolyMarker(const TBuffer3D& buffer) const
virtual voidTObject::Pop()
virtual Bool_tPreferLocalFrame() const
virtual voidTObject::Print(Option_t* option = "") const
virtual voidTVirtualViewer3D::PrintObjects()
Bool_tProcessFrameMessage(Long_t msg, Long_t parm1, Long_t parm2)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTVirtualViewer3D::ResetCameras()
virtual voidTVirtualViewer3D::ResetCamerasAfterNextUpdate()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual TObject*TVirtualViewer3D::SelectObject(Int_t, Int_t)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidShow()
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
voidUpdate()
virtual voidTObject::UseCurrentStyle()
static TVirtualViewer3D*TVirtualViewer3D::Viewer3D(TVirtualPad* pad = 0, Option_t* type = "")
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidCreateViewer(const char* name)
voidDeleteX3DWindow()
Bool_tHandleContainerButton(Event_t* ev)
voidInitX3DWindow()

Data Members

public:
enum EPass { kSize
kDraw
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
Bool_tfBuildingSceneRebuilding 3D scene
TGCanvas*fCanvascanvas widget
TGLayoutHints*fCanvasLayoutlayout for canvas widget
TX3DContainer*fContainercontainer containing X3D window
TGPopupMenu*fFileMenufile menu
UInt_tfHeightviewer height
TGPopupMenu*fHelpMenuhelp menu
TX3DFrame*fMainFramethe main GUI frame
TGMenuBar*fMenuBarmenubar
TGLayoutHints*fMenuBarHelpLayoutlayout hint for help menu in menubar
TGLayoutHints*fMenuBarItemLayoutlayout hints for menu in menubar
TGLayoutHints*fMenuBarLayoutmenubar layout hints
TStringfOptionoption string to be passed to X3D
TVirtualPad*fPadpad we are attached to
TViewerX3D::EPassfPass
TStringfTitleviewer title
UInt_tfWidthviewer width
Window_tfX3DWinX3D window
Int_tfXPosviewer X position
Int_tfYPosviewer Y position
static Bool_tfgCreatedTViewerX3D is a singleton

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TViewerX3D(TVirtualPad *pad)
 Create ROOT X3D viewer.
TViewerX3D(TVirtualPad* pad, Option_t* option, const char* title = "X3D Viewer", UInt_t width = 800, UInt_t height = 600)
 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)
 Create ROOT X3D viewer.
~TViewerX3D()
 Delete ROOT X3D viewer.
void Close()
 Close X3D Viewer
void CreateViewer(const char* name)
 Create the actual canvas.
void InitX3DWindow()
 Setup geometry and initialize X3D.
void BeginScene()
 The x3d viewer cannot rebuild a scene once created
void EndScene()
 The x3d viewer cannot rebuild a scene once created
Int_t AddObject(const TBuffer3D& buffer, Bool_t* addChildren = 0)
 The x3d viewer cannot rebuild a scene once created
Int_t AddObject(UInt_t placedID, const TBuffer3D& buffer, Bool_t* addChildren = 0)
 We don't support placed IDs - discard
void PaintPolyMarker(const TBuffer3D& buffer) const
 Paint 3D PolyMarker
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:

{
   gSystem->Load("libX3d");
   TCanvas *c1 = new TCanvas("c1");
   TFile *f = new TFile("hsimple.root");
   TTree *ntuple = (TTree*)f->Get("ntuple");
   ntuple->SetMarkerColor(kYellow);
   ntuple->Draw("px:py:pz");
   TViewerX3D *x3d = new TViewerX3D(c1,"");
   for (Int_t i=0;i<500;i++) {
      Int_t px = i%500;
      Int_t py = (2*i)%200;
      x3d->ExecCommand(px,py,0);  //rotate
      if (i%20 >10) x3d->ExecCommand(px,py,'j'); //zoom
      if (i%20 <10) x3d->ExecCommand(px,py,'k'); //unzoom
   }
}

void GetPosition(Float_t& longitude, Float_t& latitude, Float_t& psi)
 Get position
void DeleteX3DWindow()
 Close X3D window.
void Update()
 Update X3D viewer.
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t parm2)
 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.
TViewerX3D(TVirtualPad *pad)
void Iconify()
{ }
void Show()
{ fMainFrame->MapRaised(); }
Bool_t PreferLocalFrame()
 TVirtualViewer3D interface
{ return kFALSE; }
Bool_t BuildingScene()
{ return fBuildingScene; }
Bool_t OpenComposite(const TBuffer3D& , Bool_t* = 0)
 Composite shapes not supported on this viewer currently - ignore.
 Will result in a set of component shapes
{ return kTRUE; }
void CloseComposite()
{}
void AddCompositeOp(UInt_t )
{}

Author: Rene Brun 05/09/99
Last change: root/x3d:$Id: TViewerX3D.h 20882 2007-11-19 11:31:26Z rdm $
Last generated: 2008-06-25 08:54
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.