Skip to main content

Post-processing tools 2023 R2

GLTFLegend.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_GLTFLEGEND__
14 #define __INCLUDED_GLTF_GLTFLEGEND__
15 
16 #include "GLTFCommon.h"
17 #include "GLTFObject.h"
18 
19 namespace ANSYS { namespace Nexus { namespace GLTFWriter {
20  class GLTF;
21  class Texture;
22 
26  class Legend : public Object
27  {
28  public:
31  {
34  };
37  {
38  LA_X_Y = 0,
40  LA_X_YTOP = 2,
42  LA_XLEFT_Y = 4,
50  LA_XCENTER_Y = 12,
53  LA_XCENTER_YCENTER = 15
54  };
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,
68  LegendAttachment attachment = LA_XLEFT_YCENTER,
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
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)
@ LA_XLEFT_YBOTTOM
Attach to left bottom corner.
Definition: GLTFLegend.h:43
@ LA_XCENTER_YBOTTOM
Attach to bottom and position at horizontal center.
Definition: GLTFLegend.h:51
@ LA_X_Y
Use specified x and y location.
Definition: GLTFLegend.h:38
@ LA_XRIGHT_YBOTTOM
Attach to right bottom corner.
Definition: GLTFLegend.h:47
@ LA_XRIGHT_YTOP
Attach to right top corner.
Definition: GLTFLegend.h:48
@ LA_XCENTER_YCENTER
Position at center.
Definition: GLTFLegend.h:53
@ LA_XCENTER_YTOP
Attach to top and position at horizontal center.
Definition: GLTFLegend.h:52
@ LA_X_YBOTTOM
use x location and attach to bottom.
Definition: GLTFLegend.h:39
@ LA_XRIGHT_YCENTER
Attach to right and position at vertical center.
Definition: GLTFLegend.h:49
@ LA_X_YCENTER
Use x location and position at vertical center.
Definition: GLTFLegend.h:41
@ LA_XCENTER_Y
Use y location and position at horizontal center.
Definition: GLTFLegend.h:50
@ LA_X_YTOP
Use x location and attach to top.
Definition: GLTFLegend.h:40
@ LA_XLEFT_YCENTER
Attach to left and position at vertical center (popular).
Definition: GLTFLegend.h:45
@ LA_XRIGHT_Y
Use y location and attach to right.
Definition: GLTFLegend.h:46
@ LA_XLEFT_YTOP
Attach to left top corner.
Definition: GLTFLegend.h:44
@ LA_XLEFT_Y
Use y location and attach to left.
Definition: GLTFLegend.h:42
Textures are images that can be used to color a primitive.
Definition: GLTFTexture.h:28
GLTFWriter API Documentation.
Definition: GLTFAnimation.h:19