Skip to main content

Post-processing tools 2023 R2

GLTFSampler.h

Last update: 17.04.2023
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_GLTFSAMPLER__
14 #define __INCLUDED_GLTF_GLTFSAMPLER__
15 
16 #include "GLTFCommon.h"
17 #include "GLTFObject.h"
18 
19 namespace ANSYS { namespace Nexus { namespace GLTFWriter {
20  class GLTF;
21 
25  class Sampler : public Object
26  {
27  public:
30  {
31  FT_NEAREST = 9728,
32  FT_LINEAR = 9729,
37  };
39  enum WrapType
40  {
41  WT_REPEAT = 10497,
42  WT_CLAMP_TO_EDGE = 33071,
43  WT_MIRRORED_REPEAT = 33648
44  };
45 
46  protected:
47  virtual ~Sampler() {}
48 
49  public:
52  static GLTFWRITERSPEC Sampler *Create(GLTF *gltf,
53  FilterType minFilter,
54  FilterType magFilter,
55  WrapType wrapS,
56  WrapType wrapT
57  );
58  };
59 
60 } } }
61 
62 #endif
This is the main class of the GLTFWriter.
Definition: GLTFGLTF.h:32
Samplers define how values are generated from textures with the give texture coordinates.
Definition: GLTFSampler.h:26
@ WT_REPEAT
Fractional value of texture coordinate is used.
Definition: GLTFSampler.h:41
@ WT_CLAMP_TO_EDGE
0 is used for texture coordinates < 0 and 1 is used for texture coordinates > 1.
Definition: GLTFSampler.h:42
@ WT_MIRRORED_REPEAT
fractional value of texture coordinate is used, but value alternates going from 0 to 1 and [1 - (0 to...
Definition: GLTFSampler.h:43
static Sampler * Create(GLTF *gltf, FilterType minFilter, FilterType magFilter, WrapType wrapS, WrapType wrapT)
@ FT_NEAREST_MIPMAP_NEAREST
Choose nearest texel in nearest mipmap.
Definition: GLTFSampler.h:33
@ FT_LINEAR
Linearly interpolate between the two nearest texels.
Definition: GLTFSampler.h:32
@ FT_NEAREST
Choose nearest texel.
Definition: GLTFSampler.h:31
@ FT_LINEAR_MIPMAP_NEAREST
Linearly interpolate between the two nearest texels of the nearest mipmap.
Definition: GLTFSampler.h:34
@ FT_LINEAR_MIPMAP_LINEAR
Linearly interpolate between the two nearest texels in the linearly interpolated mipmap between two n...
Definition: GLTFSampler.h:36
@ FT_NEAREST_MIPMAP_LINEAR
Choose nearest texel in linearly interpolated mipmap between two nearest mipmaps.
Definition: GLTFSampler.h:35
GLTFWriter API Documentation.
Definition: GLTFAnimation.h:19