Skip to main content

Post-processing tools 2023 R2

ANSYS::Nexus::GLTFWriter::State Class Reference

Last update: 17.04.2023

States are GL state settings. More...

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::Nexus::GLTFWriter::State:

Public Types

enum  StateType {
  ST_UNKNOWN , ST_BLENDENABLE , ST_CULLFACE , ST_CULLFACEENABLE ,
  ST_DEPTHFUNC , ST_DEPTHMASK , ST_DEPTHTESTENABLE , ST_FRONTFACE ,
  ST_LINEWIDTH , ST_POLYGONOFFSET , ST_POLYGONOFFSETFILLENABLE
}
 

Static Public Member Functions

static StateCreate (GLTF *gltf, StateType type, double v1, double v2=0, double v3=0, double v4=0)
 

Detailed Description

States are GL state settings.

Definition at line 155 of file GLTFTechnique.h.

Member Enumeration Documentation

◆ StateType

Type of State.

Enumerator
ST_UNKNOWN 

Bad state.

ST_BLENDENABLE 

Enables blending of fragment colors. Possible values are:

  • 0(default) - FALSE
  • 1 - TRUE
ST_CULLFACE 

Describes which faces to cull. Possible values are:

  • 1028 - FRONT
  • 1029(default) - BACK
  • 1032 - FRONT_AND_BACK
ST_CULLFACEENABLE 

Enables culling of faces. Possible values are:

  • 0(default) - FALSE
  • 1 - TRUE
ST_DEPTHFUNC 

Describes type of depth buffer comparison. Possible values are:

  • 512 - NEVER
  • 513(default) - LESS
  • 514 - EQUAL
  • 515 - LEQUAL
  • 516 - GREATER
  • 517 - NOTEQUAL
  • 518 - GEQUAL
  • 519 - ALWAYS
ST_DEPTHMASK 

Enables writing into the depth buffer. Possible values are:

  • 0 - FALSE
  • 1(default) - TRUE
ST_DEPTHTESTENABLE 

Enables testing of depth buffer. Possible values are:

  • 0(default) - FALSE
  • 1 - TRUE
ST_FRONTFACE 

Describes how to detect front face from vertex ordering. Possible values are:

  • 2304 - CW
  • 2305(default) - CCW
ST_LINEWIDTH 

Defines the width of drawn lines. The value is > 0.0 (Linewidth other than 1.0 is not supported by most WebGL implementations).

ST_POLYGONOFFSET 

Defines the Factor and units for the draw offset of polygons. The first argument is FACTOR which is > 0.0, the second argument is UNITS which is > 0.0.

ST_POLYGONOFFSETFILLENABLE 

Enables polygon offset. Possible values are:

  • 0(default) - FALSE
  • 1 - TRUE

Definition at line 159 of file GLTFTechnique.h.

Member Function Documentation

◆ Create()

static State* ANSYS::Nexus::GLTFWriter::State::Create ( GLTF gltf,
StateType  type,
double  v1,
double  v2 = 0,
double  v3 = 0,
double  v4 = 0 
)
static

Creates a GL State.

Returns
State object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]typeState::StateType defining type of state to create
[in]v1Value of state that require one or more values.
[in]v2Optional, value for states that require two or more values.
[in]v3Optional, value for states that require three or more values.
[in]v4Optional, value for states that require four values.
Examples
Test002.cpp, Test005.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test013.cpp, and Test014.cpp.

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