21#ifndef SO_CAMERA_INTERACTOR
22#define SO_CAMERA_INTERACTOR
24#include <Inventor/SbBox.h>
25#include <Inventor/projectors/SbSphereSheetProjector.h>
26#include <Inventor/misc/SoRefCounter.h>
27#include <Inventor/STL/stack>
28#include <Inventor/SbVec.h>
29#include <Inventor/SbPImpl.h>
34class SoCameraInteractorImpl;
187 virtual void dolly(
float scaleFactor );
625 SoCameraInteractorImpl* m_impl;
Class for representing a rotation.
Class for representing a viewport.
Abstract base class for camera nodes.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Utility class to...
void setPosition(const SbVec2f &pos, float distFromEye, const SbViewportRegion &vpRegion)
Move camera to the specified position.
void pan(const SbVec2f &newPos, const SbViewportRegion &vpRegion)
Pan the camera based on offset from starting point.
void viewIn(const SbBox3f &bbox)
Move camera to the center of the specified box.
SoDEPRECATED SbVec3f getViewportCenter() const
Returns the viewport center.
void dollyWithZoomCenter(const SbVec2f ¢erPos, float scaleFactor, const SbViewportRegion &vpRegion)
Modifies the camera to ajust the view around the specified point.
void activatePanning(const SbVec2f &initPos, const SbViewportRegion &vpRegion)
Set the starting point for interactive panning.
SoCameraInteractor(SoCamera *camera)
Create a SoCameraInteractor for the specified camera.
SbVec3f projectToPlane(const SbVec2f &point, float distFromEye, const SbViewportRegion &vpRegion) const
Project specified 2D point on the plane parallel to the near plane that is at distFromEye units fro...
SbBool popCamera()
Restore saved camera.
void orbit(const SbVec2f &newPos)
Orbit the camera based on offset from the previous screen position.
void pivot(float angle)
Pivot the camera.
SbVec2f projectToScreen(const SbVec3f &point, const SbViewportRegion &vpRegion) const
Map a 3D point in world coordinates to a 2D point in normalized screen coordinates (0 <= x,...
static SoCameraInteractor * getNewInstance(SoCamera *camera)
Create an instance for the specified camera.
void synchronize(SoCamera *camera)
Copy field values from the specified camera to the camera of this interactor.
void dollyInWindow(const SbVec2f &topLeftCorner, const SbVec2f &bottomRightCorner, const SbViewportRegion &vpRegion)
Moves the camera forward or backward along the view vector to view the region defined by the given co...
virtual void zoom(float zoom)
Zoom - Makes the scene appear larger or smaller.
void pushCamera()
Save current camera.
virtual void dolly(float scaleFactor)
Dolly - Makes the scene appear larger or smaller.
void viewX(bool reverse=false)
NOTE: The camera position is not changed, so the camera may not be looking toward the scene.
void setRotationAxis(const SbVec3f &axis)
Set the axis of rotation.
void activateOrbiting(const SbVec2f &startPos)
Set the starting point for interactive orbiting.
void translate(const SbVec2f &displacement, const SbViewportRegion &vpRegion)
Move camera by the specified 2D displacement.
void viewAxis(const SbVec3f &direction, const SbVec3f &up)
Moves and rotates the camera to be aligned with the given direction vector while keeping the up direc...
void tilt(float angle)
Tilt the camera.
void viewIn(SoPath *path, const SbViewportRegion &vpRegion)
Move camera to the center of the scene defined by the specified path.
void zoomInWindow(const SbVec2f &topLeftCorner, const SbVec2f &bottomRightCorner, const SbViewportRegion &vpRegion)
Zooms to the region defined by the given corners in normalized screen coordinates.
void viewY(bool reverse=false)
Rotate camera to look parallel to the Y axis with +Z up.
void pointAt(const SbVec3f &targetPoint)
Sets the orientation of the camera so that it points toward the given target point while keeping the ...
SbRotation lookAt(const SbVec3f &position, const SbVec3f &target, const SbVec3f &up)
Returns the rotation needed to point a camera at position toward the given target point while keeping...
void rotate(float angle)
Rotate the camera around the center specified by setRotationCenter() and the axis specified by setRot...
SoCamera * getCamera() const
Returns the associated camera.
SbVec3f getDirectionVector() const
Returns the direction vector of the camera.
void orbit(const SbRotation &rotation)
Orbit the camera by the specified rotation.
void adjustClippingPlanes(SoNode *sceneRoot, const SbViewportRegion &vpRegion)
Adjust near and far clipping planes to minimize clipping of objects in the scene.
void viewAll(SoNode *node, const SbViewportRegion &vpRegion)
Move the camera to view the scene defined by the given node.
virtual void changeViewVolume(float height, float aspect)
Change camera's view volume.
void setPosition(const SbVec3f &pos)
Move camera to the specified position.
void viewAll(SoPath *path, const SbViewportRegion &vpRegion)
Move the camera to view the scene defined by the given path.
void setOrientation(const SbRotation &rot)
Set the orientation of the camera.
void roll(float angle)
Roll the camera.
void viewZ(bool reverse=false)
Rotate camera to look parallel to the Z axis with +Y up.
void rotate(const SbRotation &rot)
Rotate the camera.
void translate(const SbVec3f &trans)
Move camera by the specified 3D displacement.
void setRotationCenter(const SbVec3f &pos)
Set the center of rotation.
void viewIn(SoNode *node, const SbViewportRegion &vpRegion)
Move camera to the center of the scene defined by the specified node.
SbVec3f getFocalPoint() const
Returns the camera's "focal point", located focalDistance units from the camera position along the ...
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
Base class for ref-counted objects.