    

 ## On this page

  

 

 # GLTFMesh

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1/\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00003" name="l00003"></a> 3 \* 

<a id="l00004" name="l00004"></a> 4 \* Restricted Rights Legend

<a id="l00005" name="l00005"></a> 5 \*

<a id="l00006" name="l00006"></a> 6 \* Use, duplication, or disclosure of this

<a id="l00007" name="l00007"></a> 7 \* software and its documentation by the

<a id="l00008" name="l00008"></a> 8 \* Government is subject to restrictions as

<a id="l00009" name="l00009"></a> 9 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00010" name="l00010"></a> 10 \* the Rights in Technical Data and Computer

<a id="l00011" name="l00011"></a> 11 \* Software clause at 52.227-7013.

<a id="l00012" name="l00012"></a> 12 \*/

<a id="l00013" name="l00013"></a> 13\#ifndef \_\_INCLUDED\_GLTF\_GLTFMESH\_\_

<a id="l00014" name="l00014"></a> 14\#define \_\_INCLUDED\_GLTF\_GLTFMESH\_\_

<a id="l00015" name="l00015"></a> 15 

<a id="l00016" name="l00016"></a> 16\#include "GLTFCommon.h"

<a id="l00017" name="l00017"></a> 17\#include "GLTFObject.h"

<a id="l00018" name="l00018"></a> 18 

