Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::ViewerAPI::ViewportCameraWrapper Class Reference

The ViewportCamera class accessed by other plugins. More...

#include <FnViewportCamera.h>

Inheritance diagram for Foundry::Katana::ViewerAPI::ViewportCameraWrapper:
Foundry::Katana::ViewerAPI::ViewportCameraPluginBase

List of all members.

Public Member Functions

template<class T >
T * getPluginInstance ()
 Gets a pointer to the real plugin instance.
int getCameraTypeID ()
 Returns an integer indicating the type of the camera.
void setViewportDimensions (unsigned int width, unsigned int height)
 Informs the camera of the Viewport dimensions in pixels.
void setOption (OptionIdGenerator::value_type optionId, FnAttribute::Attribute attr)
 Sets a generic camera option.
FnAttribute::Attribute getOption (OptionIdGenerator::value_type optionId)
 Gets a generic camera option.
void setOption (const std::string &name, FnAttribute::Attribute attr)
 Sets a generic camera option.
FnAttribute::Attribute getOption (const std::string &name)
 Gets a generic camera option.
void translate (double x, double y, double z)
 Translates the camera.
void rotate (double x, double y, double z)
 Rotates the camera.
void startInteraction ()
 Called when the user starts interacting with the camera.
void endInteraction ()
 Called when the user finishes interacting with the camera.
void setup (FnAttribute::GroupAttribute attr)
 Initializes the camera from a GroupAttribute.
FnAttribute::GroupAttribute asAttribute ()
 Returns the camera settings as a GroupAttribute.
bool getPointOnPlane (int x, int y, const Vec3d &planeOrigin, const Vec3d &planeNormal, Vec3d &intersection)
 Returns the point 3D on a plane when passed X and Y window coordinates.
void getRay (int x, int y, Vec3d &pos, Vec3d &dir)
 Returns the ray from the observer through the X and Y window coordinates.
Vec3d projectObjectIntoWindow (Vec3d point)
 Converts a 3D point into window space.
Vec3d projectWindowIntoObject (Vec3d point)
 Converts a window space point into 3D space.
void setDirty (CameraDirtyBits dirtyBits)
 Specifies what has changed in the camera.

Detailed Description

The ViewportCamera class accessed by other plugins.


Member Function Documentation

template<class T >
T* Foundry::Katana::ViewerAPI::ViewportCameraWrapper::getPluginInstance ( ) [inline]

Gets a pointer to the real plugin instance.

WARNING: This function purposely breaks the compiler agnostic pattern of the Katana plugin API, so it needs to be used with care. This performs a dynamic cast to the real type so the implications of what that means in different circumstances should be understood. If the caller and plugin instance are not contained in the same shared library the RTTI check may fail.

This function allows a plugin wrapper to return the actual plugin class. The plugin is returned as a pointer to a child class of ViewportCamera that is a registerd plugin. The type of that child class needs to be specified in the template, so that it can be properly cast. If the specified type doesn't match the plugin type then NULL is returned.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator