1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 04:53:52 +00:00
openmw/apps/opencs/view/render/cellarrow.hpp

72 lines
1.4 KiB
C++
Raw Normal View History

#ifndef OPENCS_VIEW_CELLARROW_H
#define OPENCS_VIEW_CELLARROW_H
#include "tagbase.hpp"
2022-10-10 11:41:36 +00:00
#include <QString>
#include <osg/ref_ptr>
#include "../../model/world/cellcoordinates.hpp"
namespace osg
{
class PositionAttitudeTransform;
class Group;
}
namespace CSVRender
{
class CellArrow;
2022-10-19 17:02:00 +00:00
struct WorldspaceHitResult;
class CellArrowTag : public TagBase
{
2022-09-22 18:26:05 +00:00
CellArrow* mArrow;
2022-09-22 18:26:05 +00:00
public:
CellArrowTag(CellArrow* arrow);
2022-09-22 18:26:05 +00:00
CellArrow* getCellArrow() const;
2022-09-22 18:26:05 +00:00
QString getToolTip(bool hideBasics, const WorldspaceHitResult& hit) const override;
};
class CellArrow
{
2022-09-22 18:26:05 +00:00
public:
enum Direction
{
Direction_North = 1,
Direction_West = 2,
Direction_South = 4,
Direction_East = 8
};
2022-09-22 18:26:05 +00:00
private:
// not implemented
CellArrow(const CellArrow&);
CellArrow& operator=(const CellArrow&);
2022-09-22 18:26:05 +00:00
Direction mDirection;
osg::Group* mParentNode;
osg::ref_ptr<osg::PositionAttitudeTransform> mBaseNode;
CSMWorld::CellCoordinates mCoordinates;
2022-09-22 18:26:05 +00:00
void adjustTransform();
2022-09-22 18:26:05 +00:00
void buildShape();
2022-09-22 18:26:05 +00:00
public:
CellArrow(osg::Group* cellNode, Direction direction, const CSMWorld::CellCoordinates& coordinates);
2022-09-22 18:26:05 +00:00
~CellArrow();
2022-09-22 18:26:05 +00:00
CSMWorld::CellCoordinates getCoordinates() const;
2022-09-22 18:26:05 +00:00
Direction getDirection() const;
};
}
#endif