<a id="l00019" name="l00019"></a> 19namespace [ANSYS](namespace_a_n_s_y_s.xhtml) { namespace AVZ { namespace GLTFWriter {

<a id="l00020" name="l00020"></a> 20 class GLTF;

<a id="l00021" name="l00021"></a> 21 class Attribute;

<a id="l00022" name="l00022"></a> 22 class Index;

<a id="l00023" name="l00023"></a> 23 class Material;

<a id="l00024" name="l00024"></a> 24 class Texture;

<a id="l00025" name="l00025"></a> 25 

<a id="l00029" name="l00029"></a>[ 29](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) class [Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) : public Object

<a id="l00030" name="l00030"></a> 30 {

<a id="l00031" name="l00031"></a> 31 public:

<a id="l00033" name="l00033"></a>[ 33](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4) enum [PrimitiveType](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4)

<a id="l00034" name="l00034"></a> 34 {

<a id="l00035" name="l00035"></a>[ 35](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a95e6aea5112aa769b9c43fa3c349505f) [PT\_POINTS](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a95e6aea5112aa769b9c43fa3c349505f) = 0, 

<a id="l00036" name="l00036"></a>[ 36](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a89e1e2f0c3fe025afc49a1e98ea2fdbd) [PT\_LINES](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a89e1e2f0c3fe025afc49a1e98ea2fdbd) = 1, 

<a id="l00037" name="l00037"></a>[ 37](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4aba3df38ab933b4d3255ee4dacde9ef3b) [PT\_LINE\_LOOP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4aba3df38ab933b4d3255ee4dacde9ef3b) = 2, 

<a id="l00038" name="l00038"></a>[ 38](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4adb7a8ae1a83c97c993464252ad279508) [PT\_LINE\_STRIP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4adb7a8ae1a83c97c993464252ad279508) = 3, 

<a id="l00039" name="l00039"></a>[ 39](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4af8fcc308305daa83626bb3f99db765ec) [PT\_TRIANGLES](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4af8fcc308305daa83626bb3f99db765ec) = 4, 

<a id="l00040" name="l00040"></a>[ 40](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0c9543813e61c03f7e6577b955b5c17a) [PT\_TRIANGLE\_STRIP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0c9543813e61c03f7e6577b955b5c17a) = 5, 

<a id="l00041" name="l00041"></a> 41 [PT\_TRIANGLE\_FAN](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0d7958ad650c51bb5739997f5ea811ea) = 6 

<a id="l00042" name="l00042"></a>[ 42](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0d7958ad650c51bb5739997f5ea811ea) };



<a id="l00044" name="l00044"></a>[ 44](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3) enum [PrimitiveXAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3)

<a id="l00045" name="l00045"></a> 45 {

<a id="l00046" name="l00046"></a>[ 46](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3aa1f292328c1e11fb9c0fe9d4db490203) [PXA\_NONE](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3aa1f292328c1e11fb9c0fe9d4db490203), 

<a id="l00047" name="l00047"></a>[ 47](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a76b4339ef078d64069add735f11211e2) [PXA\_LEFT](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a76b4339ef078d64069add735f11211e2), 

<a id="l00048" name="l00048"></a>[ 48](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a30709b70bb01cddc1b77a72dcd0d6b8a) [PXA\_CENTER](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a30709b70bb01cddc1b77a72dcd0d6b8a), 

<a id="l00049" name="l00049"></a> 49 [PXA\_RIGHT](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a9f9cc3d3886e3256146dfb791caf8a94) 

<a id="l00050" name="l00050"></a>[ 50](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a9f9cc3d3886e3256146dfb791caf8a94) };



<a id="l00052" name="l00052"></a>[ 52](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630) enum [PrimitiveYAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630)

<a id="l00053" name="l00053"></a> 53 {

<a id="l00054" name="l00054"></a>[ 54](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a76645cbe2504d5fdd8fa90a42fda4a60) [PYA\_NONE](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a76645cbe2504d5fdd8fa90a42fda4a60), 

<a id="l00055" name="l00055"></a>[ 55](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a78b797fae1a3c0c66968f8ada8bad1dc) [PYA\_BOTTOM](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a78b797fae1a3c0c66968f8ada8bad1dc), 

<a id="l00056" name="l00056"></a>[ 56](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a836973d99444ff6026dabdd0a1f00914) [PYA\_CENTER](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a836973d99444ff6026dabdd0a1f00914), 

<a id="l00057" name="l00057"></a> 57 [PYA\_TOP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a6014dff136c854ddecb3d7467f9bb9b7) 

<a id="l00058" name="l00058"></a>[ 58](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a6014dff136c854ddecb3d7467f9bb9b7) };



<a id="l00059" name="l00059"></a> 59 

<a id="l00060" name="l00060"></a> 60 protected:

<a id="l00061" name="l00061"></a> 61 virtual [~Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml)() {}

<a id="l00062" name="l00062"></a> 62 

<a id="l00063" name="l00063"></a> 63 public:

<a id="l00066" name="l00066"></a>[ 66](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a820abd4cd03bf5ad7f674ded6e2897b2) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a820abd4cd03bf5ad7f674ded6e2897b2)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00067" name="l00067"></a> 67 [PrimitiveType](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4) type, 

<a id="l00068" name="l00068"></a> 68 [Material](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_material.xhtml) *material, 

<a id="l00069" name="l00069"></a> 69 [Index](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_index.xhtml) *indices = 0, 

<a id="l00070" name="l00070"></a> 70 bool isPickable = true 

<a id="l00071" name="l00071"></a> 71 );

<a id="l00072" name="l00072"></a> 72 

<a id="l00075" name="l00075"></a>[ 75](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a515b63672c547b93bf2870492c2935b9) GLTFWRITERSPEC virtual [Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Mirror](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a515b63672c547b93bf2870492c2935b9)() = 0;

<a id="l00078" name="l00078"></a>[ 78](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac4144b4cc35eec9c11b07cc7352d209e) GLTFWRITERSPEC virtual bool [AppendAttribute](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac4144b4cc35eec9c11b07cc7352d209e)([Attribute](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_attribute.xhtml) *attribute 

<a id="l00079" name="l00079"></a> 79 ) = 0;

<a id="l00082" name="l00082"></a>[ 82](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a9c7040d8f3c75565c06dd941f39951a7) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create2DTexture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a9c7040d8f3c75565c06dd941f39951a7)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00083" name="l00083"></a> 83 [Texture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_texture.xhtml) *texture, 

<a id="l00084" name="l00084"></a> 84 float width, 

<a id="l00085" name="l00085"></a> 85 float height, 

<a id="l00086" name="l00086"></a> 86 [PrimitiveXAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3) xAttach = [PXA\_LEFT](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a76b4339ef078d64069add735f11211e2), 

<a id="l00087" name="l00087"></a> 87 [PrimitiveYAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630) yAttach = [PYA\_CENTER](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a836973d99444ff6026dabdd0a1f00914) 

<a id="l00088" name="l00088"></a> 88 );

<a id="l00091" name="l00091"></a>[ 91](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a8516211fcdfa34ab16d1bd32db79b05a) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create2DTexture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a8516211fcdfa34ab16d1bd32db79b05a)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00092" name="l00092"></a> 92 [Texture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_texture.xhtml) *texture, 

<a id="l00093" name="l00093"></a> 93 float width, 

<a id="l00094" name="l00094"></a> 94 float height, 

<a id="l00095" name="l00095"></a> 95 float x = 0, 

<a id="l00096" name="l00096"></a> 96 float y = 0 

<a id="l00097" name="l00097"></a> 97 );

<a id="l00098" name="l00098"></a> 98 };



<a id="l00099" name="l00099"></a> 99 

<a id="l00103" name="l00103"></a>[ 103](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml) class [Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml) : public Object

<a id="l00104" name="l00104"></a> 104 {

<a id="l00105" name="l00105"></a> 105 protected:

<a id="l00106" name="l00106"></a> 106 virtual [~Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml)() {}

<a id="l00107" name="l00107"></a> 107 

<a id="l00108" name="l00108"></a> 108 public:

<a id="l00111" name="l00111"></a>[ 111](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f325ebe1494b6ad46408e2662b4b3a9) static GLTFWRITERSPEC [Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml) *[Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f325ebe1494b6ad46408e2662b4b3a9)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf 

<a id="l00112" name="l00112"></a> 112 );

