44 \tw\t--- wireframe mode\n\
45 \te\t--- hidden line mode\n\
46 \tr\t--- hidden surface mode\n\
47 \tu\t--- move object down\n\
48 \ti\t--- move object up\n\
49 \to\t--- toggle controls style\n\
50 \ts\t--- toggle stereo display\n\
51 \td\t--- toggle blue stereo view\n\
52 \tf\t--- toggle double buffer\n\
53 \th\t--- move object right\n\
54 \tj\t--- move object forward\n\
55 \tk\t--- move object backward\n\
56 \tl\t--- move object left\n\
57 \tx a\t--- rotate about x\n\
58 \ty b\t--- rotate about y\n\
59 \tz c\t--- rotate about z\n\
60 \t1 2 3\t--- autorotate about x\n\
61 \t4 5 6\t--- autorotate about y\n\
62 \t7 8 9\t--- autorotate about z\n\
63 \t[ ] { }\t--- adjust focus\n\n\
64 HOLD the left mouse button and MOVE mouse to ROTATE object\n\n\
114 return fViewer->HandleContainerButton(ev); }
236 fPad->ReleaseViewer3D();
302 fMainFrame->SetClassHints(
"X3DViewer",
"X3DViewer");
324 Error(
"InitX3DWindow",
"view is not set");
330 Float_t longitude_rad = ( 90 + view->GetLongitude()) *
kPI/180.0;
331 Float_t latitude_rad = (-90 + view->GetLatitude() ) *
kPI/180.0;
332 Float_t psi_rad = ( view->GetPsi() ) *
kPI/180.0;
376 Error(
"InitX3DWindow",
"x3d buffer allocation failure");
390 "X3D Viewer",
"Cannot display this content in the X3D viewer",
408 else if (addChildren) {
409 *addChildren =
kTRUE;
446 delete [] x3dBuff->
points;
496 x3dBuff->
polys =
nullptr;
502 for (
UInt_t k = 0; k < 2; k++) {
506 buffer.
fPnts[3*i+
n] * (1 + (j ==
n ? delta : 0));
514 x3dBuff->
segs[3*i+1] = 2*i;
515 x3dBuff->
segs[3*i+2] = 2*i+1;
519 delete [] x3dBuff->
points;
520 delete [] x3dBuff->
segs;
Handle_t Window_t
Window handle.
Handle_t Display_t
Display handle.
ULongptr_t Handle_t
Generic resource handle.
R__EXTERN const char gHelpAbout[]
bool Bool_t
Boolean (0=false, 1=true) (bool).
int Int_t
Signed integer 4 bytes (int).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
float Float_t
Float 4 bytes (float).
double Double_t
Double 8 bytes.
const char Option_t
Option string (const char).
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
const char gHelpX3DViewer[]
void x3d_set_display(Display_t display)
Window_t x3d_main(Float_t *longitude, Float_t *latitude, Float_t *psi, Option_t *option, Window_t parent)
int x3d_exec_command(int px, int py, char command)
void x3d_get_position(Float_t *longitude, Float_t *latitude, Float_t *psi)
int x3d_dispatch_event(Handle_t event)
struct _x3d_data_ X3DBuffer
void FillX3DBuffer(X3DBuffer *buff)
Generic 3D primitive description class.
Bool_t SectionsValid(UInt_t mask) const
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
This class describes layout hints used by the layout classes.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
A TRootHelpDialog is used to display help text (or any text in a dialog window).
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void Popup()
Show help dialog.
void Update()
Update X3D viewer.
void Close()
Close X3D Viewer.
TGLayoutHints * fCanvasLayout
friend class TX3DContainer
void InitX3DWindow()
Setup geometry and initialize X3D.
TGLayoutHints * fMenuBarHelpLayout
~TViewerX3D() override
Delete ROOT X3D viewer.
Bool_t HandleContainerButton(Event_t *ev)
After button release get current position and update associated pad.
TX3DContainer * fContainer
void GetPosition(Float_t &longitude, Float_t &latitude, Float_t &psi)
Get position.
void CreateViewer(const char *name)
Create the actual canvas.
void EndScene() override
The x3d viewer cannot rebuild a scene once created.
void BeginScene() override
The x3d viewer cannot rebuild a scene once created.
void DeleteX3DWindow()
Close X3D window.
TGLayoutHints * fMenuBarItemLayout
Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=nullptr) override
The x3d viewer cannot rebuild a scene once created.
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other command generated by the user.
TGLayoutHints * fMenuBarLayout
TViewerX3D(TVirtualPad *pad)
Create ROOT X3D viewer.
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...
void PaintPolyMarker(const TBuffer3D &buffer) const
Paint 3D PolyMarker.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Abstract 3D shapes viewer.
Bool_t HandleExpose(Event_t *) override
Bool_t HandleConfigureNotify(Event_t *ev) override
This event is generated when the frame is resized.
TX3DContainer(TViewerX3D *c, Window_t id, const TGWindow *parent)
Create a canvas container.
Bool_t HandleColormapChange(Event_t *) override
Bool_t HandleButton(Event_t *ev) override
Bool_t HandleMotion(Event_t *) override
Bool_t HandleKey(Event_t *) override