/usr/share/openscenegraph/examples/osgframerenderer/CameraProperty.h is in openscenegraph-examples 3.2.0~rc1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #ifndef CAMERAPROPERTY_H
#define CAMERAPROPERTY_H
#include <osg/AnimationPath>
#include "UpdateProperty.h"
namespace gsc
{
class CameraProperty : public gsc::UpdateProperty
{
public:
CameraProperty():
_center(0.0,0.0,0.0),
_eye(0.0,-1.0,0.0),
_up(0.0,0.0,1.0),
_rotationCenter(0.0,0.0,0.0),
_rotationAxis(0.0,0.0,1.0),
_rotationSpeed(0.0) {}
CameraProperty(const CameraProperty& cp, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
_center(cp._center),
_eye(cp._eye),
_up(cp._up),
_rotationCenter(cp._rotationCenter),
_rotationAxis(cp._rotationAxis),
_rotationSpeed(cp._rotationSpeed)
{}
META_Object(gsc, CameraProperty);
void setToModel(const osg::Node* node);
void setCenter(const osg::Vec3d& center) { _center = center; }
const osg::Vec3d& getCenter() const { return _center; }
void setEyePoint(const osg::Vec3d& eye) { _eye = eye; }
const osg::Vec3d& getEyePoint() const { return _eye; }
void setUpVector(const osg::Vec3d& up) { _up = up; }
const osg::Vec3d& getUpVector() const { return _up; }
void setRotationCenter(const osg::Vec3d& center) { _rotationCenter = center; }
const osg::Vec3d& getRotationCenter() const { return _rotationCenter; }
void setRotationAxis(const osg::Vec3d& axis) { _rotationAxis = axis; }
const osg::Vec3d& getRotationAxis() const { return _rotationAxis; }
void setRotationSpeed(double speed) { _rotationSpeed = speed; }
double getRotationSpeed() const { return _rotationSpeed; }
virtual void update(osgViewer::View* view);
protected:
virtual ~CameraProperty() {}
osg::Vec3d _center;
osg::Vec3d _eye;
osg::Vec3d _up;
osg::Vec3d _rotationCenter;
osg::Vec3d _rotationAxis;
double _rotationSpeed;
};
}
#endif
|