<a id="l00113" name="l00113"></a> 113 

<a id="l00116" name="l00116"></a>[ 116](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#abc1d86f77217e6e69f1c46e0cad98dab) GLTFWRITERSPEC virtual [Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml) *[Mirror](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#abc1d86f77217e6e69f1c46e0cad98dab)() = 0;

<a id="l00118" name="l00118"></a>[ 118](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#afb99ec25e2eebb4390c17f8770e4c23b) GLTFWRITERSPEC virtual bool [AppendPrimitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#afb99ec25e2eebb4390c17f8770e4c23b)([Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *primitive 

<a id="l00119" name="l00119"></a> 119 ) = 0;

<a id="l00122" name="l00122"></a>[ 122](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a74f246801f130a94e799e47e9b3cf644) GLTFWRITERSPEC virtual unsigned int [NumPrimitives](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a74f246801f130a94e799e47e9b3cf644)() const = 0;

<a id="l00123" name="l00123"></a> 123 };



<a id="l00124" name="l00124"></a> 124 

<a id="l00125" name="l00125"></a> 125} } }

<a id="l00126" name="l00126"></a> 126 

<a id="l00127" name="l00127"></a> 127\#endif

[ANSYS::AVZ::GLTFWriter::Attribute](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_attribute.xhtml)

Attributes define the per element index values for elements defined by Index.

