Skip to main content

Post-processing tools 2023 R2

ANSYS::Nexus::GLTFWriter::Camera Class Reference

Last update: 17.04.2023

Cameras define an orthographic or perspective projection of the scene. More...

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::Nexus::GLTFWriter::Camera:

Static Public Member Functions

static CameraCreateOrthographic (GLTF *gltf, const char *name=0, float xmag=1, float ymag=1, float zfar=1000, float znear=-1000)
 
static CameraCreatePerspective (GLTF *gltf, const char *name=0, float yfov=22.619864948, float aspectRatio=1, float zfar=100000, float znear=0.1)
 

Detailed Description

Cameras define an orthographic or perspective projection of the scene.

At the moment, the GLTF Viewer only cares whether the camera is Orthographic or Perspective. No camera properties are used.

Definition at line 27 of file GLTFCamera.h.

Member Function Documentation

◆ CreateOrthographic()

static Camera* ANSYS::Nexus::GLTFWriter::Camera::CreateOrthographic ( GLTF gltf,
const char *  name = 0,
float  xmag = 1,
float  ymag = 1,
float  zfar = 1000,
float  znear = -1000 
)
static

Creates an orthographic camera.

Returns
Camera object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]nameOptional, name of camera.
[in]xmagOptional, magnification in x direction (not currently used).
[in]ymagOptional, magnification in y direction (not currently used).
[in]zfarOptional, far clipping plane (not currently used).
[in]znearOptional, near clipping plane (not currently used).
Examples
Test001.cpp, Test006.cpp, Test009.cpp, Test013.cpp, and Test014.cpp.

◆ CreatePerspective()

static Camera* ANSYS::Nexus::GLTFWriter::Camera::CreatePerspective ( GLTF gltf,
const char *  name = 0,
float  yfov = 22.619864948,
float  aspectRatio = 1,
float  zfar = 100000,
float  znear = 0.1 
)
static

Creates a perspective camera.

Returns
Camera object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]nameOptional, name of camera.
[in]yfovOptional, vertical field of view in degrees (not currently used).
[in]aspectRatioOptional, aspect ratio of field of view (height to width)(not currently used).
[in]zfarOptional, far clipping plane (not currently used).
[in]znearOptional, near clipping plane (not currently used).
Examples
Test004.cpp, Test007.cpp, Test008.cpp, and Test012.cpp.

The documentation for this class was generated from the following file:
  • D:/ANSYSDev/NoBackup/branches/EnSight-Second-Coming/webgl_viewer/gltfwriterlib/include/GLTFCamera.h