Cafu Engine
ViewWindow3DT Class Reference
Inheritance diagram for ViewWindow3DT:

Classes

struct  HitInfoT
 This struct describes a hit (an intersection of a map element with a view ray through a given pixel) as returned by the GetElementsAt() method. More...
 

Public Member Functions

 ViewWindow3DT (wxWindow *Parent, ChildFrameT *ChildFrame, CameraT *InitialCamera, ViewTypeT InitialViewType)
 The constructor. 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...
 
ArrayT< HitInfoTGetElementsAt (const wxPoint &Pixel) const
 This method returns visible all map elements at a given pixel in the 3D view window. More...
 
- Public Member Functions inherited from Generic3DWindowT
 Generic3DWindowT (wxWindow *Parent, CameraT *InitialCamera)
 The constructor. More...
 
 ~Generic3DWindowT ()
 The destructor. More...
 
AxesInfoT GetAxesInfo () const
 Returns the set of axes that the camera orientation is currently the closest to. More...
 
const CameraTGetCamera () const
 Returns the camera that is currently associated with this window. More...
 
void SetCamera (CameraT *Camera)
 Sets Camera as the new camera to use for this window. More...
 
void MoveCamera (const Vector3fT &NewPos)
 Moves the camera that is currently associated with this window to the given new position. More...
 
void ProcessInput (float FrameTime)
 Processes the user input for the (last) frame with the given duration and updates the camera accordingly. More...
 
const MouseControlTGetMouseControl () const
 Returns the mouse control instance of this window. More...
 
void GetViewFrustum (Plane3fT *Planes, unsigned int NumPlanes=6) const
 Returns the view frustum for this window, based on its current window dimensions and camera setting. More...
 
Vector3fT WindowToWorld (const wxPoint &Pixel) const
 Transforms (unprojects) the given pixel from window space to the related point in world space. More...
 
wxPoint WorldToWindow (const Vector3fT &v, bool CheckFrustum) const
 Transforms (projects) the given point from world space to the related pixel in the 3D window. 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...
 
ChildFrameTGetChildFrame () const
 Returns the child frame that owns this view (that is, our parent). More...
 
MapDocumentTGetMapDoc () 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 (SubjectT *Subject, MapDocOtherDetailT OtherDetail)
 Notifies the observer that some other detail than those specifically addressed below has changed. More...
 
virtual 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...
 
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 void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been created. More...
 
virtual void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been created. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been deleted. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been deleted. More...
 
virtual ~ObserverT ()
 The virtual destructor. More...
 
virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail)
 
virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail, const ArrayT< BoundingBox3fT > &OldBounds)
 
virtual void Notify_EntChanged (SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail)
 
virtual void Notify_VarChanged (SubjectT *Subject, const cf::TypeSys::VarBaseT &Var)
 Notifies the observer that a variable has changed. More...
 
- Public Member Functions inherited from ToolsObserverT
virtual ~ToolsObserverT ()
 The virtual destructor. 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
ChildFrameTm_ChildFrame
 The child frame that owns us (that is, is our parent). More...
 

Constructor & Destructor Documentation

ViewWindow3DT::ViewWindow3DT ( wxWindow *  Parent,
ChildFrameT ChildFrame,
CameraT InitialCamera,
ViewTypeT  InitialViewType 
)

The constructor.

Member Function Documentation

AxesInfoT ViewWindow3DT::GetAxesInfo ( ) const
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.

ArrayT< ViewWindow3DT::HitInfoT > ViewWindow3DT::GetElementsAt ( const wxPoint &  Pixel) const

This method returns visible all map elements at a given pixel in the 3D view window.

Parameters
PixelThe pixel in window coordinates for which the map elements are to be found.
Returns
The array of visible map elements that intersect the ray from the camera position through the pixel. The elements are returned in front-to-back order, i.e. the nearest object is at array index 0.
ViewTypeT ViewWindow3DT::GetViewType ( ) const
inlinevirtual

Returns the view type of this view window.

Implements ViewWindowT.

wxWindow * ViewWindow3DT::GetWindow ( )
virtual

This function is not const because we can mutate this(!) object via the returned pointer.

Implements ViewWindowT.

void ViewWindow3DT::NotifySubjectChanged ( ToolsSubjectT Subject,
ToolT Tool,
ToolsUpdatePriorityT  Priority 
)
virtual

Notifies the observer that the current subject has been changed.

Parameters
SubjectThe tools (tool manager) in which something has changed.
ToolThe specific tool that has changed.
PriorityThe priority with which the update should be implemented.

Reimplemented from ToolsObserverT.


The documentation for this class was generated from the following files: