hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::graphics::TextureRegion Class Reference

Defines a rectangle in a texture. More...

#include <texture_region.hpp>

Public Member Functions

 TextureRegion (Ptr< Texture > texture, float minX, float maxX, float minY, float maxY)
 Create a texture region from a texture and rectangle coordinates. More...
 
 TextureRegion ()
 Create an empty texture region.
 
const Ptr< Texture > & getTexture ()
 Get the texture. More...
 
float getMinX ()
 Get the left coordinate. More...
 
float getMaxX ()
 Get the right coordinate. More...
 
float getMinY ()
 Get the bottom coordinate. More...
 
float getMaxY ()
 Get the top coordinate. More...
 

Detailed Description

Defines a rectangle in a texture.

Definition at line 38 of file texture_region.hpp.

Constructor & Destructor Documentation

hx3d::graphics::TextureRegion::TextureRegion ( Ptr< Texture texture,
float  minX,
float  maxX,
float  minY,
float  maxY 
)

Create a texture region from a texture and rectangle coordinates.

Parameters
textureTexture (Ptr)
minXLeft coordinate
maxXWidth
minYTop coordinate
maxYHeight

Definition at line 30 of file texture_region.cpp.

Member Function Documentation

float hx3d::graphics::TextureRegion::getMaxX ( )

Get the right coordinate.

Returns
Max X

Definition at line 45 of file texture_region.cpp.

float hx3d::graphics::TextureRegion::getMaxY ( )

Get the top coordinate.

Returns
Max Y

Definition at line 53 of file texture_region.cpp.

float hx3d::graphics::TextureRegion::getMinX ( )

Get the left coordinate.

Returns
Min X

Definition at line 41 of file texture_region.cpp.

float hx3d::graphics::TextureRegion::getMinY ( )

Get the bottom coordinate.

Returns
Min Y

Definition at line 49 of file texture_region.cpp.

const Ptr< Texture > & hx3d::graphics::TextureRegion::getTexture ( )

Get the texture.

Returns
Texture (Ptr)

Definition at line 37 of file texture_region.cpp.


The documentation for this class was generated from the following files: