OpenSceneGraph/include/osg/PositionAttitudeTransform
Robert Osfield ae5e4f848f Added new osgcallback demo, and updated small API changes to improve the
flexiblity of callbacks.

Added beginings of convex planer occlusions culling.
2002-05-28 23:43:22 +00:00

54 lines
1.4 KiB
Plaintext

//C++ header - Open Scene Graph - Copyright (C) 1998-2001 Robert Osfield
//Distributed under the terms of the GNU Library General Public License (LGPL)
//as published by the Free Software Foundation.
#ifndef OSG_POSITIONATTITIDETRANSFORM
#define OSG_POSITIONATTITIDETRANSFORM 1
#include <osg/Group>
#include <osg/Transform>
#include <osg/Quat>
namespace osg {
/** PositionAttitideTransform - is Transfrom the set the coordinates transform
up via a Vec3 position and Quat attitude.
*/
class SG_EXPORT PositionAttitudeTransform : public Transform
{
public :
PositionAttitudeTransform();
PositionAttitudeTransform(const PositionAttitudeTransform& pat,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
Transform(pat,copyop),
_position(pat._position),
_attitude(pat._attitude) {}
META_Node(PositionAttitudeTransform);
void setPosition(const Vec3& pos) { _position = pos; }
const Vec3& getPosition() const { return _position; }
void setAttitude(const Quat& quat) { _attitude = quat; }
const Quat& getAttitude() const { return _attitude; }
virtual const bool computeLocalToWorldMatrix(Matrix& matrix,NodeVisitor* nv) const;
virtual const bool computeWorldToLocalMatrix(Matrix& matrix,NodeVisitor* nv) const;
protected :
Vec3 _position;
Quat _attitude;
};
}
#endif