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