40 #ifndef _GLS_NINE_PATCH_H
41 #define _GLS_NINE_PATCH_H
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 )
58 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllimport )
61 # define GLSGEN_GLSNINEPATCH_EXPORT
65 #define LIB_BASE_NAME "gls_nine_patch"
74 GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
75 GLS_NINE_PATCH_CENTER_VISIBLE,
77 GLS_NINE_PATCH_TEXTURE_EDGES,
79 GLS_NINE_PATCH_TEXTURE_POINTS,
81 GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
84 #define GLS_NINE_PATCH_ARRAY_SIZE 16
89 friend class GlsNinePatchEditor;
96 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
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 );
117 virtual GLSGEN_GLSNINEPATCH_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz );
122 virtual GLSGEN_GLSNINEPATCH_EXPORT
void SetValue(
int spec, va_list& args );
123 GLSGEN_GLSNINEPATCH_EXPORT
GlsNinePatch(
bool generateInstance =
false );
126 static GLSGEN_GLSNINEPATCH_EXPORT
DisplayObject* CreateInstance();
136 virtual GLSGEN_GLSNINEPATCH_EXPORT
void Calculate(
double time );
141 virtual GLSGEN_GLSNINEPATCH_EXPORT
void Draw(
void );
155 virtual GLSGEN_GLSNINEPATCH_EXPORT
void PolygonMode(
int mode ) {}
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 ); }
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 ); }
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 ); }
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 ); }
240 GLSGEN_GLSNINEPATCH_EXPORT
void TextureBLC(
const float x,
const float y );
247 GLSGEN_GLSNINEPATCH_EXPORT
void TextureTRC(
const float x,
const float y );
263 GLSGEN_GLSNINEPATCH_EXPORT
void Height(
const float& value );
267 GLSGEN_GLSNINEPATCH_EXPORT
void Width(
const float& value );
275 GLSGEN_GLSNINEPATCH_EXPORT
float Width(
void )
const {
return _width; }
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)
#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 CalculatePatchVerts()
virtual void PreDraw(const OpenGLMatrices ¤t, 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)
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
Definition: gls_glo_file.h:988
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
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...
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)
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
unsigned int ReferenceTextureWidth()
float _textureEdge[4]
Definition: gls_nine_patch.h:388