    

 ## 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 Nexus { 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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml) class [Primitive](class_a_n_s_y_s_1_1_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6e) enum [PrimitiveType](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6e)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<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_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11df4feba37de4d685aeae70c7fd8326) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11df4feba37de4d685aeae70c7fd8326)([GLTF](class_a_n_s_y_s_1_1_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6e) type, 

<a id="l00068" name="l00068"></a> 68 [Material](class_a_n_s_y_s_1_1_nexus_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_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a90a91be1411edce0ec44ab8002ccede2) GLTFWRITERSPEC virtual [Primitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Mirror](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a90a91be1411edce0ec44ab8002ccede2)() = 0;

<a id="l00078" name="l00078"></a>[ 78](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a4aae56e343ac5130d42416d2ee4c52e3) GLTFWRITERSPEC virtual bool [AppendAttribute](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a4aae56e343ac5130d42416d2ee4c52e3)([Attribute](class_a_n_s_y_s_1_1_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#add9ffa3fec2126a5fe2e97af79a0d18c) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create2DTexture](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#add9ffa3fec2126a5fe2e97af79a0d18c)([GLTF](class_a_n_s_y_s_1_1_nexus_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_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951) xAttach = [PXA\_LEFT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951a6dc9b18bbe43f04ff6744a5111f0a4a3), 

<a id="l00087" name="l00087"></a> 87 [PrimitiveYAttachment](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbba) yAttach = [PYA\_CENTER](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbbaa55629dea10122996e3ff9915fb6658ba) 

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

<a id="l00091" name="l00091"></a>[ 91](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac23767f8ef91c2257e6709dddd826b0c) static GLTFWRITERSPEC [Primitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml) *[Create2DTexture](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac23767f8ef91c2257e6709dddd826b0c)([GLTF](class_a_n_s_y_s_1_1_nexus_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_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml) class [Mesh](class_a_n_s_y_s_1_1_nexus_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_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#ad935a7b33a66d524c7faf16a112172a0) static GLTFWRITERSPEC [Mesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml) *[Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#ad935a7b33a66d524c7faf16a112172a0)([GLTF](class_a_n_s_y_s_1_1_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a08098aae96b7cda9f553a39d2b2fe7ed) GLTFWRITERSPEC virtual [Mesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml) *[Mirror](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a08098aae96b7cda9f553a39d2b2fe7ed)() = 0;

<a id="l00118" name="l00118"></a>[ 118](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a392eddd58e41d83d7df11e7e48ed4798) GLTFWRITERSPEC virtual bool [AppendPrimitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a392eddd58e41d83d7df11e7e48ed4798)([Primitive](class_a_n_s_y_s_1_1_nexus_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_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a7a41d9defdfdbec047d4c1aaff3a3a77) GLTFWRITERSPEC virtual unsigned int [NumPrimitives](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a7a41d9defdfdbec047d4c1aaff3a3a77)() 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::Nexus::GLTFWriter::Attribute](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::GLTF](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::Index](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::Material](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::Mesh](class_a_n_s_y_s_1_1_nexus_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](_g_l_t_f_mesh_8h_source.xhtml#l00103)



[ANSYS::Nexus::GLTFWriter::Mesh::Mirror](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a08098aae96b7cda9f553a39d2b2fe7ed)

virtual Mesh * Mirror()=0



[ANSYS::Nexus::GLTFWriter::Mesh::AppendPrimitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a392eddd58e41d83d7df11e7e48ed4798)

virtual bool AppendPrimitive(Primitive *primitive)=0



[ANSYS::Nexus::GLTFWriter::Mesh::NumPrimitives](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a7a41d9defdfdbec047d4c1aaff3a3a77)

virtual unsigned int NumPrimitives() const =0



[ANSYS::Nexus::GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#ad935a7b33a66d524c7faf16a112172a0)

static Mesh * Create(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::Primitive](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml)

Primitives are the renderable parts of meshes.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PrimitiveType](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6e)

PrimitiveType

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_POINTS](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea0774f687d37a015adb12a7c57f157190)

@ PT_POINTS

Treats each vertex as a single point.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_LINES](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea58ccc160090e6c9189f73c4644e66c0e)

@ PT_LINES

Treats each pair of vertices as an independent line segment.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_LINE\_STRIP](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea5b76ec80fb7d96f1aa4dbc5a136929a6)

@ PT_LINE_STRIP

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

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_TRIANGLES](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea85ba263ad510a4b423c5e1452fd5ca7d)

@ PT_TRIANGLES

Treats each triplet of vertices as an independent triangle.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_TRIANGLE\_FAN](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea9188d6dcf0e77ae8346e0211f1996320)

@ PT_TRIANGLE_FAN

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

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_LINE\_LOOP](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6eaf50567675c73731765f0fc37183b1691)

@ 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](_g_l_t_f_mesh_8h_source.xhtml#l00037)



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_TRIANGLE\_STRIP](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6eafc347f454c2be56abecc316154511956)

@ PT_TRIANGLE_STRIP

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

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



[ANSYS::Nexus::GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11df4feba37de4d685aeae70c7fd8326)

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



[ANSYS::Nexus::GLTFWriter::Primitive::PrimitiveYAttachment](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbba)

PrimitiveYAttachment

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



[ANSYS::Nexus::GLTFWriter::Primitive::PYA\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbbaa2247ad1da9dfef04911a51657c3163d8)

@ PYA_NONE

Use Y location.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PYA\_BOTTOM](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbbaa447716243f146a5606c2366e068a997e)

@ PYA_BOTTOM

Anchor at bottom edge.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PYA\_CENTER](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbbaa55629dea10122996e3ff9915fb6658ba)

@ PYA_CENTER

Center in vertical direction.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PYA\_TOP](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a1537dd0f96086f101b67ad7f8640cbbaa7b6fa012e0f07cb84f0e05345174f93d)

@ PYA_TOP

Anchor at top edge.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PrimitiveXAttachment](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951)

PrimitiveXAttachment

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



[ANSYS::Nexus::GLTFWriter::Primitive::PXA\_RIGHT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951a2711064b0fe78b1e55fd2741e18bf68d)

@ PXA_RIGHT

Anchor at right edge.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PXA\_CENTER](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951a51f4037d8a135dab3589f9a28e53282a)

@ PXA_CENTER

Center in horizontal direction.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PXA\_LEFT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951a6dc9b18bbe43f04ff6744a5111f0a4a3)

@ PXA_LEFT

Anchor at left edge.

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



[ANSYS::Nexus::GLTFWriter::Primitive::PXA\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a3c17546f3d50b4462d11df6819f93951ae5e474e4fe7bb28e1ad2acbbc41fa6b8)

@ PXA_NONE

Use X location.

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



[ANSYS::Nexus::GLTFWriter::Primitive::AppendAttribute](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a4aae56e343ac5130d42416d2ee4c52e3)

virtual bool AppendAttribute(Attribute *attribute)=0



[ANSYS::Nexus::GLTFWriter::Primitive::Mirror](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a90a91be1411edce0ec44ab8002ccede2)

virtual Primitive * Mirror()=0



[ANSYS::Nexus::GLTFWriter::Primitive::Create2DTexture](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#ac23767f8ef91c2257e6709dddd826b0c)

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



[ANSYS::Nexus::GLTFWriter::Primitive::Create2DTexture](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#add9ffa3fec2126a5fe2e97af79a0d18c)

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



[ANSYS::Nexus::GLTFWriter::Texture](class_a_n_s_y_s_1_1_nexus_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)