2015-10-12 12:12:01 +00:00
|
|
|
#ifndef OPENCS_VIEW_CELLARROW_H
|
|
|
|
#define OPENCS_VIEW_CELLARROW_H
|
|
|
|
|
|
|
|
#include "tagbase.hpp"
|
|
|
|
|
|
|
|
#include <osg/ref_ptr>
|
|
|
|
|
2015-10-12 12:31:55 +00:00
|
|
|
#include "../../model/world/cellcoordinates.hpp"
|
|
|
|
|
2015-10-12 12:12:01 +00:00
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class PositionAttitudeTransform;
|
|
|
|
class Group;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVRender
|
|
|
|
{
|
|
|
|
class CellArrow;
|
|
|
|
|
|
|
|
class CellArrowTag : public TagBase
|
|
|
|
{
|
|
|
|
CellArrow *mArrow;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
CellArrowTag (CellArrow *arrow);
|
|
|
|
|
|
|
|
CellArrow *getCellArrow() const;
|
2015-11-13 10:39:57 +00:00
|
|
|
|
2021-06-27 22:18:41 +00:00
|
|
|
QString getToolTip(bool hideBasics, const WorldspaceHitResult& hit) const override;
|
2015-10-12 12:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CellArrow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum Direction
|
|
|
|
{
|
|
|
|
Direction_North = 1,
|
|
|
|
Direction_West = 2,
|
|
|
|
Direction_South = 4,
|
|
|
|
Direction_East = 8
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
// not implemented
|
|
|
|
CellArrow (const CellArrow&);
|
|
|
|
CellArrow& operator= (const CellArrow&);
|
|
|
|
|
|
|
|
Direction mDirection;
|
|
|
|
osg::Group* mParentNode;
|
|
|
|
osg::ref_ptr<osg::PositionAttitudeTransform> mBaseNode;
|
2015-10-12 12:31:55 +00:00
|
|
|
CSMWorld::CellCoordinates mCoordinates;
|
2015-10-12 12:12:01 +00:00
|
|
|
|
|
|
|
void adjustTransform();
|
|
|
|
|
|
|
|
void buildShape();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2015-10-12 12:31:55 +00:00
|
|
|
CellArrow (osg::Group *cellNode, Direction direction,
|
|
|
|
const CSMWorld::CellCoordinates& coordinates);
|
2015-10-12 12:12:01 +00:00
|
|
|
|
|
|
|
~CellArrow();
|
|
|
|
|
2015-10-12 12:31:55 +00:00
|
|
|
CSMWorld::CellCoordinates getCoordinates() const;
|
2015-10-25 14:16:22 +00:00
|
|
|
|
|
|
|
Direction getDirection() const;
|
2015-10-12 12:12:01 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|