![]() |
Perception Tool Kit (PTK) API Guide
|


Public Types | |
| enum | FitType { STRETCH, FIT_X, FIT_Y, FIT, NATURAL } |
Public Member Functions | |
| Image (Renderer *r, GLuint texture, bool invert, FitType fit) | |
| Image (Renderer *r, GLuint texture, bool invert) | |
| Image (Renderer *r, GLuint texture, FitType fit) | |
| Image (Renderer *r, GLuint texture) | |
| virtual | ~Image () |
| virtual Image * | show () |
| virtual Image * | hide () |
| Image * | setTexture (GLuint tex) |
| virtual void | render (uint64_t delta, Dimensions d) |
| virtual void | windowResize () |
| void | update () |
| float | getScale () const |
| float | getXOffset () const |
| float | getYOffset () const |
| void | setRenderer (Renderer *r) |
| void | setVirtualCamera (PTK_VirtualCamera *camera) |
| PTK_VirtualCamera * | getVirtualCamera () const |
| void | setQuadUV (uint16_t quad, float minU, float maxU, float minV, float maxV) |
| void | setQuadUV (uint16_t quad, GLushort minU, GLushort maxU, GLushort minV, GLushort maxV) |
| void | setQuadAlpha (uint16_t quad, float alpha) |
| void | setQuadAlpha (uint16_t quad, GLushort alpha) |
| bool | render (glm::u16vec3 *vCoords, glm::u16vec3 *tCoords, int offset, bool force) |
| bool | render (glm::u16vec3 *vCoords, uint16_t offset, bool force) |
| void | setTextureId (uint16_t quad, GLuint tId) |
| GLuint | getTextureId (uint16_t quad) const |
| void | setQuadsZ (GLshort z) |
| void | setQuadXY (uint16_t quad, float x, float y, float w, float h) |
| void | setQuadXY (uint16_t quad, GLshort x, GLshort y, GLshort w, GLshort h) |
| void | setQuadZ (uint16_t quad, GLshort z) |
| void | setQuadPosition (uint16_t quad, const glm::u16vec3 &coords, GLshort w, GLshort h) |
| uint16_t | getQuadCount (void) const |
| bool | isVisible (void) const |
Protected Member Functions | |
| void | _show (void) |
| void | _hide (void) |
Protected Attributes | |
| Renderer * | _r |
| PTK_VirtualCamera * | _viewCamera |
| uint16_t | _count |
| uint16_t | _prevOffset |
| Count of quads rendered. More... | |
| glm::u16vec3 * | _vCoords |
| Have the vertex or color data been modified? More... | |
| bool | _visible |
Static Protected Attributes | |
| static PTK_VirtualCamera * | _defaultCamera |
Private Attributes | |
| Dimensions | _lastDimensions |
| bool | _modified |
| bool | _invert |
| FitType | _fit |
| int | _texWidth |
| int | _texHeight |
| float | _scale |
| float | _xOffset |
| float | _yOffset |
| enum ptk::Image::FitType |
|
virtual |
|
virtual |
Default show implementation merely calls the concrete function
Reimplemented from ptk::Visible< Image >.
|
virtual |
Default hide implementation merely calls the concrete function
Reimplemented from ptk::Visible< Image >.
|
virtual |
Render this object, including a time delta in microseconds since it was last rendered and the size of the region being renderered to. For 3D objects, glViewport will hand dimensions and it is informative. For 2D objects with a separate aggregate pipeline, the dimensions should be used to check and update position information, so that all positions can be specified relative to the "container" and allow boxes to be nested and repositioned easily
| [in] | tick | The number of microseconds that have passed since this object was last rendered |
| [in] | dimensions | The dimensions of the region this renders to of the entire screen |
Implements ptk::Renderable.
|
inlinevirtual |
Called when the window is resized by the Renderer
Implements ptk::TexturedQuadRenderable.
| void ptk::Image::update | ( | ) |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
Save a pointer to the renderer this is attached to, which may be needed later for some global state access
| [in] | r | The renderer that is being used to visualize this renderable |
|
inlineinherited |
Save a pointer to the given virtual camera to use when visualizing this object
| [in] | camera | Pointer to virtual camera to use |
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Set the texture ID that should be used during rendering
| quad | Which quad to set the texture for |
| tId | the new opengl texture id to use |
Retrieves the texture ID for a specific quad, useful during rendering
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineprotectedinherited |
Show implementation that adjusts our flag
|
inlineprotectedinherited |
Hide implementation that adjusts our flag
|
inlineinherited |
Determine if this is currently visible or not
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
|
protectedinherited |
|
staticprotectedinherited |
|
protectedinherited |
|
protectedinherited |
Count of quads rendered.
|
protectedinherited |
Have the vertex or color data been modified?
|
protectedinherited |