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