Skip to main content

Post-processing tools 2025 R1

GLTFLegend

Last update: 16.07.2025
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_GLTFLEGEND__
14#define __INCLUDED_GLTF_GLTFLEGEND__
15
16#include "GLTFCommon.h"
17#include "GLTFObject.h"
18
19namespace ANSYS { namespace AVZ { namespace GLTFWriter {
20 class GLTF;
21 class Texture;
22
26 class Legend : public Object
27 {
28 public:
55
56 protected:
57 virtual ~Legend() {}
58
59 public:
62 static GLTFWRITERSPEC Legend *Create(GLTF *gltf,
63 LegendOrientation orientation,
64 float size,
65 Texture *texture,
66 float mn,
67 float mx,
69 const char *title = 0,
70 const char *units = 0,
71 const char *other = 0,
72 unsigned int numTicks = 0,
73 const float *valueLocations = 0,
74 bool border = false,
75 bool logarithmic = false,
76 float x = 0,
77 float y = 0,
78 float foregroundR = 0,
79 float foregroundG = 0,
80 float foregroundB = 0,
81 float backgroundR = 1,
82 float backgroundG = 1,
83 float backgroundB = 1,
84 float backgroundA = 0
85 );
86 };
87
88} } }
89
90#endif
This is the main class of the GLTFWriter.
Definition GLTFGLTF.h:32
Legends are colored bars with numbers at intervals along bar.
Definition GLTFLegend.h:27
@ LO_HORIZONTAL
Left to right.
Definition GLTFLegend.h:33
@ LA_XRIGHT_Y
Use y location and attach to right.
Definition GLTFLegend.h:46
@ LA_X_YTOP
Use x location and attach to top.
Definition GLTFLegend.h:40
@ LA_X_YBOTTOM
use x location and attach to bottom.
Definition GLTFLegend.h:39
@ LA_XLEFT_YTOP
Attach to left top corner.
Definition GLTFLegend.h:44
@ LA_XRIGHT_YBOTTOM
Attach to right bottom corner.
Definition GLTFLegend.h:47
@ LA_X_YCENTER
Use x location and position at vertical center.
Definition GLTFLegend.h:41
@ LA_XCENTER_YCENTER
Position at center.
Definition GLTFLegend.h:53
@ LA_XRIGHT_YTOP
Attach to right top corner.
Definition GLTFLegend.h:48
@ LA_X_Y
Use specified x and y location.
Definition GLTFLegend.h:38
@ LA_XLEFT_Y
Use y location and attach to left.
Definition GLTFLegend.h:42
@ LA_XCENTER_YBOTTOM
Attach to bottom and position at horizontal center.
Definition GLTFLegend.h:51
@ LA_XLEFT_YCENTER
Attach to left and position at vertical center (popular).
Definition GLTFLegend.h:45
@ LA_XCENTER_YTOP
Attach to top and position at horizontal center.
Definition GLTFLegend.h:52
@ LA_XCENTER_Y
Use y location and position at horizontal center.
Definition GLTFLegend.h:50
@ LA_XRIGHT_YCENTER
Attach to right and position at vertical center.
Definition GLTFLegend.h:49
@ LA_XLEFT_YBOTTOM
Attach to left bottom corner.
Definition GLTFLegend.h:43
static Legend * Create(GLTF *gltf, LegendOrientation orientation, float size, Texture *texture, float mn, float mx, LegendAttachment attachment=LA_XLEFT_YCENTER, const char *title=0, const char *units=0, const char *other=0, unsigned int numTicks=0, const float *valueLocations=0, bool border=false, bool logarithmic=false, float x=0, float y=0, float foregroundR=0, float foregroundG=0, float foregroundB=0, float backgroundR=1, float backgroundG=1, float backgroundB=1, float backgroundA=0)
Textures are images that can be used to color a primitive.
Definition GLTFTexture.h:28
GLTFWriter API Documentation.

Connect with Ansys