library: libX3d
#include "TViewerX3D.h"

TViewerX3D


class description - header file - source file
viewCVS header - viewCVS source

class TViewerX3D: public TVirtualViewer3D

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
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
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 = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTVirtualViewer3D::DoDraw()
virtual Bool_tTVirtualViewer3D::DoSelect(const TGLRect&)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTVirtualViewer3D::DrawViewer()
virtual voidTObject::Dump() const
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() const
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 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 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 = "") const
virtual voidTObject::SavePrimitive(ostream& 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 = "")
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:
TX3DFrame*fMainFramethe main GUI frame
TStringfOptionoption string to be passed to X3D
TStringfTitleviewer title
Window_tfX3DWinX3D window
TGCanvas*fCanvascanvas widget
TX3DContainer*fContainercontainer containing X3D window
TGMenuBar*fMenuBarmenubar
TGPopupMenu*fFileMenufile menu
TGPopupMenu*fHelpMenuhelp menu
TGLayoutHints*fMenuBarLayoutmenubar layout hints
TGLayoutHints*fMenuBarItemLayoutlayout hints for menu in menubar
TGLayoutHints*fMenuBarHelpLayoutlayout hint for help menu in menubar
TGLayoutHints*fCanvasLayoutlayout for canvas widget
UInt_tfWidthviewer width
UInt_tfHeightviewer height
Int_tfXPosviewer X position
Int_tfYPosviewer Y position
TVirtualPad*fPadpad we are attached to
Bool_tfBuildingSceneRebuilding 3D scene
TViewerX3D::EPassfPass
static Bool_tfgCreatedTViewerX3D is a singleton

Class Description

                                                                      
 TViewerX3D                                                           
                                                                      
 C++ interface to the X3D viewer                                      
                                                                      

TViewerX3D(TVirtualPad *pad)
 Create ROOT X3D viewer.
TViewerX3D(TVirtualPad *pad, Option_t *option, const char *title, UInt_t width, UInt_t 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)
 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)
 The x3d viewer cannot rebuild a scene once created
Int_t AddObject(UInt_t /* placedID */, const TBuffer3D & buffer, Bool_t * addChildren)
 We don't support placed IDs - discard
void PaintPolyMarker(const TBuffer3D & buffer)
 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)
 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 & /*buffer*/, 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 /*operation*/)
{}

Author: Rene Brun 05/09/99
Last update: root/x3d:$Name: $:$Id: TViewerX3D.cxx,v 1.19 2006/05/26 15:13:03 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - 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.