Torque3D Documentation / _generateds / IDisplayDevice.h

IDisplayDevice.h

Engine/source/platform/output/IDisplayDevice.h

More...

Classes:

class

Defines the basic display pose common to most display devices.

Detailed Description

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _IDISPLAYDEVICE_H_
25#define _IDISPLAYDEVICE_H_
26
27#include "console/consoleTypes.h"
28
29class GameConnection;
30class GuiCanvas;
31
32// Defines a custom display device that requires particular rendering settings
33// in order for a scene to display correctly.
34
35/// Defines the basic display pose common to most display devices
36typedef struct DisplayPose
37{
38   EulerF orientation;  /// Direction device is facing
39   Point3F position;    /// Relative position of device in view space
40} IDevicePose;
41
42class IDisplayDevice
43{
44public:
45   virtual bool providesFrameEyePose() const = 0;
46   virtual void getFrameEyePose(IDevicePose *pose, U32 eye) const = 0;
47
48   virtual bool providesEyeOffsets() const = 0;
49   /// Returns eye offset not taking into account any position tracking info
50   virtual void getEyeOffsets(Point3F *dest) const = 0;
51
52   virtual bool providesFovPorts() const = 0;
53   virtual void getFovPorts(FovPort *out) const = 0;
54
55   virtual bool providesProjectionOffset() const = 0;
56   virtual const Point2F& getProjectionOffset() const = 0;
57
58   virtual void getStereoViewports(RectI *out) const = 0;
59   virtual void getStereoTargets(GFXTextureTarget **out) const = 0;
60
61   virtual void setDrawCanvas(GuiCanvas *canvas) = 0;
62
63   virtual void setCurrentConnection(GameConnection *connection) = 0;
64   virtual GameConnection* getCurrentConnection() = 0;
65
66   virtual void onStartFrame() = 0;
67};
68
69#endif   // _IDISPLAYDEVICE_H_
70