32 if (fabs(in.
Dot(normal)) > 0.999)
34 if (fabs(normal[0]) < 0.1)
36 result.
Set(1.0,0.0,0.0);
40 result.
Set(0.0,1.0,0.0);
45 result = in - (in.
Dot(normal))*normal;
103 double theta = acos(svdir.
Dot(cvdir));
104 if (nvup.
Dot(cvdir.
Cross(svdir)) < 0.0)
109 nivdir = civdir*cos(theta) - civright*sin(theta);
117 cppwc = cpos + ctrans;
118 double x = cppwc.
Dot(civdir)/cdistance;
119 double y = cppwc.
Dot(civright)/cdistance;
123 nivdir*(x*sdistance - spos.
Dot(nivdir)) +
124 nivright*(y*sdistance - spos.
Dot(nivright));
132 nfp = cpos + nivdir*sdistance;
140 this->FocalPoint[0] - this->InitialViewDirection[0]*this->Distance,
141 this->FocalPoint[1] - this->InitialViewDirection[1]*this->Distance,
142 this->FocalPoint[2] - this->InitialViewDirection[2]*this->Distance);
162 this->Active =
false;
167 this->Callback->Delete();
168 this->Callback = NULL;
181 this->xmin = in.
xmin;
182 this->xmax = in.
xmax;
183 this->ymin = in.
ymin;
184 this->ymax = in.
ymax;
188 this->Group = in.
Group;
vtkVector3< T > Cross(const vtkVector3< T > &other) const
Return the cross product of this X other.
double Normalize()
Normalize the vector in place.
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
vtkVector3d SanitizeVector(vtkVector3d &in, vtkVector3d &normal)
virtual double * GetDirectionOfProjection()
Get the vector in the direction from the camera position to the focal point.
extends interaction to support 3D input
void SetPosition(double x, double y, double z)
Set/Get the position of the camera in world coordinates.
vtkOpenVROverlaySpot(int x1, int x2, int y1, int y2, vtkCommand *cb)
virtual double * GetPosition()
Set/Get the position of the camera in world coordinates.
superclass for callback/observer methods
virtual double * GetTranslation()
Set/Get the translation to map world coordinates into the OpenVR physical space (meters, 0,0,0).
virtual void SetTranslation(double, double, double)
Set/Get the translation to map world coordinates into the OpenVR physical space (meters, 0,0,0).
void Set(const T &x, const T &y, const T &z)
Set the x, y and z components of the vector.
vtkOpenVROverlaySpot(const vtkOpenVROverlaySpot &in)
void Apply(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
double InitialViewDirection[3]
virtual double GetDistance()
Return the distance from the camera position to the focal point.
void SetFocalPoint(double x, double y, double z)
Set/Get the focal of the camera in world coordinates.
virtual vtkRenderWindowInteractor * GetInteractor()
Get the interactor associated with this render window.
void Set(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
virtual double * GetInitialViewUp()
Control the Vive to World transformations.
T * GetData()
Get a pointer to the underlying data of the tuple.
virtual double GetDollyMotionFactor()
Set/Get the dolly motion factor used when flying in 3D.
T Dot(const vtkVector< T, Size > &other) const
The dot product of this and the supplied vector.
virtual void SetInitialViewUp(double, double, double)
Control the Vive to World transformations.
virtual double * GetInitialViewDirection()
Control the Vive to World transformations.
virtual void SetDollyMotionFactor(double)
Set/Get the dolly motion factor used when flying in 3D.
virtual vtkInteractorObserver * GetInteractorStyle()
External switching between joystick/trackball/new? modes.
virtual void SetInitialViewDirection(double, double, double)
Control the Vive to World transformations.