See mouse coordinates paint3d4/9/2023 ![]() ![]() Define the center Double_t center,pointNDC,size,oldSize GVirtualX-> SetDrawMode( TVirtualX::kCopy) // set drawing mode back to normal (copy) modeĭouble_t min,max,viewCenter,viewCenterNDC įor (i =0 iWCtoNDC(viewCenter,viewCenterNDC) gPad->GetCanvas()->FeedbackMode(kFALSE) GVirtualX-> DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow) If (linedrawn) gVirtualX-> DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow) GPad-> TAttLine::Modify() //Change line attributes only if necessary Execute action corresponding to the mouse event If ( fSelected) fSelected-> ExecuteEvent(event,px,py) _ void TAxis3D::ExecuteEvent( Int_t event, Int_t px, Int_t py) The "Zoom" deactivates itself just the user release the // // To change attributes of the rulers attached to the current Pad, one may // query its pointer first: // // TAxis3D *axis = TAxis3D::GetPadAxis() // Ask axis pointer // if (axis) // TAxis3D rulers // rulers.Draw() // // One can use a static method to create ruler and attach it to the current gPad // // TAxis3D::ToggleRulers() // Brings the 3D axice up // TAxis3D::ToggleRulers() // next calls remove the rulers from the TPad etc // // To activate Zoomer one may call // // TAxis3D::ToggleZoom() // // each time one needs move or zoom the image. // To add the 3D rulers to any 3D view one has to create // an instance of this class and Draw it. With Zoom mode on the user can access // TAxis3D context menu and set /change the attributes of axice all together // or separately. ExecuteEvent() method does provide zooming and moving a projection // 3D object within TPad client area. _ // The 3D axis painter class // = // // This class provide up to 3 axice to any 3D ROOT plot and // "ZOOM" service. It is provided "as is" without express or implied warranty. Brookhaven National Laboratory makes no // * representations about the suitability of this software for any // * purpose. * // * Permission to use, copy, modify and distribute this software and its // * documentation for any purpose is hereby granted without fee, // * provided that the above copyright notice appear in all copies and // * that both that copyright notice and this permission notice appear // * in supporting documentation. ![]() ![]() TAxis3D - source file // $:$Id: TAxis3D.cxx,v 1.10 4 16:20:14 brun Exp $ // Author: Valery // *********************************************************************** // * C++ class library to paint 3D axice "arround" TView object // and zoom 3D objects as well // * Copyright(c) 1997~1999 Brookhaven National Laboratory, STAR, All rights reserved // * Author Valeri Fine // * Copyright(c) 1997~1999 Valeri Fine // * // * This program is distributed in the hope that it will be useful, // * but WITHOUT ANY WARRANTY without even the implied warranty of // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |