jGL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
jGL::NormalisedTextureRegion Struct Reference

Rectangular region of a texture, normalised by the textures dimensions. More...

#include <primitive.h>

Inheritance diagram for jGL::NormalisedTextureRegion:
Inheritance graph
[legend]
Collaboration diagram for jGL::NormalisedTextureRegion:
Collaboration graph
[legend]

Public Member Functions

 NormalisedTextureRegion (float x, float y, float w, float h)
 
 NormalisedTextureRegion ()
 
- Public Member Functions inherited from jGL::Primitive
virtual ~Primitive ()=default
 

Public Attributes

float tx
 
float ty
 
float lx
 
float ly
 

Detailed Description

Rectangular region of a texture, normalised by the textures dimensions.

Parameters
txLower left corner of region, along width, in [0, 1].
tyLower left corner of region, along height, in [0, 1].
lxLength of region along width, in [0, 1].
lyLength of region along height, in [0, 1].
Remarks
Values are normalised to a texture width and height.
0 lx and ly will be handled as the maximum lengths in e.g. SpriteRenderer.

Constructor & Destructor Documentation

◆ NormalisedTextureRegion() [1/2]

jGL::NormalisedTextureRegion::NormalisedTextureRegion ( float  x,
float  y,
float  w,
float  h 
)
inline

◆ NormalisedTextureRegion() [2/2]

jGL::NormalisedTextureRegion::NormalisedTextureRegion ( )
inline

Member Data Documentation

◆ lx

float jGL::NormalisedTextureRegion::lx

◆ ly

float jGL::NormalisedTextureRegion::ly

◆ tx

float jGL::NormalisedTextureRegion::tx

◆ ty

float jGL::NormalisedTextureRegion::ty

The documentation for this struct was generated from the following file: