|
3Depict
|
An abstract base class for a camera. More...
#include <cameras.h>


Public Member Functions | |
| Camera () | |
| constructor More... | |
| virtual | ~Camera () |
| Destructor. More... | |
| virtual Camera * | clone () const =0 |
| Duplication routine. Must delete returned pointer manually. More... | |
| Point3D | getOrigin () const |
| Return the origin of the camera. More... | |
| Point3D | getViewDirection () const |
| Return the view direction for the camera. More... | |
| Point3D | getUpDirection () const |
| Return the up direction for the camera. More... | |
| unsigned int | getProjectionMode () const |
| return the projection mode More... | |
| float | getOrthoScale () const |
| virtual void | setOrigin (const Point3D &) |
| Set the camera's position. More... | |
| void | setViewDirection (const Point3D &) |
| set the direction that the camera looks towards More... | |
| void | setUpDirection (const Point3D &) |
| set the direction that the camera considers "up" More... | |
| void | setUserString (const std::string &newString) |
| Set the user string. More... | |
| std::string | getUserString () const |
| Get the user string. More... | |
| virtual void | forwardsDolly (float dollyAmount) |
| Do a forwards "dolly",where the camera moves along its viewing axis. In ortho mode, instead of moving along axis, a scaling is performed. More... | |
| virtual void | move (float leftRightAmount, float UpDownAmount) |
| Move the camera origin. More... | |
| virtual void | translate (float leftRightAmount, float UpDownAmount) |
| Move the camera origin. More... | |
| virtual void | pivot (float rollAroundAcross, float rollaroundUp) |
| pivot the camera More... | |
| virtual void | roll (float roll)=0 |
| Roll around the view direction. More... | |
| virtual void | apply (float outputRatio, const BoundCube &b, bool loadIdentity=true) const =0 |
| Applies the camera settings to openGL. Ensures the far planes. More... | |
| virtual void | ensureVisible (const BoundCube &b, unsigned int face=3)=0 |
| Ensures that the given boundingbox should look nice, and be visible. More... | |
| virtual void | getProperties (CameraProperties &p) const =0 |
| Obtain the properties specific to a camera. More... | |
| virtual bool | setProperty (unsigned int key, const std::string &value)=0 |
| Set the camera property from a key & string pair. More... | |
| unsigned int | type () const |
| virtual bool | writeState (std::ostream &f, unsigned int format, unsigned int tabs) const =0 |
| Write the state of the camera. More... | |
| virtual bool | readState (xmlNodePtr nodePtr)=0 |
| Read the state of the camera from XML document. More... | |
Protected Attributes | |
| bool | lock |
| Point3D | origin |
| Camera location. More... | |
| Point3D | viewDirection |
| Direction camera is looking in. More... | |
| Point3D | upDirection |
| Up direction for camera (required to work out "roll") More... | |
| unsigned int | projectionMode |
| Projection mode (otho, perspective...)_. More... | |
| float | orthoScale |
| The current orthographic scaling. More... | |
| unsigned int | typeNum |
| Type number. More... | |
| std::string | userString |
| user string, e.g. camera name More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const Camera &) |
| Streaming output operator, presents human readable text. More... | |
An abstract base class for a camera.
| Camera::Camera | ( | ) |
constructor
|
virtual |
Destructor.
|
pure virtual |
Applies the camera settings to openGL. Ensures the far planes.
Implemented in CameraLookAt.
Referenced by Scene::glSelect(), and Scene::hasOverlays().

|
pure virtual |
Duplication routine. Must delete returned pointer manually.
Implemented in CameraLookAt.
Referenced by AnalysisState::addCam(), AnalysisState::addCamByClone(), Scene::cloneActiveCam(), AnaglyphEffect::enable(), BasicGLPane::saveImageSequence(), Scene::setActiveCamByClone(), AnalysisState::setCameraByClone(), and Scene::setTempCam().

|
pure virtual |
Ensures that the given boundingbox should look nice, and be visible.
Implemented in CameraLookAt.
Referenced by Scene::ensureVisible().

|
virtual |
Do a forwards "dolly",where the camera moves along its viewing axis. In ortho mode, instead of moving along axis, a scaling is performed.
Reimplemented in CameraLookAt.
References lock, origin, and viewDirection.
Referenced by BasicGLPane::keyReleased(), and BasicGLPane::mouseWheelMoved().

| Point3D Camera::getOrigin | ( | ) | const |
Return the origin of the camera.
References origin.
Referenced by Scene::applyDevice(), DrawGLText::draw(), DrawField3D::draw(), DrawIsoSurface::draw(), and BasicGLPane::saveImage().

|
inline |
|
inline |
return the projection mode
Referenced by BasicGLPane::saveImage().

|
pure virtual |
Obtain the properties specific to a camera.
Implemented in CameraLookAt.
Referenced by updateCameraPropertyGrid().

| Point3D Camera::getUpDirection | ( | ) | const |
Return the up direction for the camera.
References upDirection.
Referenced by Scene::applyDevice(), DrawGLText::draw(), and BoxCropEffect::enable().

|
inline |
Get the user string.
References CameraProperty::key.
| Point3D Camera::getViewDirection | ( | ) | const |
Return the view direction for the camera.
References viewDirection.
Referenced by Scene::applyDevice(), BoxCropEffect::enable(), and Scene::hasOverlays().

