18 class UIViewportDelegate;
Definition Camera.hpp:247
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUDevice.hpp:357
An object that represents a graphics context.
Definition GraphicsContext.hpp:45
A templated UIViewController sub-class that specializes it for a specific view type.
Definition UIViewController.hpp:292
TUIViewController(Args &&... args)
Creates a new TUIViewController and instantiates a new view of type ViewType by passing args to the v...
Definition UIViewController.hpp:306
Definition UIUtility.hpp:114
Represents a gizmo that can be used to move 3D objects on a 2D viewport.
Definition UIGizmo.hpp:27
A UIViewController sub-class that uses a typed represented object.
Definition UIViewController.hpp:332
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
static const UIRect kDefaultFrame
A rectangle that represents the default frame set by a view without an explicit frame.
Definition UIView.hpp:296
A delegate class for UIViewport.
Definition UIViewport.hpp:184
virtual void willRecreateRenderTarget(UIViewport &view, const GPUImagePtr &oldImage, const UISize &newSize)
Notifies the delegate when the viewport view is about to recreate its render target image.
Definition UIViewport.hpp:196
virtual bool shouldRecreateRenderTarget(UIViewport &view, const GPUImagePtr &oldImage, const UISize &newSize)
Allows the delegate to decide if the render target image should be recreated.
Definition UIViewport.hpp:190
virtual void didRecreateRenderTarget(UIViewport &view)
Notifies the delegate when the viewport view has to recreated its render target image.
Definition UIViewport.hpp:200
Definition UIViewport.hpp:21
void lookAt(const Vector3 &point)
Orientates the viewport camera to look at the given point.
Vector3 convertToWorld(const UIPoint &point) const
void mouseMoved(const UIMouseEvent &event) override
Informs the receiver that the mouse has moved.
void setContinuousRedraw(bool continuousRedraw)
If set to true, the viewport will continuously redraw even if the backing camera wasn't redrawn.
const Vector3 & getPosition() const
Determines the position of the viewport camera.
AffineTransform getRenderTargetToBackingTransform() const
void draw(UIGraphicsContext &context, const UIRect &dirtyRect) override
Overridden by subclasses to draw the view's texture within the specified rectangle.
Vector3 unproject(const UIPoint &point, double z) const
GPUDevice & mDevice
The device to create the viewport render target on.
Definition UIViewport.hpp:27
const HScene & getScene() const noexcept
The scene to be displayed on the viewport.
Definition UIViewport.hpp:77
void scrollWheel(const UIMouseEvent &event) override
Informs the receiver that the mouse's scroll wheel has moved.
GPUImagePtr mImage
A pointer to the backing image that the scene is drawn to.
Definition UIViewport.hpp:37
void keyDown(const UIKeyEvent &event) override
Informs the receiver that the user has pressed a key.
struct CeresEngine::UIViewport::@63 delegate
UIGizmo * mGizmo
Definition UIViewport.hpp:45
UIDelegate< UIViewport, void(const GPUImagePtr &oldImage, const UISize &newSize)> willRecreateRenderTarget
Notifies the delegate when the viewport view is about to recreate its render target image.
Definition UIViewport.hpp:60
SceneObject mTrackingObject
Definition UIViewport.hpp:46
UIDelegate< UIViewport, bool(const GPUImagePtr &oldImage, const UISize &newSize)> shouldRecreateRenderTarget
Allows the delegate to decide if the render target image should be recreated.
Definition UIViewport.hpp:54
UIPoint convertFromWorld(const Vector3 &position) const
void setPosition(const Vector3 &position) const
Determines the position of the viewport camera.
void didChangeBounds(const UIRect &bounds) override
Called whenever the view bounds changes, either internally or programmatically by calls to setBounds.
HScene mScene
The scene to be displayed on the viewport.
Definition UIViewport.hpp:24
AffineTransform getWindowToRenderTargetTransform() const
GPUTexturePtr mTexture
Definition UIViewport.hpp:39
void didMoveToWindow(UIWindow *window) override
Informs the view that it has been added to a new view hierarchy.
bool acceptsFirstResponder() const override
A Boolean value that indicates whether the responder accepts first responder status.
Definition UIViewport.hpp:151
void lookAt(const SceneObject &sceneObject)
Orientates the viewport camera to look at the given SceneObject.
const Quaternion & getOrientation() const
Determines the orientation of the viewport camera.
SceneObject mParentSO
A parent scene object the camera is attached to.
Definition UIViewport.hpp:31
UIViewport(GPUDevice &device, const HScene &scene)
Definition UIViewport.hpp:68
void setZoom(double zoom)
Determines the zoom level of the viewport camera.
void setOrientation(const Quaternion &quaternion) const
Determines the orientation of the viewport camera.
AffineTransform getTransformToRenderTarget() const
The AffineTransform that transforms from the local view coordinate-space to the render target coordin...
void setScene(const HScene &scene)
The scene to be displayed on the viewport.
AffineTransform getRenderTargetToWindowTransform() const
AffineTransform getTransformFromRenderTarget() const
The AffineTransform that transforms from the render target coordinate-space to the local view coordin...
AffineTransform getBackingToRenderTargetTransform() const
bool getContinuousRedraw() const noexcept
If set to true, the viewport will continuously redraw even if the backing camera wasn't redrawn.
Definition UIViewport.hpp:107
void didMoveToSuperView(UIView *superView) override
Informs the view that its superview has changed (possibly to nil).
bool getClearsContextBeforeDrawing() const noexcept override
A Boolean value that determines whether the view's bounds should be automatically cleared before draw...
Definition UIViewport.hpp:140
const Camera & getCamera() const noexcept
An internal handle to the camera that renders the viewport.
Definition UIViewport.hpp:74
double getZoom() const
Determines the zoom level of the viewport camera.
void rightMouseDragged(const UIMouseEvent &event) override
Informs the receiver that the user has moved the mouse with the left button pressed.
void recreateRenderTarget()
Recreates the render target texture for the viewport.
void otherMouseDragged(const UIMouseEvent &event) override
Informs the receiver that the user has moved the mouse with the left button pressed.
Camera mCamera
An internal handle to the camera that renders the viewport.
Definition UIViewport.hpp:34
UIDelegate< UIViewport, void()> didRecreateRenderTarget
Notifies the delegate when the viewport view has to recreated its render target image.
Definition UIViewport.hpp:64
void mouseDown(const UIMouseEvent &event) override
Informs the receiver that the user has pressed the left mouse button.
bool mContinuousRedraw
If set to true, the viewport will continuously redraw even if the backing camera wasn't redrawn.
Definition UIViewport.hpp:43
void mouseDragged(const UIMouseEvent &event) override
Informs the receiver that the user has moved the mouse with the left button pressed.
void mouseUp(const UIMouseEvent &event) override
Informs the receiver that the user has released the left mouse button.
UIViewport(const UIRect &frame, GPUDevice &device, const HScene &scene)
Definition UIViewport.hpp:203
void loadView(UIViewport &viewport) override
Instantiates a view.
A window that an app displays on the screen.
Definition UIWindow.hpp:42
Definition Application.hpp:19
Size2 UISize
A type that contains width and height values.
Definition UIUtility.hpp:30
SPtr< GPUTexture > GPUTexturePtr
Definition Forward.hpp:19
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
Point2 UIPoint
A type that contains a point in a two-dimensional coordinate system.
Definition UIUtility.hpp:27
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition UIEvent.hpp:129
Definition UIEvent.hpp:173