223 Error(
"TGLCamera::FrustumBox()",
"cache dirty");
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rect
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Rgl::EOverlap FrustumOverlap(const TGLBoundingBox &box) const
Calculate overlap (kInside, kOutside, kPartial) of box with camera frustum Camera must have valid fru...
void WindowToViewport(TGLVertex3 &vertex) const
TGLMatrix fLastNoPickProjM
timestamp
static UInt_t fgDollyDeltaSens
TGLMatrix & RefLastNoPickProjM() const
void WindowToViewport(TGLRect &rect) const
TGLVector3 EyeDirection() const
Extract the camera eye direction (vector), running from EyePoint() Camera must have valid frustum cac...
Double_t * GetFixDefCenterVec()
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
virtual Bool_t IsPerspective() const
Double_t GetNearClip() const
TGLVertex3 FrustumCenter() const
Find the center of the camera frustum from intersection of planes This method will work even with par...
TGLCamera()
Default base camera constructor.
void ResetInterest()
Clear out the existing interest box.
virtual Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2)
Dolly the camera - 'move camera along eye line, retaining lens focal length'.
TGLBoundingBox Frustum(Bool_t asBox=kTRUE) const
expansion c.f. aligned current frustum box
const TGLRect & RefViewport() const
Double_t GetFarClip() const
virtual Bool_t RotateArcBallRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
Double_t fNearClip
current camera center
const TGLMatrix & GetCamBase() const
TGLMatrix fProjM
no-pick projection matrix (cached)
Bool_t AdjustAndClampVal(Double_t &val, Double_t min, Double_t max, Int_t screenShift, Int_t screenShiftRange, Bool_t mod1, Bool_t mod2) const
Adjust a passed REFERENCE value 'val', based on screenShift delta.
TGLVector3 ViewportDeltaToWorld(const TGLVertex3 &worldRef, Double_t viewportXDelta, Double_t viewportYDelta, TGLMatrix *modviewMat=nullptr) const
Apply a 2D viewport delta (shift) to the projection of worldRef onto viewport, returning the resultan...
virtual Bool_t Truck(Double_t xDelta, Double_t yDelta)
Truck the camera - 'move camera parallel to film plane'.
TGLCamera(const TGLCamera &)
Rgl::EOverlap ViewportOverlap(const TGLBoundingBox &box) const
Calculate overlap (kInside, kOutside, kPartial) of box projection onto viewport (as rect) against the...
TGLBoundingBox fInterestBox
viewport (GL coords - origin bottom left)
Float_t GetVAxisMinAngle()
TGLBoundingBox fInterestFrustumAsBox
frustum basis of current interest box - NOT a true BB! (DEBUG)
TGLRect ViewportRect(const TGLBoundingBox &box, TGLBoundingBox::EFace face) const
Calculate viewport rectangle which just contains projection of single 'face' of world frame bounding ...
virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Rotate the camera round view volume center established in Setup().
virtual Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)=0
void WindowToViewport(TPoint &point) const
void SetCenterVecWarp(Double_t x, Double_t y, Double_t z)
Set camera center vector and do not keep the same combined camera transformation matrix.
void SetFixDefCenterVec(Double_t x, Double_t y, Double_t z)
TGLRect fViewport
frustum planes (cached)
Double_t * GetCenterVec()
TGLVector3 WorldDeltaToViewport(const TGLVertex3 &worldRef, const TGLVector3 &worldDelta) const
Convert a 3D vector worldDelta (shift) about vertex worldRef to a viewport (screen) '3D' vector.
TGLMatrix fModVM
projection matrix (cached)
Double_t fDollyDefault
last applied far-clip
const TGLMatrix & GetCamTrans() const
void WindowToViewport(Int_t &, Int_t &y) const
~TGLCamera() override
Base camera destructor.
void SetVAxisMinAngle(Float_t x)
TGLVertex3 WorldToViewport(const TGLVertex3 &worldVertex, TGLMatrix *modviewMat=nullptr) const
Convert a 3D world vertex to '3D' viewport (screen) one.
TGLPlane fFrustumPlanes[kPlanesPerFrustum]
object space clip matrix (cached)
Bool_t IsCacheDirty() const
Double_t GetTheta() const
Get angle between camera up axis.
Bool_t GetExternalCenter()
std::pair< Bool_t, TGLVertex3 > ViewportPlaneIntersection(Double_t viewportX, Double_t viewportY, const TGLPlane &worldPlane) const
Find the intersection of projection of supplied viewport point (a 3D world line - see ViewportToWorld...
Bool_t UpdateInterest(Bool_t force)
Update the internal interest box (fInterestBox) of the camera.
void DrawDebugAids() const
Draw out some debugging aids for the camera:
virtual void Setup(const TGLBoundingBox &box, Bool_t reset=kTRUE)=0
TGLBoundingBox fInterestFrustum
previous interest box (DEBUG)
void UpdateCache() const
largest box diagonal seen in OfInterest() - used when bootstrapping interest box
TGLMatrix & RefCamTrans()
TGLMatrix fClipM
modelView matrix (cached)
UInt_t fTimeStamp
cached items dirty?
virtual void Apply(const TGLBoundingBox &sceneBox, const TGLRect *pickRect=nullptr) const =0
virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)=0
const TGLMatrix & RefModelViewMatrix() const
void SetExternalCenter(Bool_t x)
Set camera center diffrent than scene center, if enable is kTRUE.
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
Double_t fFarClip
last applied near-clip
void SetViewport(const TGLRect &viewport)
Set viewport extents from passed 'viewport' rect.
TGLBoundingBox fPreviousInterestBox
virtual Bool_t RotateArcBall(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Rotate the camera round view volume center established in Setup().
virtual void Configure(Double_t zoom, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)=0
Double_t fLargestSeen
the interest box - created in UpdateInterest()
TGLCamera & operator=(const TGLCamera &)
virtual Bool_t IsOrthographic() const
const TGLPlane & FrustumPlane(EFrustumPlane plane) const
static const Double_t fgInterestBoxExpansion
frustum basis (as box) of current interest box (DEBUG)
Bool_t OfInterest(const TGLBoundingBox &box, Bool_t ignoreSize) const
Calculate if the an object defined by world frame bounding box is 'of interest' to the camera.
TGLVertex3 EyePoint() const
Return the camera eye point (vertex) in world space Camera must have valid frustum cache - call Apply...
void SetFixDefCenter(Bool_t x)
Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, Bool_t mod1, Bool_t mod2) const
Adjust a passed screen value and apply modifiers.
TGLVertex3 ViewportToWorld(const TGLVertex3 &viewportVertex, TGLMatrix *modviewMat=nullptr) const
Convert a '3D' viewport vertex to 3D world one.
3D space, fixed length, line class, with direction / length 'vector', passing through point 'vertex'.
16 component (4x4) transform matrix - column MAJOR as per GL.
3D plane class - of format Ax + By + Cz + D = 0
Viewport (pixel base) 2D rectangle class.
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
void Set(Double_t x, Double_t y, Double_t z)
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)