Cumulia Illustrator Rendering Engine v1.0.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
viewmatrix.h
1//##################################################################################################
2//
3// Copyright (c) 2024 Beijing Qiongqi Tech Co.,Ltd. All rights reserved.
4
5// This source code is confidential and proprietary to Beijing Qiongqi Tech Co.,Ltd(The Holder).
6// Any unauthorized use, copying, modification, or distribution of the code is strictly prohibited.
7// Any user shall obtain authorizaition from the Holder before modifying the source code. And the user shall not
8// sublicense, sell, distribute, or transfer the source code, whether in original or modified form, to any third party
9// without the prior written consent of the Holder.
10
11// This copyright notice and permission grant shall be included in all copies or substantial portions of the source code.
12
13// Author Cumulia Illustrator
14// Date 2024-05-01
15// Version V1.0.0
16//##################################################################################################
17
18#pragma once
19
20#include <memory>
21
22namespace cil
23{
24 class Vector3f;
25 class Matrix4f;
26
28 struct ViewSpec {
29 std::shared_ptr<Vector3f> right;
30 std::shared_ptr<Vector3f> up;
31 std::shared_ptr<Vector3f> dir;
32 std::shared_ptr<Vector3f> eye;
33 };
34
40
45 void setViewSpec(Matrix4f& matrix, const ViewSpec& viewSpec);
46
47 void lookAt(Matrix4f& viewMatrix, const Vector3f& eye, const Vector3f& vrp, const Vector3f& up);
48}
The Matrix4f class is 4 X 4 matrix.
Definition matrix.h:226
The class Vector3f inherits from the templated class of Vector3, and the template parameters are spec...
Definition vector.h:322
Definition decal.h:23
ViewSpec getViewSpec(const Matrix4f &matrix)
Gets the ViewSpec vectors from a specified matrix.
void setViewSpec(Matrix4f &matrix, const ViewSpec &viewSpec)
Sets the ViewSpec to the matrix, It can change the matrix elements.
void lookAt(Matrix4f &viewMatrix, const Vector3f &eye, const Vector3f &vrp, const Vector3f &up)
Define a structure objec ViewSpec consisting of four member variables, which correspond to 3D vectors...
Definition viewmatrix.h:28
std::shared_ptr< Vector3f > right
Definition viewmatrix.h:29
std::shared_ptr< Vector3f > eye
Definition viewmatrix.h:32
std::shared_ptr< Vector3f > up
Definition viewmatrix.h:30
std::shared_ptr< Vector3f > dir
Definition viewmatrix.h:31