7 #ifndef CAFU_TRANSFORMATION_BOX_HPP_INCLUDED
8 #define CAFU_TRANSFORMATION_BOX_HPP_INCLUDED
10 #include "../AxesInfo.hpp"
11 #include "Math3D/BoundingBox.hpp"
12 #include "wx/gdicmn.h"
51 TH_TOP_LEFT =TH_TOP | TH_LEFT,
52 TH_TOP_RIGHT =TH_TOP | TH_RIGHT,
53 TH_BOTTOM_LEFT =TH_BOTTOM | TH_LEFT,
54 TH_BOTTOM_RIGHT=TH_BOTTOM | TH_RIGHT
91 bool BeginTrafo(
const ViewWindow2DT& ViewWindow,
const wxPoint& PointTS);
92 bool UpdateTrafo(
const ViewWindow2DT& ViewWindow,
const wxPoint& PointTS,
bool ToggleGrid);
105 void Render(
Renderer2DT& Renderer,
const wxColour& OutlineColor,
const wxColour& HandleColor)
const;
106 void Render(
Renderer3DT& Renderer,
const wxColour& OutlineColor,
const wxColour& HandleColor)
const;
107 bool UpdateStatusBar(
ChildFrameT* ChildFrame)
const;
113 static const TrafoHandleT HandleTable[3][3][3];
123 static TrafoHandleT GetWorldSpaceHandle(TrafoHandleT WindowSpaceHandle,
const AxesInfoT& Axes);
125 void RenderRefPosHint(
Renderer2DT& Renderer)
const;
130 bool GetShearMatrix(
Matrix4x4fT& ShearMatrix)
const;
135 TrafoModeT m_TrafoMode;
136 TrafoHandleT m_DragState;
This class provides auxiliary means for rendering a 3D view.
Definition: Renderer3D.hpp:30
This class implements the rendering into a 2D view.
Definition: Renderer2D.hpp:22
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
TrafoBoxT()
The constructor.
Definition: TrafoBox.cpp:54
This class implements a spatial box that can be used to define a transformation (translation, rotation, scale or shear).
Definition: TrafoBox.hpp:29
TrafoHandleT CheckForHandle(const ViewWindow2DT &ViewWindow, const wxPoint &PointTS) const
Returns the handle under the given point PointTS in ViewWindow, TH_NONE if there is none (only handle...
Definition: TrafoBox.cpp:114
CommandTransformT * GetTrafoCommand(MapDocumentT &MapDoc, bool LockTexCoords) const
This method creates a transform command, according to the current state of the box.
Definition: TrafoBox.cpp:438
void SetNextTrafoMode()
Cycles the transformation modes. Can only be called when no drag is currently in progress (GetDragSta...
Definition: TrafoBox.cpp:99
This class represents a child frame.
Definition: ChildFrame.hpp:55
void SetBB(const BoundingBox3fT &BB, const ArrayT< Vector3fT > &ExtraRefPos)
Sets new spatial dimensions for this trafo box. Can only be called when no drag is currently in progr...
Definition: TrafoBox.cpp:70
wxCursor SuggestCursor(TrafoHandleT TrafoHandle) const
For the current trafo mode and the given trafo handle, this method returns the related matching curso...
Definition: TrafoBox.cpp:149
This class represents a generic 4x4 matrix.
Definition: MapElement.hpp:30
const BoundingBox3fT & GetBB() const
Returns the spatial dimensions of this trafo box.
Definition: TrafoBox.hpp:62
This class describes how the three world-space axes are mapped to the two screen- or window-space axe...
Definition: AxesInfo.hpp:15
TrafoHandleT GetDragState() const
Returns which of our handles (if any) is currently being dragged by the user.
Definition: TrafoBox.hpp:74
Definition: ChildFrameViewWin2D.hpp:24
void SetTrafoMode(TrafoModeT TM)
Sets the specified transformation mode. Can only be called when no drag is currently in progress (Get...
Definition: TrafoBox.cpp:89
void ApplyTrafo(MapElementT *Elem, bool LockTexCoords) const
Like GetTrafoCommand(), but applies the transformation to the given element immediately.
Definition: TrafoBox.cpp:493
Definition: Renderer.hpp:16
This is the base class for all elements ("objects") that can exist in a map.
Definition: MapElement.hpp:57