|
virtual |
Move the camera origin.
Reimplemented in CameraLookAt.
References Point3D::crossProd(), lock, origin, upDirection, and viewDirection.
Referenced by BasicGLPane::mouseMoved(), BasicGLPane::saveImageSequence(), and translate().

|
virtual |
pivot the camera
Reimplemented in CameraLookAt.
References Point3D::crossProd(), Point3f::fx, Point3f::fy, Point3f::fz, lock, quat_rot(), upDirection, and viewDirection.
Referenced by BasicGLPane::mouseMoved().

|
pure virtual |
Read the state of the camera from XML document.
Implemented in CameraLookAt.
|
pure virtual |
Roll around the view direction.
Implemented in CameraLookAt.
Referenced by BasicGLPane::mouseMoved().

|
virtual |
|
pure virtual |
Set the camera property from a key & string pair.
Implemented in CameraLookAt.
| void Camera::setUpDirection | ( | const Point3D & | pt | ) |
set the direction that the camera considers "up"
References lock, Point3D::normalise(), and upDirection.
Referenced by MainWindowFrame::realignCameraButton().

|
inline |
Set the user string.
Referenced by AnalysisState::addCam().

| void Camera::setViewDirection | ( | const Point3D & | pt | ) |
set the direction that the camera looks towards
References lock, Point3D::normalise(), and viewDirection.
|
virtual |
Move the camera origin.
Reimplemented in CameraLookAt.
Referenced by AnaglyphEffect::enable(), and BasicGLPane::mouseMoved().

|
inline |
References tabs().
Referenced by Scene::applyDevice(), AnaglyphEffect::enable(), Scene::finaliseCam(), MainWindowFrame::realignCameraButton(), and BasicGLPane::saveImage().

|
pure virtual |
Write the state of the camera.
Implemented in CameraLookAt.
|
friend |
Streaming output operator, presents human readable text.
|
protected |
Referenced by CameraLookAt::clone(), CameraLookAt::ensureVisible(), forwardsDolly(), CameraLookAt::forwardsDolly(), CameraLookAt::getProperties(), move(), CameraLookAt::move(), pivot(), CameraLookAt::pivot(), CameraLookAt::readState(), CameraLookAt::roll(), setOrigin(), CameraLookAt::setOrigin(), CameraLookAt::setProperty(), setUpDirection(), setViewDirection(), translate(), CameraLookAt::translate(), and CameraLookAt::writeState().
|
protected |
Camera location.
Referenced by CameraLookAt::apply(), CameraLookAt::CameraLookAt(), CameraLookAt::clone(), CameraLookAt::ensureVisible(), forwardsDolly(), CameraLookAt::forwardsDolly(), getOrigin(), CameraLookAt::getProperties(), CameraLookAt::lookAt(), move(), CameraLookAt::move(), operator<<(), CameraLookAt::pivot(), CameraLookAt::readState(), CameraLookAt::recomputeViewDirection(), CameraLookAt::repositionAroundTarget(), setOrigin(), CameraLookAt::setOrigin(), CameraLookAt::setProperty(), CameraLookAt::setTarget(), CameraLookAt::translate(), and CameraLookAt::writeState().
|
protected |
The current orthographic scaling.
Referenced by CameraLookAt::apply(), CameraLookAt::clone(), CameraLookAt::ensureVisible(), CameraLookAt::forwardsDolly(), CameraLookAt::getProperties(), CameraLookAt::getViewWidth(), CameraLookAt::readState(), CameraLookAt::setProperty(), and CameraLookAt::writeState().
|
protected |
Projection mode (otho, perspective...)_.
Referenced by CameraLookAt::apply(), CameraLookAt::CameraLookAt(), CameraLookAt::clone(), CameraLookAt::ensureVisible(), CameraLookAt::forwardsDolly(), CameraLookAt::getProperties(), CameraLookAt::getViewWidth(), CameraLookAt::readState(), CameraLookAt::setProperty(), CameraLookAt::translate(), and CameraLookAt::writeState().
|
protected |
Type number.
Referenced by CameraLookAt::CameraLookAt(), and CameraLookAt::clone().
|
protected |
Up direction for camera (required to work out "roll")
Referenced by CameraLookAt::CameraLookAt(), CameraLookAt::clone(), CameraLookAt::ensureVisible(), CameraLookAt::getProperties(), getUpDirection(), CameraLookAt::lookAt(), move(), CameraLookAt::move(), operator<<(), pivot(), CameraLookAt::pivot(), CameraLookAt::readState(), CameraLookAt::recomputeUpDirection(), CameraLookAt::roll(), CameraLookAt::setProperty(), setUpDirection(), CameraLookAt::translate(), and CameraLookAt::writeState().
|
protected |
user string, e.g. camera name
Referenced by CameraLookAt::clone(), CameraLookAt::readState(), and CameraLookAt::writeState().
|
protected |
Direction camera is looking in.
Referenced by CameraLookAt::CameraLookAt(), CameraLookAt::clone(), forwardsDolly(), CameraLookAt::forwardsDolly(), getViewDirection(), move(), CameraLookAt::move(), operator<<(), pivot(), CameraLookAt::pivot(), CameraLookAt::recomputeUpDirection(), CameraLookAt::recomputeViewDirection(), CameraLookAt::roll(), CameraLookAt::setProperty(), setViewDirection(), and CameraLookAt::translate().
1.8.13