55 virtual void configure(agx::TiXmlElement *eCamera)
override;
76 double bottom,
double top,
77 double zNear,
double zFar);
81 double bottom,
double top,
82 double zNear,
double zFar);
88 double zNear,
double zFar);
96 double& bottom,
double& top,
97 double& zNear,
double& zFar)
const;
102 double& bottom,
double& top,
103 double& zNear,
double& zFar)
const;
111 double& zNear,
double& zFar)
const;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXPHYSICS_EXPORT
Templated value-reference.
Abstract representation of a value.
void alignUpVector(const agx::Vec3 &up=agx::Vec3(0, 0, 1))
void setViewMatrix(const agx::Matrix4x4 &matrix)
Set the view matrix.
agxData::ValueRefT< agx::Real > m_fovY
agxData::ValueRefT< agx::UInt > m_windowWidth
static void setMainCamera(Camera *camera)
static Camera * mainCamera()
agxData::Value::Event::CallbackType m_transformCallback
void moveLocal(const agx::Vec3 &offset)
void setViewPort(unsigned width, unsigned height)
static agx::Model * ClassModel()
agxData::ValueRefT< agx::Matrix4x4 > m_projectionMatrix
agxData::ValueRefT< agx::UInt > m_windowHeight
void setProjectionMatrixAsFrustum(double left, double right, double bottom, double top, double zNear, double zFar)
Set to a perspective projection.
bool getProjectionMatrixAsPerspective(double &fovy, double &aspectRatio, double &zNear, double &zFar) const
Get the frustum setting of a symmetric perspective projection matrix.
bool getProjectionMatrixAsFrustum(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
Get the frustum setting of a perspective projection matrix.
virtual void configure(agx::TiXmlElement *eCamera) override
void transformCallback(agxData::Value *)
void move(const agx::Vec3 &offset)
Camera(const agx::Name &name="camera")
void setViewMatrixAsLookAt(const agx::Vec3 &eye, const agx::Vec3 ¢er, const agx::Vec3 &up)
Set to the position and orientation of view matrix, using the same convention as gluLookAt.
bool getProjectionMatrixAsOrtho(double &left, double &right, double &bottom, double &top, double &zNear, double &zFar) const
Get the orthographic settings of the orthographic projection matrix.
void updateFov(agxData::Value *)
void getViewMatrixAsLookAt(agx::Vec3 &eye, agx::Vec3 ¢er, agx::Vec3 &up, double lookDistance=1.0) const
Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt.
void setProjectionMatrixAsPerspective(double fovy, double aspectRatio, double zNear, double zFar)
Create a symmetrical perspective projection, See OpenGL gluPerspective documentation for further deta...
void setProjectionMatrix(const agx::Matrix4x4 &matrix)
Set the projection matrix.
agx::Vec3 getForwardVector() const
agxData::Value::Event::CallbackType m_projectionCallback
agxData::ValueRefT< agx::AffineMatrix4x4 > m_transform
void setProjectionMatrixAsOrtho(double left, double right, double bottom, double top, double zNear, double zFar)
Set to an orthographic projection.
agxData::ValueRefT< agx::Matrix4x4 > m_viewMatrix
void calculatePickRay(const agx::Vec2 &mousePoint, agx::Vec3 &pos, agx::Vec3 &direction)
const agx::Matrix4x4 & getViewMatrix() const
Get the view matrix.
agx::TaskRef m_renderTask
static Camera * load(agx::TiXmlElement *eCamera, agx::Device *device)
agxData::ValueRefT< agx::Matrix4x4 > m_modelViewProjectionMatrix
const agx::Matrix4x4 & getProjectionMatrix() const
Get the projection matrix.
agxData::ValueRefT< agx::Real > m_fovX
static Camera * getActiveCamera()
A component is an object containing other objects, enabling hierarchical structuring.
An agx::Device is an abstract representation of a device on which data can be stored and processed.
A model is an abstract representation of the class of an agx::Object.
Representation of a name string.
This namespace contains OpenGL specific details for connecting OpenCL/OpenGL.