Skip to main content

Post-processing tools 2025 R1

GLTFCamera

Last update: 16.07.2025
1/*
2 * Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3 *
4 * Restricted Rights Legend
5 *
6 * Use, duplication, or disclosure of this
7 * software and its documentation by the
8 * Government is subject to restrictions as
9 * set forth in subdivision [(b)(3)(ii)] of
10 * the Rights in Technical Data and Computer
11 * Software clause at 52.227-7013.
12 */
13#ifndef __INCLUDED_GLTF_GLTFCAMERA__
14#define __INCLUDED_GLTF_GLTFCAMERA__
15
16#include "GLTFCommon.h"
17#include "GLTFObject.h"
18
19namespace ANSYS { namespace AVZ { namespace GLTFWriter {
20 class GLTF;
21
27 class Camera : public Object
28 {
29 protected:
30 virtual ~Camera() {}
31
32 public:
35 static GLTFWRITERSPEC Camera *CreateOrthographic(GLTF *gltf,
36 const char *name = 0,
37 float xmag = 1,
38 float ymag = 1,
39 float zfar = 1000,
40 float znear = -1000
41 );
44 static GLTFWRITERSPEC Camera *CreatePerspective(GLTF *gltf,
45 const char *name = 0,
46 float yfov = 22.619864948,
47 float aspectRatio = 1,
48 float zfar = 100000,
49 float znear = 0.1
50 );
51 };
52
53} } }
54
55#endif
Cameras define an orthographic or perspective projection of the scene.
Definition GLTFCamera.h:28
static Camera * CreatePerspective(GLTF *gltf, const char *name=0, float yfov=22.619864948, float aspectRatio=1, float zfar=100000, float znear=0.1)
static Camera * CreateOrthographic(GLTF *gltf, const char *name=0, float xmag=1, float ymag=1, float zfar=1000, float znear=-1000)
This is the main class of the GLTFWriter.
Definition GLTFGLTF.h:32
GLTFWriter API Documentation.

Connect with Ansys