Skip to main content

Post-processing tools 2024 R1

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

Last update: 16.07.2025

#include <GLTFWriter.h>

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

Static Public Member Functions

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

Detailed Description

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

Examples
Test001.cpp, Test004.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test012.cpp, Test013.cpp, and Test014.cpp.

Definition at line 27 of file GLTFCamera.h.

Constructor & Destructor Documentation

◆ ~Camera()

virtual ANSYS::Nexus::GLTFWriter::Camera::~Camera ( )
inlineprotectedvirtual

Definition at line 30 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).

◆ 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).

The documentation for this class was generated from the following file:
  • D:/Product-src/webgl_viewer/gltfwriterlib/include/GLTFCamera.h

Connect with Ansys