**Definition** [GLTFAttribute.h:32](_g_l_t_f_attribute_8h_source.xhtml#l00031)



[ANSYS::AVZ::GLTFWriter::GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml)

This is the main class of the GLTFWriter.

**Definition** [GLTFGLTF.h:32](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00031)



[ANSYS::AVZ::GLTFWriter::Index](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_index.xhtml)

Indexes define elements within primitives.

**Definition** [GLTFIndex.h:29](_g_l_t_f_index_8h_source.xhtml#l00028)



[ANSYS::AVZ::GLTFWriter::Material](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_material.xhtml)

Materials describe how primitives are rendered.

**Definition** [GLTFMaterial.h:30](_g_l_t_f_material_8h_source.xhtml#l00029)



[ANSYS::AVZ::GLTFWriter::Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml)

Meshes define the renderable objects that can be added to a node.

**Definition** [GLTFMesh.h:104](#l00103)



[ANSYS::AVZ::GLTFWriter::Mesh::NumPrimitives](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a74f246801f130a94e799e47e9b3cf644)

virtual unsigned int NumPrimitives() const =0



[ANSYS::AVZ::GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f325ebe1494b6ad46408e2662b4b3a9)

static Mesh * Create(GLTF *gltf)



[ANSYS::AVZ::GLTFWriter::Mesh::Mirror](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#abc1d86f77217e6e69f1c46e0cad98dab)

virtual Mesh * Mirror()=0



[ANSYS::AVZ::GLTFWriter::Mesh::AppendPrimitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml#afb99ec25e2eebb4390c17f8770e4c23b)

virtual bool AppendPrimitive(Primitive *primitive)=0



[ANSYS::AVZ::GLTFWriter::Primitive](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml)

Primitives are the renderable parts of meshes.

**Definition** [GLTFMesh.h:30](#l00029)



[ANSYS::AVZ::GLTFWriter::Primitive::PrimitiveYAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630)

PrimitiveYAttachment

**Definition** [GLTFMesh.h:53](#l00052)



[ANSYS::AVZ::GLTFWriter::Primitive::PYA\_TOP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a6014dff136c854ddecb3d7467f9bb9b7)

@ PYA_TOP

Anchor at top edge.

**Definition** [GLTFMesh.h:57](#l00058)



[ANSYS::AVZ::GLTFWriter::Primitive::PYA\_NONE](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a76645cbe2504d5fdd8fa90a42fda4a60)

@ PYA_NONE

Use Y location.

**Definition** [GLTFMesh.h:54](#l00054)



[ANSYS::AVZ::GLTFWriter::Primitive::PYA\_BOTTOM](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a78b797fae1a3c0c66968f8ada8bad1dc)

@ PYA_BOTTOM

Anchor at bottom edge.

**Definition** [GLTFMesh.h:55](#l00055)



[ANSYS::AVZ::GLTFWriter::Primitive::PYA\_CENTER](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a36714c9888001092a6e68480e3066630a836973d99444ff6026dabdd0a1f00914)

@ PYA_CENTER

Center in vertical direction.

**Definition** [GLTFMesh.h:56](#l00056)



[ANSYS::AVZ::GLTFWriter::Primitive::Mirror](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a515b63672c547b93bf2870492c2935b9)

virtual Primitive * Mirror()=0



[ANSYS::AVZ::GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a820abd4cd03bf5ad7f674ded6e2897b2)

static Primitive * Create(GLTF *gltf, PrimitiveType type, Material *material, Index *indices=0, bool isPickable=true)



[ANSYS::AVZ::GLTFWriter::Primitive::Create2DTexture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a8516211fcdfa34ab16d1bd32db79b05a)

static Primitive * Create2DTexture(GLTF *gltf, Texture *texture, float width, float height, float x=0, float y=0)



[ANSYS::AVZ::GLTFWriter::Primitive::Create2DTexture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a9c7040d8f3c75565c06dd941f39951a7)

static Primitive * Create2DTexture(GLTF *gltf, Texture *texture, float width, float height, PrimitiveXAttachment xAttach=PXA_LEFT, PrimitiveYAttachment yAttach=PYA_CENTER)



[ANSYS::AVZ::GLTFWriter::Primitive::PrimitiveType](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4)

PrimitiveType

**Definition** [GLTFMesh.h:34](#l00033)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_TRIANGLE\_STRIP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0c9543813e61c03f7e6577b955b5c17a)

@ PT_TRIANGLE_STRIP

Draws a connected group of triangles. One triangle is defined for each vertex presented after the fir...

**Definition** [GLTFMesh.h:40](#l00040)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_TRIANGLE\_FAN](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a0d7958ad650c51bb5739997f5ea811ea)

@ PT_TRIANGLE_FAN

Draws a connected group of triangles. One triangle is defined for each vertex presented after the fir...

**Definition** [GLTFMesh.h:41](#l00042)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_LINES](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a89e1e2f0c3fe025afc49a1e98ea2fdbd)

@ PT_LINES

Treats each pair of vertices as an independent line segment.

**Definition** [GLTFMesh.h:36](#l00036)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_POINTS](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4a95e6aea5112aa769b9c43fa3c349505f)

@ PT_POINTS

Treats each vertex as a single point.

**Definition** [GLTFMesh.h:35](#l00035)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_LINE\_LOOP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4aba3df38ab933b4d3255ee4dacde9ef3b)

@ PT_LINE_LOOP

Draws a connected group of line segments from the first vertex to the last, then back to the first.

**Definition** [GLTFMesh.h:37](#l00037)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_LINE\_STRIP](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4adb7a8ae1a83c97c993464252ad279508)

@ PT_LINE_STRIP

Draws a connected group of line segments from the first vertex to the last.

**Definition** [GLTFMesh.h:38](#l00038)



[ANSYS::AVZ::GLTFWriter::Primitive::PT\_TRIANGLES](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ab399de95ea5e67c28e173936dcd913d4af8fcc308305daa83626bb3f99db765ec)

@ PT_TRIANGLES

Treats each triplet of vertices as an independent triangle.

**Definition** [GLTFMesh.h:39](#l00039)



[ANSYS::AVZ::GLTFWriter::Primitive::AppendAttribute](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac4144b4cc35eec9c11b07cc7352d209e)

virtual bool AppendAttribute(Attribute *attribute)=0



[ANSYS::AVZ::GLTFWriter::Primitive::PrimitiveXAttachment](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3)

PrimitiveXAttachment

**Definition** [GLTFMesh.h:45](#l00044)



[ANSYS::AVZ::GLTFWriter::Primitive::PXA\_CENTER](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a30709b70bb01cddc1b77a72dcd0d6b8a)

@ PXA_CENTER

Center in horizontal direction.

**Definition** [GLTFMesh.h:48](#l00048)



[ANSYS::AVZ::GLTFWriter::Primitive::PXA\_LEFT](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a76b4339ef078d64069add735f11211e2)

@ PXA_LEFT

Anchor at left edge.

**Definition** [GLTFMesh.h:47](#l00047)



[ANSYS::AVZ::GLTFWriter::Primitive::PXA\_RIGHT](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3a9f9cc3d3886e3256146dfb791caf8a94)

@ PXA_RIGHT

Anchor at right edge.

**Definition** [GLTFMesh.h:49](#l00050)



[ANSYS::AVZ::GLTFWriter::Primitive::PXA\_NONE](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ad30effec5df3eb5e3726ce8a39c2a5a3aa1f292328c1e11fb9c0fe9d4db490203)

@ PXA_NONE

Use X location.

**Definition** [GLTFMesh.h:46](#l00046)



[ANSYS::AVZ::GLTFWriter::Texture](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_texture.xhtml)

Textures are images that can be used to color a primitive.

**Definition** [GLTFTexture.h:28](_g_l_t_f_texture_8h_source.xhtml#l00027)



[ANSYS](namespace_a_n_s_y_s.xhtml)

GLTFWriter API Documentation.

**Definition** [GLTFAnimation.h:19](_g_l_t_f_animation_8h_source.xhtml#l00019)