#include <gl_surface_data.hpp>
Inherits SurfaceData.
Public Member Functions | |
GLSurfaceData (const Surface &surface) | |
float | get_uv_left () const |
float | get_uv_top () const |
float | get_uv_right () const |
float | get_uv_bottom () const |
Private Attributes | |
const Surface & | surface |
float | uv_left |
float | uv_top |
float | uv_right |
float | uv_bottom |
Definition at line 23 of file gl_surface_data.hpp.
GLSurfaceData::GLSurfaceData | ( | const Surface & | surface | ) | [inline] |
Definition at line 33 of file gl_surface_data.hpp.
00033 : 00034 surface(surface), 00035 uv_left((float) surface.get_x() / surface.get_texture()->get_texture_width()), 00036 uv_top((float) surface.get_y() / surface.get_texture()->get_texture_height()), 00037 uv_right((float) (surface.get_x() + surface.get_width()) / surface.get_texture()->get_texture_width()), 00038 uv_bottom((float) (surface.get_y() + surface.get_height()) / surface.get_texture()->get_texture_height()) 00039 { 00040 }
float GLSurfaceData::get_uv_left | ( | ) | const [inline] |
Definition at line 42 of file gl_surface_data.hpp.
References Surface::get_flipx(), surface, uv_left, and uv_right.
Referenced by GLRenderer::draw_surface(), GLLightmap::draw_surface(), GLRenderer::draw_surface_part(), and GLLightmap::draw_surface_part().
float GLSurfaceData::get_uv_top | ( | ) | const [inline] |
Definition at line 47 of file gl_surface_data.hpp.
References uv_top.
Referenced by GLRenderer::draw_surface(), GLLightmap::draw_surface(), GLRenderer::draw_surface_part(), and GLLightmap::draw_surface_part().
00048 { 00049 return uv_top; 00050 }
float GLSurfaceData::get_uv_right | ( | ) | const [inline] |
Definition at line 52 of file gl_surface_data.hpp.
References Surface::get_flipx(), surface, uv_left, and uv_right.
Referenced by GLRenderer::draw_surface(), GLLightmap::draw_surface(), GLRenderer::draw_surface_part(), and GLLightmap::draw_surface_part().
float GLSurfaceData::get_uv_bottom | ( | ) | const [inline] |
Definition at line 57 of file gl_surface_data.hpp.
References uv_bottom.
Referenced by GLRenderer::draw_surface(), GLLightmap::draw_surface(), GLRenderer::draw_surface_part(), and GLLightmap::draw_surface_part().
00058 { 00059 return uv_bottom; 00060 }
const Surface& GLSurfaceData::surface [private] |
float GLSurfaceData::uv_left [private] |
float GLSurfaceData::uv_top [private] |
float GLSurfaceData::uv_right [private] |
float GLSurfaceData::uv_bottom [private] |