|
Katana Plug-in APIs 0.1
|
Interface for a camera. More...
#include <FnViewportCamera.h>
Public Member Functions | |
| ViewportWrapperPtr | getViewport () |
| Gets the Viewport. | |
| const double * | getViewMatrix () |
| Gets the View Matrix for this camera. | |
| Matrix44d | getViewMatrix44d () |
| Gets the View Matrix for this camera. | |
| void | setViewMatrix (const double *matrix) |
| Sets the View Matrix for this camera. | |
| const double * | getProjectionMatrix () |
| Gets the Projection Matrix for this camera. | |
| Matrix44d | getProjectionMatrix44d () |
| Gets the Projection Matrix for this camera. | |
| void | setProjectionMatrix (const double *matrix) |
| Sets the Projection Matrix for this camera. | |
| double | getCenterOfInterest () |
| Gets the center of interest for this camera. | |
| void | setCenterOfInterest (double coi) |
| Sets the center of interest for this camera. | |
| double | getFOV () |
| Gets the field of view for this camera. | |
| void | setFOV (double fov) |
| Sets the field of view for this camera. | |
| double | getOrthographicWidth () |
| Gets the orthographic camera dimensions (if applicable) | |
| void | setOrthographicWidth (double width) |
| Sets the orthographic width of the camera. | |
| void | getNearFar (double &near, double &far) |
| Gets the near and far plane distances for this camera. | |
| void | setNearFar (double near, double far) |
| Sets the near and far plane distances for this camera. | |
| void | getScreenWindow (double &left, double &right, double &bottom, double &top) |
| Gets the screen window dimensions for this camera. | |
| void | setScreenWindow (double left, double right, double bottom, double top) |
| Sets the screen window dimensions for this camera. | |
| bool | hasLocationPath () |
| Returns true if this camera is controlled by a location. | |
| std::string | getLocationPath () |
| Gets the location path if this camera is controlled by one. | |
| void | setLocationPath (const std::string &locationPath) |
| Sets the location that will control this camera. | |
| Vec3d | getOrigin () |
| Gets the camera origin. | |
| Vec3d | getDirection () |
| Gets the camera look direction. | |
| Vec3d | getUp () |
| Gets the camera up direction. | |
| Vec3d | getLeft () |
| Gets the camera left direction. | |
| bool | isInteractionDisabled () |
| Checks whether the camera has been flagged as non-interactive. | |
| void | disableInteraction (bool disabled) |
| Flags the camera as non-interactive. | |
Interface for a camera.
A ViewportCamera is an important component of a Viewport that is used by the Viewport, ViewportLayers and Manipulators to determine the view and projection matrices, and also to perform useful functions such as projecting points between world and window spaces. A Viewport requires a reference to a single ViewportCamera, however multiple viewports can reference the same camera if required. A camera can optionally be controlled by a location (see hasLocationPath(), getLocationPath() and setLocationPath).
This is a virtual base class to be extended in your plug-in. In addition to implementing all the pure virtual functions in this class, you must also implement this static method in your derived class:
// Returns a new instance of your derived class. static ViewportCamera* create();
To indicate an error to the caller, your implementation may throw an exception derived from std::exception.
ViewportCamera is the class that plugins should extend and implement.
ViewportCameraWrapper is the class that allows other plugin types to access the ViewportCamera plugin.
ViewportCameraPluginBase is the base class that provides the common methods between ViewportCamera and ViewportCameraWrapper.
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::disableInteraction | ( | bool | disabled | ) |
Flags the camera as non-interactive.
| disabled | Set it to true to disable interaction or false to re-enable it. |
| double Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getCenterOfInterest | ( | ) |
Gets the center of interest for this camera.
| std::string Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getLocationPath | ( | ) |
Gets the location path if this camera is controlled by one.
A camera that is controlled by a location has its properties (including the transform) defined by a location produced by the ViewerDelegate.
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getNearFar | ( | double & | near, |
| double & | far | ||
| ) |
Gets the near and far plane distances for this camera.
| near | Will be set to the distance to the near clipping plane. |
| far | Will be set to the distance to the far clipping plane. |
| double Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getOrthographicWidth | ( | ) |
Gets the orthographic camera dimensions (if applicable)
| const double* Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getProjectionMatrix | ( | ) |
Gets the Projection Matrix for this camera.
| Matrix44d Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getProjectionMatrix44d | ( | ) |
Gets the Projection Matrix for this camera.
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getScreenWindow | ( | double & | left, |
| double & | right, | ||
| double & | bottom, | ||
| double & | top | ||
| ) |
Gets the screen window dimensions for this camera.
| left | Will be set to the left position of the screen window. |
| right | Will be set to the right position of the screen window. |
| bottom | Will be set to the bottom position of the screen window. |
| top | Will be set to the top position of the screen window. |
| const double* Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getViewMatrix | ( | ) |
Gets the View Matrix for this camera.
| Matrix44d Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getViewMatrix44d | ( | ) |
Gets the View Matrix for this camera.
| ViewportWrapperPtr Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::getViewport | ( | ) |
| bool Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::hasLocationPath | ( | ) |
Returns true if this camera is controlled by a location.
A camera that is controlled by a location has its properties (including the transform) defined by a location produced by the ViewerDelegate.
| bool Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::isInteractionDisabled | ( | ) |
Checks whether the camera has been flagged as non-interactive.
Layers that wish to start an interaction should check for this predicate before making any change to the camera.
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setCenterOfInterest | ( | double | coi | ) |
Sets the center of interest for this camera.
| coi | The distance along the cameras look direction to the center of interest. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setFOV | ( | double | fov | ) |
Sets the field of view for this camera.
| fov | The field of view angle in degrees. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setLocationPath | ( | const std::string & | locationPath | ) |
Sets the location that will control this camera.
A camera that is controlled by a location has its properties (including the transform) defined by a location produced by the ViewerDelegate.
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setNearFar | ( | double | near, |
| double | far | ||
| ) |
Sets the near and far plane distances for this camera.
| near | The distance to the near clipping plane. |
| far | The distance to the far clipping plane. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setOrthographicWidth | ( | double | width | ) |
Sets the orthographic width of the camera.
| width | The new orthographic width. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setProjectionMatrix | ( | const double * | matrix | ) |
Sets the Projection Matrix for this camera.
| matrix | The 4x4 Projection Matrix represented by 16 doubles. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setScreenWindow | ( | double | left, |
| double | right, | ||
| double | bottom, | ||
| double | top | ||
| ) |
Sets the screen window dimensions for this camera.
| left | The left position of the screen window. |
| right | The right position of the screen window. |
| bottom | The bottom position of the screen window. |
| top | The top position of the screen window. |
| void Foundry::Katana::ViewerAPI::ViewportCameraPluginBase::setViewMatrix | ( | const double * | matrix | ) |
Sets the View Matrix for this camera.
| matrix | The 4x4 Viewer Matrix represented by 16 doubles. |
1.7.3