GL Studio API
gls_nine_patch.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::GlsNinePatch class.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2015 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd., Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef _GLS_NINE_PATCH_H
41 #define _GLS_NINE_PATCH_H
42 #include "glpolygon.h"
43 #include "gls_cpp_lang_support.h"
44 
45 #ifdef GLES
46 #include "gls_vertex_array.h"
47 #include "gls_index_array.h"
48 #else
49 #include "gls_display_list.h"
50 #endif
51 
52 //////////////////// Provides support for creating DLLs ////////////////////////
53 #if (defined(GLSGEN_EXPORT_GLSNINEPATCH) || \
54  defined(GLSGEN_IMPORT_GLSNINEPATCH) || \
55  defined(GLS_EXPORT_GENERATED) || \
56  defined(GLS_IMPORT_GENERATED)) \
57  && defined(_MSC_VER)
58 # if defined(GLSGEN_EXPORT_GLSNINEPATCH) || defined(GLS_EXPORT_GENERATED)
59 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec(dllexport)
60 # else
61 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec(dllimport)
62 # endif
63 #else
64 # define GLSGEN_GLSNINEPATCH_EXPORT
65 #endif
66 ///////////////////////////////////////////////////////////////////////////////
67 
68 #define LIB_BASE_NAME "gls_nine_patch"
69 #include "gls_auto_lib.h"
70 #undef LIB_BASE_NAME
71 
72 namespace disti
73 {
74 
75 // SetValue enumerations
76 enum {
77  GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
78  GLS_NINE_PATCH_CENTER_VISIBLE,
79  GLS_NINE_PATCH_EDGES,
80  GLS_NINE_PATCH_TEXTURE_EDGES,
81  GLS_NINE_PATCH_RADII,
82  GLS_NINE_PATCH_TEXTURE_POINTS,
83  GLS_NINE_PATCH_COLOR,
84  GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
85  };
86 
87 #define GLS_NINE_PATCH_ARRAY_SIZE 16
88 
89 /** Runtime implementation of a GlsNinePatch */
90 class GlsNinePatch : public GLPolygon
91 {
92  friend class GlsNinePatchEditor;
93 
94 private:
95  GlsNinePatch& operator=( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
96  GlsNinePatch( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
97 
98 public:
99  typedef GLPolygon _BaseClass;
100 
101  class Rect3D
102  {
103  public:
104  Vector blc,brc,trc;
105 
106  Rect3D() {};
107  };
108 
109 
110  ///////////////////////////////////////////////////////////////////////////////////////////////
111  //
112  // DisplayObject overrides
113  //
114  ///////////////////////////////////////////////////////////////////////////////////////////////
115  virtual GLSGEN_GLSNINEPATCH_EXPORT void Scale(float px, float py, float pz, Vertex *anchor, int handleBar);
116  virtual GLSGEN_GLSNINEPATCH_EXPORT void Rotate(const Vector &orig,float angle,const Vector &axis);
117  virtual GLSGEN_GLSNINEPATCH_EXPORT bool Hit(float x,float y,float z,float scale, const Vector& directionVector,Vector *collisionPoint);
118  virtual GLSGEN_GLSNINEPATCH_EXPORT Vertex* Vertices();
119  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetExtents(float &minx,float &miny,float &minz, float &maxx,float &maxy,float &maxz);
120  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetTransformedExtents(Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax);
121 
122  /** \overload void DisplayObject::UpdateBoundingVolume(void);
123  */
124  virtual GLSGEN_GLSNINEPATCH_EXPORT void UpdateBoundingVolume(void);
125 
126  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetValue(int spec,va_list &args);
127  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch(bool generateInstance=false);
128  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( const GlsNinePatch& that, const bool generateNames );
129  virtual GLSGEN_GLSNINEPATCH_EXPORT ~GlsNinePatch();
130  static GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CreateInstance();
131  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetAvailableAttributes(unsigned int value);
132  virtual GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CloneObject(bool generateNames = false);
133  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyProperties(DisplayObject *src);
134  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyGeometry(DisplayObject *srcArg);
135 #ifndef GLES
136  virtual GLSGEN_GLSNINEPATCH_EXPORT InterfaceListType* GetCppInterfaceDescription(InterfaceListType* addToThisList= NULL );
137  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetCppInterfaceDescriptionFree(InterfaceListType* array);
138 #endif
139 
140  virtual GLSGEN_GLSNINEPATCH_EXPORT void Calculate(double time);
141 
142 #ifdef GLES
143  virtual GLSGEN_GLSNINEPATCH_EXPORT void PreDraw(const OpenGLMatrices& current, Culler& culler);
144 #endif
145  virtual GLSGEN_GLSNINEPATCH_EXPORT void Draw(void);
146  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetFillColor(const glsColor &color);
147  virtual GLSGEN_GLSNINEPATCH_EXPORT glsColor GetFillColor(void);
148 
149  /** Gets the polygon drawing mode for this object
150  * \return The polygon drawing mode for this object
151  * \sa PolygonMode_e
152  */
153  virtual GLSGEN_GLSNINEPATCH_EXPORT int PolygonMode(void) {return POLY_MODE_FILLED;}
154 
155  /** Sets the polygon drawing mode for this object
156  * \param mode The new polygon drawing mode for this object
157  * \sa PolygonMode_e
158  */
159  virtual GLSGEN_GLSNINEPATCH_EXPORT void PolygonMode(int mode) {} // do nothing
160 
161  typedef enum
162  {
163  FIRST=0,
164  LEFT=0,
165  RIGHT=1,
166  TOP=2,
167  BOTTOM=3,
168  COUNT=4
169  } Edge;
170 
171  /** Set's the texture edge at enum specified by index to the value specified as pixel units.
172  * \param index Refers to the texture edge enumeration that will be modified
173  * \param value The pixel unit(s) assigned to the specificed texture edge enumeration
174  */
175  GLSGEN_GLSNINEPATCH_EXPORT void TextureEdge(Edge index,float value);
176  GLSGEN_GLSNINEPATCH_EXPORT void LeftTextureEdge( float value) { TextureEdge( LEFT, value ); }
177  GLSGEN_GLSNINEPATCH_EXPORT void RightTextureEdge( float value) { TextureEdge( RIGHT, value ); }
178  GLSGEN_GLSNINEPATCH_EXPORT void TopTextureEdge( float value) { TextureEdge( TOP, value ); }
179  GLSGEN_GLSNINEPATCH_EXPORT void BottomTextureEdge( float value) { TextureEdge( BOTTOM, value ); }
180 
181  /** Set's the vertex edge at enum specified by index to the value specified as logical units.
182  * \param index refers to the vertex edge enumeration that will be modified
183  * \param value is the logical unit(s) assigned to the specificed vertex edge enumeration
184  */
185  GLSGEN_GLSNINEPATCH_EXPORT void VertexEdge(Edge index,float value);
186  GLSGEN_GLSNINEPATCH_EXPORT void LeftVertexEdge( float value) { VertexEdge( LEFT, value ); }
187  GLSGEN_GLSNINEPATCH_EXPORT void RightVertexEdge( float value) { VertexEdge( RIGHT, value ); }
188  GLSGEN_GLSNINEPATCH_EXPORT void TopVertexEdge( float value) { VertexEdge( TOP, value ); }
189  GLSGEN_GLSNINEPATCH_EXPORT void BottomVertexEdge( float value) { VertexEdge( BOTTOM, value ); }
190 
191  /** Return the value in pixel units of the TextureEdge given at enumeration specified by index
192  * \param index refers to the edge enumeration that the value will be gotten from
193  * \return A float value in pixel units that corresponds with the respective VertexEdge index/enum.
194  */
195  virtual GLSGEN_GLSNINEPATCH_EXPORT float TextureEdge(Edge index);
196  GLSGEN_GLSNINEPATCH_EXPORT float LeftTextureEdge() { return TextureEdge( LEFT ); }
197  GLSGEN_GLSNINEPATCH_EXPORT float RightTextureEdge() { return TextureEdge( RIGHT ); }
198  GLSGEN_GLSNINEPATCH_EXPORT float TopTextureEdge() { return TextureEdge( TOP ); }
199  GLSGEN_GLSNINEPATCH_EXPORT float BottomTextureEdge() { return TextureEdge( BOTTOM ); }
200 
201  /** Return the value in logical units at the edge enumeration specified by index
202  * \param index refers to the edge enumeration
203  * \return A float value in logical units that corresponds with the respective TextureEdge index/enum.
204  */
205  virtual GLSGEN_GLSNINEPATCH_EXPORT float VertexEdge(Edge index);
206  GLSGEN_GLSNINEPATCH_EXPORT float LeftVertexEdge() { return VertexEdge( LEFT ); }
207  GLSGEN_GLSNINEPATCH_EXPORT float RightVertexEdge() { return VertexEdge( RIGHT ); }
208  GLSGEN_GLSNINEPATCH_EXPORT float TopVertexEdge() { return VertexEdge( TOP ); }
209  GLSGEN_GLSNINEPATCH_EXPORT float BottomVertexEdge() { return VertexEdge( BOTTOM ); }
210 
211  /** Getter function to determine whether or not the center will be drawn
212  * \return True being returned lets the use know that the Center of the NinePatch is visible.
213  */
214  GLSGEN_GLSNINEPATCH_EXPORT bool CenterVisible() { return _centerVisible; }
215 
216  GLSGEN_GLSNINEPATCH_EXPORT void CenterVisible(bool value);
217 
218  /** Sets the radii of the width vector in logical units
219  * \param v Will set the radii's width row's logical values of the glsNinePatch object
220  */
221  GLSGEN_GLSNINEPATCH_EXPORT void WidthVector(const Vector &v);
222 
223  /** Sets the radii of the height vector in logical units
224  * \param v Will set the radii's height row's logical values of the glsNinePatch object
225  */
226  GLSGEN_GLSNINEPATCH_EXPORT void HeightVector(const Vector &v);
227 
228  /** Gets the radii of the width vector in logical units.
229  * \return The width of the NinePatch as a Vector.
230  */
231  GLSGEN_GLSNINEPATCH_EXPORT const Vector WidthVector(void) const { return _radii[0]; }
232 
233  /** Gets the radii of the height vector in logical units.
234  * \return The height of the NinePatch as a Vector.
235  */
236  GLSGEN_GLSNINEPATCH_EXPORT const Vector HeightVector(void) const { return _radii[1]; }
237 
238  /** Setter function for the bottom left corner of the texture in the GlsNinePatch
239  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Bottom Left Corner' vector
240  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Bottom Left Corner' vector
241  */
242  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const float x, const float y );
243  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const Vector& value ) { TextureBLC( value.x, value.y ); }
244 
245  /** Setter function for the top right corner of the texture in the GlsNinePatch
246  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Top Right Corner' vector
247  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Top Right Corner' vector
248  */
249  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const float x, const float y );
250  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const Vector& value ) { TextureTRC( value.x, value.y ); }
251 
252  /** Getter function for the bottom left corner of the texture in the GlsNinePatch
253  * \return Returns the vector in pixel units for the value of the 'Bottom Left Corner'
254  */
255  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureBLC(void) const { return _textureBLC; }
256 
257  /** Getter function for the top right corner of the texture in the GLSNinePatch
258  * \return Returns the vector in pixel units for the value of the 'Top Right Corner'
259  */
260  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureTRC(void) const { return _textureTRC; }
261 
262  /** Setter function for the height of the GlsNinePatch in logical units
263  * \param value sets the height of the GlsNinePatch in the direction of _radii[1]
264  */
265  GLSGEN_GLSNINEPATCH_EXPORT void Height(const float& value);
266  /** Setter function for the width of the GlsNinePatch in logical units
267  * \param value sets the width of the GlsNinePatch in the direction of _radii[0]
268  */
269  GLSGEN_GLSNINEPATCH_EXPORT void Width(const float& value);
270  /** Getter function for the height of the GlsNinePatch in logical units
271  * \return The height of the NinePatch
272  */
273  GLSGEN_GLSNINEPATCH_EXPORT float Height(void) const { return _height; }
274  /** Getter function for the width of the GlsNinePatch in logical units
275  * \return The width of the NinePatch
276  */
277  GLSGEN_GLSNINEPATCH_EXPORT float Width(void) const { return _width; }
278 
279  /** Returns a pointer to the patch vertices*/
280  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vertex* GetPatchVerts();
281 
282  /** Returns a pointer to the texture points*/
283  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vector* GetPatchTex();
284 
285  /** Gets the "child" rectangle. The child rectangle refers to the
286  * inner rectangle of the nine patch, which is where normal content would be drawn
287  */
288  GLSGEN_GLSNINEPATCH_EXPORT Rect3D GetChildRect();
289 
290  /** Sets the reference texture width, which allows the nine patch to respond to changes of texture size.
291  * \param value The reference width of the texture in pixel units
292  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
293  * nine patch will not display will need to be reconfigured by hand. The reference width should
294  * generally be the width of the original texture. It will be automatically updated when image changes
295  * are detected.
296  * \sa ReferenceTextureWidth()
297  */
298 
299  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureWidth(const unsigned int& value);
300  /** Sets the reference texture height, which allows the nine patch to respond to changes of texture size.
301  * \param value The reference height of the texture in pixel units
302  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
303  * nine patch will not display will need to be reconfigured by hand. The reference height should
304  * generally be the height of the original texture. It will be automatically updated when image changes
305  * are detected.
306  * \sa ReferenceTextureHeight()
307  */
308  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureHeight(const unsigned int& value);
309  /** Gets the reference texture width, which allows the nine patch to respond to changes of texture size.
310  * \sa ReferenceTextureWidth()
311  */
312  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureWidth();
313  /** Gets the reference texture height, which allows the nine patch to respond to changes of texture size.
314  * \sa ReferenceTextureHeight()
315  */
316  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureHeight();
317 
318  /** Forces the nine patch to recalculate it's verts and it's texture verts.
319  * \sa ForceRecalculate()
320  */
321  GLSGEN_GLSNINEPATCH_EXPORT void ForceRecalculate();
322 
323 protected:
324 
325  /** Calculate the vertices for the nine patches */
326  void CalculatePatchVerts();
327 
328  /** Calculate the texture coordinates for the nine patches */
329  void CalculateTextureVerts();
330 
331  /** Calculates new values when a texture has been upsized or downsized */
332  void CalculateTextureResize(const int tw, const int th);
333 
334  /** Calculates _width, _height and _normal based on _radii */
335  void CalculateRadiiUnit(void);
336 
337  /** callback called when the 9patch needs to be recalculated */
338  void SetNeedsRecalculate( void );
339 
340  /** callback called when the 9patch texture coordinates need to be recalculated */
341  void SetNeedsTextureRecalculate( void );
342 
343  /** Draws a grid displaying the 9 polygons on top of the image */
344  void DrawGuides(void);
345 
346 #ifdef GLES
347  /** Set a single attribute from the GLO file.
348  * \param data The attribute to set and its associated data.
349  */
350  virtual GLS_EXPORT void SetFromGloData(GlsGloFileAttribute &data);
351 #endif
352 
353 #ifndef GLES
354  /** Helper routine to draws the 9 patches */
355  void DrawPatches(bool texture);
356 
357  /** Performs OpenGL drawing commands */
358  void DrawGeometry(void);
359 #endif
360 
361  /** Array of vertices that defines the NinePatch, arranged as follows:
362  * 12--13---14---15
363  * | | | |
364  * 8----9---10---11
365  * | | | |
366  * 4----5----6----7
367  * | | | |
368  * 0----1----2----3
369  */
370  Vertex _patchVerts[GLS_NINE_PATCH_ARRAY_SIZE];
371 
372  /** Array of texture coordinates, arranged the same way as _patchVerts */
373  Vector _patchTex[GLS_NINE_PATCH_ARRAY_SIZE];
374 
375  /** Radius vectors that define the size of the NinePatch
376  * _radii[0] defines the width
377  * _radii[1] defines the height
378  */
380 
381  Vector _normal; /**< Surface normal of the NinePatch. Computed from the _radii */
382  Vector _textureBLC; /**< Texture coordinate of bottom left corner of NinePatch */
383  Vector _textureTRC; /**< Texture coordinate of top right corner of NinePatch */
384  float _width; /**< Width of the NinePatch in the direction of _radii[0] */
385  float _height; /**< Height of the NinePatch in the direction of _radii[1] */
386 
387  /** Values representing the distance from the edge of the texture that makes up the
388  * NinePatch borders. Units are in pixels and are the distance IN from the edge of the texture.
389  */
390 
391  float _textureEdge[4];
392 
393  /** Values representing the size of edges of the NinePatch. Units are in logical units measure
394  * going IN from the edge of the NinePatch
395  */
396  float _vertexEdge[4];
397 
398  bool _centerVisible; /**< Whether or not the center patch will be drawn */
399  bool _needsRecalculate; /**< True when the vertices need to be recalculated */
400  bool _needsTextureRecalculate; /**< True when the texture coordinates need to be recalculated */
401  bool _guidesVisible; /**< If true, then "guides" will be drawn". Normally only set in the editor */
402  glsColor _objectColor; /**< Fill color is normally stored in vertices, but we're not using these in GlsNinePatch */
403  unsigned int _texWidth; /**< Texture Width */
404  unsigned int _texHeight; /**< Texture Height */
405 
406 #ifdef GLES
407  GlsVertexArray _vertArray;
408  GlsIndexArray _indexArray;
409 #endif
410 
411  unsigned int _referenceTexWidth; /**< Texture Width when the object was configured. Used to correctly adjust for new texture resolutions. */
412  unsigned int _referenceTexHeight; /**< Texture Height when the object was configured. Used to correctly adjust for new texture resolutions. */
413 
414 };
415 
416 } // namespace disti
417 
418 #endif
419 
Definition: cull.h:50
virtual void PolygonMode(int mode)
Definition: gls_nine_patch.h:159
float _height
Definition: gls_nine_patch.h:385
unsigned int _referenceTexHeight
Definition: gls_nine_patch.h:412
virtual void SetFillColor(const glsColor &color)
void SetNeedsTextureRecalculate(void)
Definition: vertex.h:365
virtual void CopyProperties(DisplayObject *src)
Vector _textureTRC
Definition: gls_nine_patch.h:383
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax)
bool _needsRecalculate
Definition: gls_nine_patch.h:399
Definition: dynamic_array.h:63
bool CenterVisible()
Definition: gls_nine_patch.h:214
Vertex _patchVerts[16]
Definition: gls_nine_patch.h:370
virtual glsColor GetFillColor(void)
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:289
void DrawGuides(void)
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)
Vector TextureBLC(void) const
Definition: gls_nine_patch.h:255
Vector _normal
Definition: gls_nine_patch.h:381
virtual int PolygonMode(void)
Definition: gls_nine_patch.h:153
Vector _radii[2]
Definition: gls_nine_patch.h:379
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
bool _needsTextureRecalculate
Definition: gls_nine_patch.h:400
void TextureEdge(Edge index, float value)
Definition: display.h:98
const Vector HeightVector(void) const
Definition: gls_nine_patch.h:236
Vector _patchTex[16]
Definition: gls_nine_patch.h:373
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
The disti::GLPolygon class. Implements Polygons.
virtual void CopyGeometry(DisplayObject *srcArg)
unsigned int _texWidth
Definition: gls_nine_patch.h:403
Vector TextureTRC(void) const
Definition: gls_nine_patch.h:260
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
float _vertexEdge[4]
Definition: gls_nine_patch.h:396
unsigned int ReferenceTextureHeight()
float Height(void) const
Definition: gls_nine_patch.h:273
virtual void Draw(void)
void CalculateTextureResize(const int tw, const int th)
virtual void Calculate(double time)
void DrawPatches(bool texture)
void VertexEdge(Edge index, float value)
void CalculateTextureVerts()
VertexNoColor Vector
Definition: gls_font_base.h:68
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetAvailableAttributes(unsigned int value)
Vector _textureBLC
Definition: gls_nine_patch.h:382
unsigned int _referenceTexWidth
Definition: gls_nine_patch.h:411
Definition: gls_nine_patch.h:90
bool _centerVisible
Definition: gls_nine_patch.h:398
virtual Vertex * Vertices()
The gls_auto_lib.
void SetNeedsRecalculate(void)
Definition: gls_color.h:54
virtual void SetValue(int spec, va_list &args)
float Width(void) const
Definition: gls_nine_patch.h:277
Definition: gls_nine_patch.h:101
float _width
Definition: gls_nine_patch.h:384
void CalculateRadiiUnit(void)
glsColor _objectColor
Definition: gls_nine_patch.h:402
virtual void UpdateBoundingVolume(void)
virtual const Vector * GetPatchTex()
bool _guidesVisible
Definition: gls_nine_patch.h:401
virtual const Vertex * GetPatchVerts()
Definition: vertex.h:84
unsigned int _texHeight
Definition: gls_nine_patch.h:404
Definition: display_types.h:94
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
Macros and helper code to determine what subset of C++11/14/17 is available.
const Vector WidthVector(void) const
Definition: gls_nine_patch.h:231
void DrawGeometry(void)
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
unsigned int ReferenceTextureWidth()
float _textureEdge[4]
Definition: gls_nine_patch.h:391