Skip to main content

Post-processing tools 2023 R2

ANSYS::Nexus::GLTFWriter::Sampler Class Reference

Last update: 17.04.2023

Samplers define how values are generated from textures with the give texture coordinates. More...

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::Nexus::GLTFWriter::Sampler:

Public Types

enum  FilterType {
  FT_NEAREST = 9728 , FT_LINEAR = 9729 , FT_NEAREST_MIPMAP_NEAREST = 9984 , FT_LINEAR_MIPMAP_NEAREST = 9985 ,
  FT_NEAREST_MIPMAP_LINEAR = 9986 , FT_LINEAR_MIPMAP_LINEAR = 9987
}
 
enum  WrapType { WT_REPEAT = 10497 , WT_CLAMP_TO_EDGE = 33071 , WT_MIRRORED_REPEAT = 33648 }
 

Static Public Member Functions

static SamplerCreate (GLTF *gltf, FilterType minFilter, FilterType magFilter, WrapType wrapS, WrapType wrapT)
 

Detailed Description

Samplers define how values are generated from textures with the give texture coordinates.

Definition at line 25 of file GLTFSampler.h.

Member Enumeration Documentation

◆ FilterType

Describes how the texel color is calculated from the texture map given the texture coordinates.

Enumerator
FT_NEAREST 

Choose nearest texel.

FT_LINEAR 

Linearly interpolate between the two nearest texels.

FT_NEAREST_MIPMAP_NEAREST 

Choose nearest texel in nearest mipmap.

FT_LINEAR_MIPMAP_NEAREST 

Linearly interpolate between the two nearest texels of the nearest mipmap.

FT_NEAREST_MIPMAP_LINEAR 

Choose nearest texel in linearly interpolated mipmap between two nearest mipmaps.

FT_LINEAR_MIPMAP_LINEAR 

Linearly interpolate between the two nearest texels in the linearly interpolated mipmap between two nearest mipmaps.

Definition at line 29 of file GLTFSampler.h.

◆ WrapType

Describes how texture coordinates wrap.

Enumerator
WT_REPEAT 

Fractional value of texture coordinate is used.

WT_CLAMP_TO_EDGE 

0 is used for texture coordinates < 0 and 1 is used for texture coordinates > 1.

WT_MIRRORED_REPEAT 

fractional value of texture coordinate is used, but value alternates going from 0 to 1 and [1 - (0 to 1)]

Definition at line 39 of file GLTFSampler.h.

Member Function Documentation

◆ Create()

static Sampler* ANSYS::Nexus::GLTFWriter::Sampler::Create ( GLTF gltf,
FilterType  minFilter,
FilterType  magFilter,
WrapType  wrapS,
WrapType  wrapT 
)
static

Creates a sampler.

Returns
Sampler object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]minFilterSampler::FilterType describing how the texel color is calculated from the texture map given the texture coordinates. A minFilter is used when the texture coordinate covers an area larger than a texture texel.
[in]magFilterSampler::FilterType describing how the texel color is calculated from the texture map given the texture coordinates. A magFilter is used when the texture coordinate covers an area smaller than a texture texel. Possible values are:
  • FT_NEAREST
  • FT_LINEAR
[in]wrapSSampler::WrapType describing how texture coordinates wrap. This is the S texture coordinate (like X). Textures are always accessed with values that range from 0 to 1. This describes how texture coordinates outside this range are handled.
[in]wrapTSampler::WrapType see wrapS. This is the T texture coordinate (like Y).

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