MaterialX 1.38.2
ViewHandler.h
Go to the documentation of this file.
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_VIEWHANDLER_H
7#define MATERIALX_VIEWHANDLER_H
8
11
12#include <MaterialXCore/Types.h>
13
15
16namespace MaterialX
17{
18
20using ViewHandlerPtr = std::shared_ptr<class ViewHandler>;
21
25class MX_RENDER_API ViewHandler
26{
27 public:
29 {
30 }
31 virtual ~ViewHandler() { }
32
35
37 static ViewHandlerPtr create() { return std::make_shared<ViewHandler>(); }
38
40 static Matrix44 createViewMatrix(const Vector3& eye,
41 const Vector3& target,
42 const Vector3& up);
43
45 static Matrix44 createPerspectiveMatrix(float left, float right,
46 float bottom, float top,
47 float nearP, float farP);
48
50 static Matrix44 createOrthographicMatrix(float left, float right,
51 float bottom, float top,
52 float nearP, float farP);
54
55 public:
56 Matrix44 worldMatrix;
57 Matrix44 viewMatrix;
58 Vector3 viewPosition;
59 Vector3 viewDirection;
60 Matrix44 projectionMatrix;
61};
62
63} // namespace MaterialX
64
65#endif
Data type classes.
Macros for declaring imported and exported symbols.
std::shared_ptr< class ViewHandler > ViewHandlerPtr
Shared pointer to a ViewHandler.
Definition: ViewHandler.h:20
A 4x4 matrix of floating-point values.
Definition: Types.h:676
A vector of three floating-point values.
Definition: Types.h:303
Utility view handler for creating and providing View data for shader binding.
Definition: ViewHandler.h:26
static ViewHandlerPtr create()
Create a new view handler.
Definition: ViewHandler.h:37