GL Studio C++ Runtime 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) 2017 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_index_array.h"
47 # include "gls_vertex_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 ) || defined( GLSGEN_IMPORT_GLSNINEPATCH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54  && defined( _MSC_VER )
55 # if defined( GLSGEN_EXPORT_GLSNINEPATCH ) || defined( GLS_EXPORT_GENERATED )
56 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllexport )
57 # else
58 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllimport )
59 # endif
60 #else
61 # define GLSGEN_GLSNINEPATCH_EXPORT
62 #endif
63 ///////////////////////////////////////////////////////////////////////////////
64 
65 #define LIB_BASE_NAME "gls_nine_patch"
66 #include "gls_auto_lib.h"
67 #undef LIB_BASE_NAME
68 
69 namespace disti
70 {
71 // SetValue enumerations
72 enum
73 {
74  GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
75  GLS_NINE_PATCH_CENTER_VISIBLE,
76  GLS_NINE_PATCH_EDGES,
77  GLS_NINE_PATCH_TEXTURE_EDGES,
78  GLS_NINE_PATCH_RADII,
79  GLS_NINE_PATCH_TEXTURE_POINTS,
80  GLS_NINE_PATCH_COLOR,
81  GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
82 };
83 
84 #define GLS_NINE_PATCH_ARRAY_SIZE 16
85 
86 /** Runtime implementation of a GlsNinePatch */
87 class GlsNinePatch : public GLPolygon
88 {
89  friend class GlsNinePatchEditor;
90 
91 private:
92  GlsNinePatch& operator=( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
93  GlsNinePatch( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
94 
95 public:
96  DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
97  typedef GLPolygon _BaseClass;
98  typedef GLPolygon BaseClass;
99 
100  class Rect3D
101  {
102  public:
103  Vector blc, brc, trc;
104 
105  Rect3D(){};
106  };
107 
108  ///////////////////////////////////////////////////////////////////////////////////////////////
109  //
110  // DisplayObject overrides
111  //
112  ///////////////////////////////////////////////////////////////////////////////////////////////
113  virtual GLSGEN_GLSNINEPATCH_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar );
114  virtual GLSGEN_GLSNINEPATCH_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis );
115  virtual GLSGEN_GLSNINEPATCH_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint );
116  virtual GLSGEN_GLSNINEPATCH_EXPORT Vertex* Vertices();
117  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetExtents( float& minx, float& miny, float& minz, float& maxx, float& maxy, float& maxz );
118  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax );
119 
120  virtual GLSGEN_GLSNINEPATCH_EXPORT void UpdateBoundingVolume( void );
121 
122  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetValue( int spec, va_list& args );
123  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( bool generateInstance = false );
124  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( const GlsNinePatch& that, const bool generateNames );
125  virtual GLSGEN_GLSNINEPATCH_EXPORT ~GlsNinePatch();
126  static GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CreateInstance();
127  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetAvailableAttributes( unsigned int value );
128  virtual GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CloneObject( bool generateNames = false );
129  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyProperties( DisplayObject* src );
130  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyGeometry( DisplayObject* srcArg );
131 #ifndef GLES
132  virtual GLSGEN_GLSNINEPATCH_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
133  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
134 #endif
135 
136  virtual GLSGEN_GLSNINEPATCH_EXPORT void Calculate( double time );
137 
138 #ifdef GLES
139  virtual GLSGEN_GLSNINEPATCH_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler );
140 #endif
141  virtual GLSGEN_GLSNINEPATCH_EXPORT void Draw( void );
142  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetFillColor( const GlsColor& color );
143  virtual GLSGEN_GLSNINEPATCH_EXPORT GlsColor GetFillColor( void );
144 
145  /** Gets the polygon drawing mode for this object
146  * \return The polygon drawing mode for this object
147  * \sa PolygonMode_e
148  */
149  virtual GLSGEN_GLSNINEPATCH_EXPORT int PolygonMode( void ) { return POLY_MODE_FILLED; }
150 
151  /** Sets the polygon drawing mode for this object
152  * \param mode The new polygon drawing mode for this object
153  * \sa PolygonMode_e
154  */
155  virtual GLSGEN_GLSNINEPATCH_EXPORT void PolygonMode( int mode ) {} // do nothing
156 
157  /** The enumeration defining which edge textures and vertices refer to*/
158  enum Edge
159  {
160  FIRST = 0,
161  LEFT = 0,
162  RIGHT = 1,
163  TOP = 2,
164  BOTTOM = 3,
165  // The number of items
166  COUNT = 4
167  };
168 
169  /** Set's the texture edge at enum specified by index to the value specified as pixel units.
170  * \param index Refers to the texture edge enumeration that will be modified
171  * \param value The pixel unit(s) assigned to the specificed texture edge enumeration
172  */
173  GLSGEN_GLSNINEPATCH_EXPORT void TextureEdge( Edge index, float value );
174  GLSGEN_GLSNINEPATCH_EXPORT void LeftTextureEdge( float value ) { TextureEdge( LEFT, value ); }
175  GLSGEN_GLSNINEPATCH_EXPORT void RightTextureEdge( float value ) { TextureEdge( RIGHT, value ); }
176  GLSGEN_GLSNINEPATCH_EXPORT void TopTextureEdge( float value ) { TextureEdge( TOP, value ); }
177  GLSGEN_GLSNINEPATCH_EXPORT void BottomTextureEdge( float value ) { TextureEdge( BOTTOM, value ); }
178 
179  /** Set's the vertex edge at enum specified by index to the value specified as logical units.
180  * \param index refers to the vertex edge enumeration that will be modified
181  * \param value is the logical unit(s) assigned to the specificed vertex edge enumeration
182  */
183  GLSGEN_GLSNINEPATCH_EXPORT void VertexEdge( Edge index, float value );
184  GLSGEN_GLSNINEPATCH_EXPORT void LeftVertexEdge( float value ) { VertexEdge( LEFT, value ); }
185  GLSGEN_GLSNINEPATCH_EXPORT void RightVertexEdge( float value ) { VertexEdge( RIGHT, value ); }
186  GLSGEN_GLSNINEPATCH_EXPORT void TopVertexEdge( float value ) { VertexEdge( TOP, value ); }
187  GLSGEN_GLSNINEPATCH_EXPORT void BottomVertexEdge( float value ) { VertexEdge( BOTTOM, value ); }
188 
189  /** Return the value in pixel units of the TextureEdge given at enumeration specified by index
190  * \param index refers to the edge enumeration that the value will be gotten from
191  * \return A float value in pixel units that corresponds with the respective VertexEdge index/enum.
192  */
193  virtual GLSGEN_GLSNINEPATCH_EXPORT float TextureEdge( Edge index );
194  GLSGEN_GLSNINEPATCH_EXPORT float LeftTextureEdge() { return TextureEdge( LEFT ); }
195  GLSGEN_GLSNINEPATCH_EXPORT float RightTextureEdge() { return TextureEdge( RIGHT ); }
196  GLSGEN_GLSNINEPATCH_EXPORT float TopTextureEdge() { return TextureEdge( TOP ); }
197  GLSGEN_GLSNINEPATCH_EXPORT float BottomTextureEdge() { return TextureEdge( BOTTOM ); }
198 
199  /** Return the value in logical units at the edge enumeration specified by index
200  * \param index refers to the edge enumeration
201  * \return A float value in logical units that corresponds with the respective TextureEdge index/enum.
202  */
203  virtual GLSGEN_GLSNINEPATCH_EXPORT float VertexEdge( Edge index );
204  GLSGEN_GLSNINEPATCH_EXPORT float LeftVertexEdge() { return VertexEdge( LEFT ); }
205  GLSGEN_GLSNINEPATCH_EXPORT float RightVertexEdge() { return VertexEdge( RIGHT ); }
206  GLSGEN_GLSNINEPATCH_EXPORT float TopVertexEdge() { return VertexEdge( TOP ); }
207  GLSGEN_GLSNINEPATCH_EXPORT float BottomVertexEdge() { return VertexEdge( BOTTOM ); }
208 
209  /** Getter function to determine whether or not the center will be drawn
210  * \return True being returned lets the use know that the Center of the NinePatch is visible.
211  */
212  GLSGEN_GLSNINEPATCH_EXPORT bool CenterVisible() { return _centerVisible; }
213 
214  GLSGEN_GLSNINEPATCH_EXPORT void CenterVisible( bool value );
215 
216  /** Sets the radii of the width vector in logical units
217  * \param v Will set the radii's width row's logical values of the glsNinePatch object
218  */
219  GLSGEN_GLSNINEPATCH_EXPORT void WidthVector( const Vector& v );
220 
221  /** Sets the radii of the height vector in logical units
222  * \param v Will set the radii's height row's logical values of the glsNinePatch object
223  */
224  GLSGEN_GLSNINEPATCH_EXPORT void HeightVector( const Vector& v );
225 
226  /** Gets the radii of the width vector in logical units.
227  * \return The width of the NinePatch as a Vector.
228  */
229  GLSGEN_GLSNINEPATCH_EXPORT const Vector WidthVector( void ) const { return _radii[ 0 ]; }
230 
231  /** Gets the radii of the height vector in logical units.
232  * \return The height of the NinePatch as a Vector.
233  */
234  GLSGEN_GLSNINEPATCH_EXPORT const Vector HeightVector( void ) const { return _radii[ 1 ]; }
235 
236  /** Setter function for the bottom left corner of the texture in the GlsNinePatch
237  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Bottom Left Corner' vector
238  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Bottom Left Corner' vector
239  */
240  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const float x, const float y );
241  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const Vector& value ) { TextureBLC( value.x, value.y ); }
242 
243  /** Setter function for the top right corner of the texture in the GlsNinePatch
244  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Top Right Corner' vector
245  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Top Right Corner' vector
246  */
247  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const float x, const float y );
248  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const Vector& value ) { TextureTRC( value.x, value.y ); }
249 
250  /** Getter function for the bottom left corner of the texture in the GlsNinePatch
251  * \return Returns the vector in pixel units for the value of the 'Bottom Left Corner'
252  */
253  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureBLC( void ) const { return _textureBLC; }
254 
255  /** Getter function for the top right corner of the texture in the GLSNinePatch
256  * \return Returns the vector in pixel units for the value of the 'Top Right Corner'
257  */
258  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureTRC( void ) const { return _textureTRC; }
259 
260  /** Setter function for the height of the GlsNinePatch in logical units
261  * \param value sets the height of the GlsNinePatch in the direction of _radii[1]
262  */
263  GLSGEN_GLSNINEPATCH_EXPORT void Height( const float& value );
264  /** Setter function for the width of the GlsNinePatch in logical units
265  * \param value sets the width of the GlsNinePatch in the direction of _radii[0]
266  */
267  GLSGEN_GLSNINEPATCH_EXPORT void Width( const float& value );
268  /** Getter function for the height of the GlsNinePatch in logical units
269  * \return The height of the NinePatch
270  */
271  GLSGEN_GLSNINEPATCH_EXPORT float Height( void ) const { return _height; }
272  /** Getter function for the width of the GlsNinePatch in logical units
273  * \return The width of the NinePatch
274  */
275  GLSGEN_GLSNINEPATCH_EXPORT float Width( void ) const { return _width; }
276 
277  /** Returns a pointer to the patch vertices*/
278  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vertex* GetPatchVerts();
279 
280  /** Returns a pointer to the texture points*/
281  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vector* GetPatchTex();
282 
283  /** Gets the "child" rectangle. The child rectangle refers to the
284  * inner rectangle of the nine patch, which is where normal content would be drawn
285  */
286  GLSGEN_GLSNINEPATCH_EXPORT Rect3D GetChildRect();
287 
288  /** Sets the reference texture width, which allows the nine patch to respond to changes of texture size.
289  * \param value The reference width of the texture in pixel units
290  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
291  * nine patch will not display will need to be reconfigured by hand. The reference width should
292  * generally be the width of the original texture. It will be automatically updated when image changes
293  * are detected.
294  * \sa ReferenceTextureWidth()
295  */
296 
297  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureWidth( const unsigned int& value );
298  /** Sets the reference texture height, which allows the nine patch to respond to changes of texture size.
299  * \param value The reference height of the texture in pixel units
300  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
301  * nine patch will not display will need to be reconfigured by hand. The reference height should
302  * generally be the height of the original texture. It will be automatically updated when image changes
303  * are detected.
304  * \sa ReferenceTextureHeight()
305  */
306  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureHeight( const unsigned int& value );
307  /** Gets the reference texture width, which allows the nine patch to respond to changes of texture size.
308  * \sa ReferenceTextureWidth()
309  */
310  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureWidth();
311  /** Gets the reference texture height, which allows the nine patch to respond to changes of texture size.
312  * \sa ReferenceTextureHeight()
313  */
314  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureHeight();
315 
316  /** Forces the nine patch to recalculate it's verts and it's texture verts.
317  * \sa ForceRecalculate()
318  */
319  GLSGEN_GLSNINEPATCH_EXPORT void ForceRecalculate();
320 
321 protected:
322  /** Calculate the vertices for the nine patches */
323  void CalculatePatchVerts();
324 
325  /** Calculate the texture coordinates for the nine patches */
326  void CalculateTextureVerts();
327 
328  /** Calculates new values when a texture has been upsized or downsized */
329  void CalculateTextureResize( const int tw, const int th );
330 
331  /** Calculates _width, _height and _normal based on _radii */
332  void CalculateRadiiUnit( void );
333 
334  /** callback called when the 9patch needs to be recalculated */
335  void SetNeedsRecalculate( void );
336 
337  /** callback called when the 9patch texture coordinates need to be recalculated */
338  void SetNeedsTextureRecalculate( void );
339 
340  /** Draws a grid displaying the 9 polygons on top of the image */
341  void DrawGuides( void );
342 
343 #ifdef GLES
344  /** Set a single attribute from the GLO file.
345  * \param data The attribute to set and its associated data.
346  */
347  virtual GLS_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
348 #endif
349 
350 #ifndef GLES
351  /** Helper routine to draws the 9 patches */
352  void DrawPatches( bool texture );
353 
354  /** Performs OpenGL drawing commands */
355  void DrawGeometry( void );
356 #endif
357 
358  /** Array of vertices that defines the NinePatch, arranged as follows:
359  * 12--13---14---15
360  * | | | |
361  * 8----9---10---11
362  * | | | |
363  * 4----5----6----7
364  * | | | |
365  * 0----1----2----3
366  */
367  Vertex _patchVerts[ GLS_NINE_PATCH_ARRAY_SIZE ];
368 
369  /** Array of texture coordinates, arranged the same way as _patchVerts */
370  Vector _patchTex[ GLS_NINE_PATCH_ARRAY_SIZE ];
371 
372  /** Radius vectors that define the size of the NinePatch
373  * _radii[0] defines the width
374  * _radii[1] defines the height
375  */
377 
378  Vector _normal; /**< Surface normal of the NinePatch. Computed from the _radii */
379  Vector _textureBLC; /**< Texture coordinate of bottom left corner of NinePatch */
380  Vector _textureTRC; /**< Texture coordinate of top right corner of NinePatch */
381  float _width; /**< Width of the NinePatch in the direction of _radii[0] */
382  float _height; /**< Height of the NinePatch in the direction of _radii[1] */
383 
384  /** Values representing the distance from the edge of the texture that makes up the
385  * NinePatch borders. Units are in pixels and are the distance IN from the edge of the texture.
386  */
387 
388  float _textureEdge[ 4 ];
389 
390  /** Values representing the size of edges of the NinePatch. Units are in logical units measure
391  * going IN from the edge of the NinePatch
392  */
393  float _vertexEdge[ 4 ];
394 
395  bool _centerVisible; /**< Whether or not the center patch will be drawn */
396  bool _needsRecalculate; /**< True when the vertices need to be recalculated */
397  bool _needsTextureRecalculate; /**< True when the texture coordinates need to be recalculated */
398  bool _guidesVisible; /**< If true, then "guides" will be drawn". Normally only set in the editor */
399  GlsColor _objectColor; /**< Fill color is normally stored in vertices, but we're not using these in GlsNinePatch */
400  unsigned int _texWidth; /**< Texture Width */
401  unsigned int _texHeight; /**< Texture Height */
402 
403 #ifdef GLES
404  GlsVertexArray _vertArray;
405  GlsIndexArray _indexArray;
406 #endif
407 
408  unsigned int _referenceTexWidth; /**< Texture Width when the object was configured. Used to correctly adjust for new texture resolutions. */
409  unsigned int _referenceTexHeight; /**< Texture Height when the object was configured. Used to correctly adjust for new texture resolutions. */
410 };
411 
412 } // namespace disti
413 
414 #endif
Definition: cull.h:49
virtual void PolygonMode(int mode)
Definition: gls_nine_patch.h:155
float _height
Definition: gls_nine_patch.h:382
unsigned int _referenceTexHeight
Definition: gls_nine_patch.h:409
void SetNeedsTextureRecalculate(void)
Definition: vertex.h:409
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual void CopyProperties(DisplayObject *src)
Edge
Definition: gls_nine_patch.h:158
Vector _textureTRC
Definition: gls_nine_patch.h:380
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax)
bool _needsRecalculate
Definition: gls_nine_patch.h:396
Definition: dynamic_array.h:66
bool CenterVisible()
Definition: gls_nine_patch.h:212
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:296
void DrawGuides(void)
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)
Vector TextureBLC(void) const
Definition: gls_nine_patch.h:253
Vector _normal
Definition: gls_nine_patch.h:378
virtual int PolygonMode(void)
Definition: gls_nine_patch.h:149
Vector _radii[2]
Definition: gls_nine_patch.h:376
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
bool _needsTextureRecalculate
Definition: gls_nine_patch.h:397
void TextureEdge(Edge index, float value)
Definition: display.h:98
const Vector HeightVector(void) const
Definition: gls_nine_patch.h:234
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:400
Vector TextureTRC(void) const
Definition: gls_nine_patch.h:258
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
float _vertexEdge[4]
Definition: gls_nine_patch.h:393
unsigned int ReferenceTextureHeight()
float Height(void) const
Definition: gls_nine_patch.h:271
virtual void Draw(void)
Definition: gls_glo_file.h:982
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:66
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetAvailableAttributes(unsigned int value)
Vector _textureBLC
Definition: gls_nine_patch.h:379
Definition: gls_vertex_array.h:58
unsigned int _referenceTexWidth
Definition: gls_nine_patch.h:408
Definition: gls_nine_patch.h:87
virtual GlsColor GetFillColor(void)
bool _centerVisible
Definition: gls_nine_patch.h:395
Definition: gls_color.h:53
GlsColor _objectColor
Definition: gls_nine_patch.h:399
virtual Vertex * Vertices()
Vector _patchTex[16]
Definition: gls_nine_patch.h:370
The gls_auto_lib.
void SetNeedsRecalculate(void)
virtual void SetValue(int spec, va_list &args)
float Width(void) const
Definition: gls_nine_patch.h:275
Definition: gls_nine_patch.h:100
float _width
Definition: gls_nine_patch.h:381
void CalculateRadiiUnit(void)
virtual void UpdateBoundingVolume(void)
virtual const Vector * GetPatchTex()
bool _guidesVisible
Definition: gls_nine_patch.h:398
virtual const Vertex * GetPatchVerts()
An object for managing vertices, texture coordinates, colors and normals for GLPolygon and other disp...
Definition: vertex.h:84
unsigned int _texHeight
Definition: gls_nine_patch.h:401
Definition: display_types.h:93
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)
Definition: gls_index_array.h:52
Macros and helper code to determine what subset of C++11/14/17 is available.
Vertex _patchVerts[16]
Definition: gls_nine_patch.h:367
The disti::GlsIndexArray class, for managing index buffers.
const Vector WidthVector(void) const
Definition: gls_nine_patch.h:229
virtual void SetFillColor(const GlsColor &color)
void DrawGeometry(void)
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
unsigned int ReferenceTextureWidth()
float _textureEdge[4]
Definition: gls_nine_patch.h:388