15#ifndef vtkPVOpenVROverlayInternal_h
16#define vtkPVOpenVROverlayInternal_h
40 if (fabs(in.
Dot(normal)) > 0.999)
42 if (fabs(normal[0]) < 0.1)
44 result.
Set(1.0, 0.0, 0.0);
48 result.
Set(0.0, 1.0, 0.0);
53 result = in - (in.
Dot(normal)) * normal;
113 double theta = acos(svdir.
Dot(cvdir));
114 if (nvup.
Dot(cvdir.
Cross(svdir)) < 0.0)
119 nivdir = civdir * cos(theta) - civright * sin(theta);
127 cppwc = cpos + ctrans;
128 double x = cppwc.
Dot(civdir) / cdistance;
129 double y = cppwc.
Dot(civright) / cdistance;
131 ntrans = strans * nvup + nivdir * (x * sdistance - spos.
Dot(nivdir)) +
132 nivright * (y * sdistance - spos.
Dot(nivright));
140 nfp = cpos + nivdir * sdistance;
146 cam->SetTranslation(this->Translation);
149 this->FocalPoint[0] - this->PhysicalViewDirection[0]*this->Distance,
150 this->FocalPoint[1] - this->PhysicalViewDirection[1]*this->Distance,
151 this->FocalPoint[2] - this->PhysicalViewDirection[2]*this->Distance);
193 this->xmin = in.
xmin;
194 this->xmax = in.
xmax;
195 this->ymin = in.
ymin;
196 this->ymax = in.
ymax;
200 this->Group = in.
Group;
virtual double * GetDirectionOfProjection()
Get the vector in the direction from the camera position to the focal point.
virtual double * GetPosition()
Set/Get the position of the camera in world coordinates.
void SetPosition(double x, double y, double z)
Set/Get the position of the camera in world coordinates.
void SetFocalPoint(double x, double y, double z)
Set/Get the focal of the camera in world coordinates.
superclass for callback/observer methods
extends interaction to support 3D input
virtual double GetDollyPhysicalSpeed()
Set/Get the maximum dolly speed used when flying in 3D, in meters per second.
virtual void SetDollyPhysicalSpeed(double)
Set/Get the maximum dolly speed used when flying in 3D, in meters per second.
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
virtual void Delete()
Delete a VTK object.
void Set(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
vtkVector3d SanitizeVector(vtkVector3d &in, vtkVector3d &normal)
double PhysicalViewDirection[3]
void Apply(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
vtkOpenVROverlaySpot & operator=(const vtkOpenVROverlaySpot &)=delete
vtkOpenVROverlaySpot(int x1, int x2, int y1, int y2, vtkCommand *cb)
vtkOpenVROverlaySpot(const vtkOpenVROverlaySpot &in)
virtual vtkInteractorObserver * GetInteractorStyle()
External switching between joystick/trackball/new? modes.
virtual vtkRenderWindowInteractor * GetInteractor()
Get the interactor associated with this render window.
T * GetData()
Get a pointer to the underlying data of the tuple.
virtual void SetPhysicalTranslation(double, double, double)
Set/get physical coordinate system in world coordinate system.
virtual double * GetPhysicalTranslation()
virtual double GetPhysicalScale()
virtual double * GetPhysicalViewDirection()
virtual double * GetPhysicalViewUp()
virtual void SetPhysicalScale(double)
Set/get physical coordinate system in world coordinate system.
virtual void SetPhysicalViewDirection(double, double, double)
Set/get physical coordinate system in world coordinate system.
virtual void SetPhysicalViewUp(double, double, double)
Set/get physical coordinate system in world coordinate system.
void Set(const T &x, const T &y, const T &z)
Set the x, y and z components of the vector.
vtkVector3< T > Cross(const vtkVector3< T > &other) const
Return the cross product of this X other.
T Dot(const vtkVector< T, Size > &other) const
The dot product of this and the supplied vector.
double Normalize()
Normalize the vector in place.