Classes | |
class | MouseGrabT |
This class defines if the associated view is currently being grabbed (for scrolling) with the mouse. More... | |
Public Member Functions | |
ViewWindow2DT (wxWindow *Parent, ChildFrameT *ChildFrame, ViewTypeT InitialViewType) | |
The constructor. More... | |
void | NotifySubjectChanged (SubjectT *Subject, MapDocOtherDetailT OtherDetail) |
Notifies the observer that some other detail than those specifically addressed below has changed. More... | |
void | NotifySubjectChanged_Selection (SubjectT *Subject, const ArrayT< MapElementT * > &OldSelection, const ArrayT< MapElementT * > &NewSelection) |
Notifies the observer that the selection in the current subject has been changed. More... | |
void | NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) |
Notifies the observer that one or more entities have been created. More... | |
void | NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives) |
Notifies the observer that one or more map primitives have been created. More... | |
void | NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities) |
Notifies the observer that one or more entities have been deleted. More... | |
void | NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives) |
Notifies the observer that one or more map primitives have been deleted. More... | |
void | NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail) |
void | NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail, const ArrayT< BoundingBox3fT > &OldBounds) |
void | Notify_EntChanged (SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail) |
void | Notify_VarChanged (SubjectT *Subject, const cf::TypeSys::VarBaseT &Var) |
Notifies the observer that a variable has changed. More... | |
void | NotifySubjectChanged (ToolsSubjectT *Subject, ToolT *Tool, ToolsUpdatePriorityT Priority) |
Notifies the observer that the current subject has been changed. More... | |
wxWindow * | GetWindow () |
This function is not const because we can mutate this(!) object via the returned pointer. More... | |
ViewTypeT | GetViewType () const |
Returns the view type of this view window. More... | |
AxesInfoT | GetAxesInfo () const |
This method returns the axes info for this window. In the case of a 3D window, it computes the 2D axes info that this view is closest to. More... | |
void | SetZoom (float NewZoom) |
float | GetZoom () const |
void | CenterView (const Vector3fT &Point) |
ArrayT< MapElementT * > | GetElementsAt (const wxPoint &Pixel, int Radius=3) const |
This method returns all visible map elements at the given pixel in the 2D view window. More... | |
wxPoint | GetScrollPosXY () const |
Conveniently return the positions of both scroll bars in a wxPoint. More... | |
wxPoint | GetScrollRangeXY () const |
Conveniently return the ranges of both scroll bars in a wxPoint. More... | |
wxPoint | GetClientCenter () const |
Returns the center point of the client area of this window. More... | |
wxPoint | WindowToTool (const wxPoint &p) const |
Transforms point p from window to tool coordinates/space. This is the inverse of ToolToWindow(). More... | |
wxPoint | ToolToWindow (const wxPoint &p) const |
Transforms point p from tool to window coordinates/space. This is the inverse of WindowToTool(). More... | |
Vector3fT | ToolToWorld (const wxPoint &p, float Third) const |
Transforms point p from tool to world coordinates/space. This is the inverse of WorldToTool(). The value for the third axis of the returned vector is set to Third. More... | |
wxPoint | WorldToTool (const Vector3fT &v) const |
Transforms vector v from world to tool coordinates/space. This is the inverse of ToolToWorld(). More... | |
Vector3fT | WindowToWorld (const wxPoint &p, float Third) const |
Transforms point p from window to world coordinates/space. This is the inverse of WorldToWindow(), and equivalent to calling ToolToWorld(WindowToTool(p)). The value for the third axis of the returned vector is set to Third. More... | |
wxPoint | WorldToWindow (const Vector3fT &v) const |
Transforms vector v from world to window coordinates/space. This is the inverse of WindowToWorld(), and equivalent to calling ToolToWindow(WorldToTool(p)). More... | |
Public Member Functions inherited from ViewWindowT | |
void | NotifySubjectDies (SubjectT *dyingSubject) |
This method is called whenever a subject is about the be destroyed (and become unavailable). More... | |
wxString | GetCaption () const |
Returns the caption that the AUI pane for this window should have. More... | |
ChildFrameT * | GetChildFrame () const |
Returns the child frame that owns this view (that is, our parent). More... | |
MapDocumentT & | GetMapDoc () const |
The document that is associated with this view window (or more precisely, our child frame). More... | |
Public Member Functions inherited from ObserverT | |
virtual void | NotifySubjectChanged_Groups (SubjectT *Subject) |
Notifies the observer that the groups in the current subject have been changed (new group added, group deleted, visibility changed, anything). More... | |
virtual | ~ObserverT () |
The virtual destructor. More... | |
Public Member Functions inherited from ToolsObserverT | |
virtual | ~ToolsObserverT () |
The virtual destructor. More... | |
Static Public Member Functions | |
static bool | RectIsIntersected (const wxRect &Rect, const wxPoint &A, const wxPoint &B) |
Determines whether the given rectangle Rect is intersected by the line segment through points A and B. More... | |
Additional Inherited Members | |
Public Types inherited from ViewWindowT | |
enum | ViewTypeT { VT_2D_XY, VT_2D_XZ, VT_2D_YZ, VT_3D_WIREFRAME, VT_3D_FLAT, VT_3D_EDIT_MATS, VT_3D_FULL_MATS, VT_3D_LM_GRID, VT_3D_LM_PREVIEW } |
Protected Member Functions inherited from ViewWindowT | |
ViewWindowT (ChildFrameT *ChildFrame) | |
The constructor. It is protected because only child classes should ever be instantiated. More... | |
virtual | ~ViewWindowT () |
The destructor. Virtual such that also the child destructors will be called. More... | |
void | UpdateChildFrameMRU () |
Protected Member Functions inherited from ObserverT | |
ObserverT () | |
The constructor. It is protected so that only derived classes can create instances of this class. More... | |
Protected Member Functions inherited from ToolsObserverT | |
ToolsObserverT () | |
The constructor. It is protected so that only derived classes can create instances of this class. More... | |
Protected Attributes inherited from ViewWindowT | |
ChildFrameT * | m_ChildFrame |
The child frame that owns us (that is, is our parent). More... | |
ViewWindow2DT::ViewWindow2DT | ( | wxWindow * | Parent, |
ChildFrameT * | ChildFrame, | ||
ViewTypeT | InitialViewType | ||
) |
The constructor.
|
inlinevirtual |
This method returns the axes info for this window. In the case of a 3D window, it computes the 2D axes info that this view is closest to.
Implements ViewWindowT.
|
inline |
Returns the center point of the client area of this window.
ArrayT< MapElementT * > ViewWindow2DT::GetElementsAt | ( | const wxPoint & | Pixel, |
int | Radius = 3 |
||
) | const |
This method returns all visible map elements at the given pixel in the 2D view window.
More precisely, all visible map elements that intersect the disc centered around Pixel with radius Radius are returned.
Pixel | The pixel in window coordinates for which the map elements are to be found. |
Radius | The error tolerance around Pixel within which map elements also count as "at Pixel". |
|
inline |
Conveniently return the positions of both scroll bars in a wxPoint.
|
inline |
Conveniently return the ranges of both scroll bars in a wxPoint.
|
inlinevirtual |
Returns the view type of this view window.
Implements ViewWindowT.
|
virtual |
This function is not const because we can mutate this(!) object via the returned pointer.
Implements ViewWindowT.
|
virtual |
Subject | The map document in which the entities have been modified. |
Entities | List of modified map entities. |
Detail | Information about what has been modified. |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that a variable has changed.
Subject | The map document in which a variable has changed. |
Var | The variable whose value has changed. |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that some other detail than those specifically addressed below has changed.
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that the current subject has been changed.
Subject | The tools (tool manager) in which something has changed. |
Tool | The specific tool that has changed. |
Priority | The priority with which the update should be implemented. |
Reimplemented from ToolsObserverT.
|
virtual |
Notifies the observer that one or more entities have been created.
Subject | The map document in which the entities have been created. |
Entities | List of created entities. |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that one or more map primitives have been created.
Subject | The map document in which the primitives have been created. |
Primitives | List of created map primitives. |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that one or more entities have been deleted.
Subject | The map document in which the entities have been deleted. |
Entities | List of deleted entities. |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that one or more map primitives have been deleted.
Subject | The map document in which the primitives have been deleted. |
Primitives | List of deleted map primitives. |
Reimplemented from ObserverT.
|
virtual |
Subject | The map document in which the elements have been modified. |
MapElements | List of modified map elements. |
Detail | Information about what has been modified: Can be one of MEMD_PRIMITIVE_PROPS_CHANGED, MEMD_GENERIC, MEMD_ASSIGN_PRIM_TO_ENTITY and MEMD_MATERIAL_CHANGED. |
Reimplemented from ObserverT.
|
virtual |
Subject | The map document in which the elements have been modified. |
MapElements | List of modified map elements. |
Detail | Information about what has been modified: Can be MEMD_TRANSFORM or MEMD_PRIMITIVE_PROPS_CHANGED. In the case of MEMD_PRIMITIVE_PROPS_CHANGED one can assume that only map primitives (no entities) are in the MapElements array. |
OldBounds | Holds the bounds of each objects BEFORE the modification (has the same size as MapElements). |
Reimplemented from ObserverT.
|
virtual |
Notifies the observer that the selection in the current subject has been changed.
Subject | The map document in which the selection has been changed. |
OldSelection | Array of the previously selected objects. |
NewSelection | Array of the new selected objects. |
Reimplemented from ObserverT.
|
static |
Determines whether the given rectangle Rect is intersected by the line segment through points A and B.
wxPoint ViewWindow2DT::ToolToWindow | ( | const wxPoint & | p | ) | const |
Transforms point p from tool to window coordinates/space. This is the inverse of WindowToTool().
Vector3fT ViewWindow2DT::ToolToWorld | ( | const wxPoint & | p, |
float | Third | ||
) | const |
Transforms point p from tool to world coordinates/space. This is the inverse of WorldToTool(). The value for the third axis of the returned vector is set to Third.
wxPoint ViewWindow2DT::WindowToTool | ( | const wxPoint & | p | ) | const |
Transforms point p from window to tool coordinates/space. This is the inverse of ToolToWindow().
Vector3fT ViewWindow2DT::WindowToWorld | ( | const wxPoint & | p, |
float | Third | ||
) | const |
Transforms point p from window to world coordinates/space. This is the inverse of WorldToWindow(), and equivalent to calling ToolToWorld(WindowToTool(p)). The value for the third axis of the returned vector is set to Third.
wxPoint ViewWindow2DT::WorldToTool | ( | const Vector3fT & | v | ) | const |
Transforms vector v from world to tool coordinates/space. This is the inverse of ToolToWorld().
wxPoint ViewWindow2DT::WorldToWindow | ( | const Vector3fT & | v | ) | const |
Transforms vector v from world to window coordinates/space. This is the inverse of WindowToWorld(), and equivalent to calling ToolToWindow(WorldToTool(p)).