|
| IconRenderItem (std::shared_ptr< STK::Texture > texture, const Vector2f textureSize, Vector2f textureOffset={0.5, 0.5}) |
|
| IconRenderItem (const IconRenderItem &icon) |
|
void | render (GraphicsRender2D &renderer, const STK::Matrix4x4f &pj, const STK::Matrix4x4f &vm, const STK::Viewport &vp) override |
|
int | getBatchId () const override |
|
const STK::Matrix4x4f & | getIconTransform () |
|
std::shared_ptr< STK::Texture > | getTexture () const |
|
const Vector2f & | getTextureOffset () const |
|
void | setTextureOffset (Vector2f offset) |
|
void | setTextureOffset (float x, float y) |
|
void | setIconOffset (Vector2f offset) |
|
void | setIconOffset (const float x, const float y) |
|
void | setTextureCoordTransform (const Vector4f &transform) |
|
const Vector4f & | getTextureCoordTransform () const |
|
const Vector2f & | getIconOffset () const |
|
Vector2f | getIconOffset () |
|
const Vector2f & | getTextureSize () const |
|
void | setTextureSize (Vector2f size) |
|
void | setTextureSize (float w, float h) |
|
void | cleanupBuffers () override |
|
void | setColor (const STK::Color4f &color) |
|
const STK::Color4f & | getColor () const |
|
void | setKeepUpright (bool keep_upright) |
|
bool | keepUpright () const |
|
void | updateViewportScaling (const STK::Matrix4x4f &vm) |
|
void | setIconBoundingBox (std::optional< OrientedBoundingBox2f > bbox) |
|
std::optional< OrientedBoundingBox2f > | getIconBoundingBox () const |
|
virtual STK::Box2< float > | getViewBoundingBox (const STK::Matrix4x4f &mvp, const STK::Viewport &glVp, bool reverse_y=false) override |
| Get bounding box in viewport pixel coordinates.
|
|
virtual void | render (GraphicsRender2D &renderer, const STK::Matrix4x4f &pj, const STK::Matrix4x4f &vm, const STK::Viewport &vp)=0 |
|
virtual void | cleanupBuffers ()=0 |
|
virtual int | getBatchId () const =0 |
|
void | setDepth (float depth) |
|
float | getDepth () const |
|
void | setStencilValue (unsigned char stencil_value) |
| Set value for stencil operations.
|
|
unsigned char | getStencilValue () const |
| Get value for stencil operations.
|
|
void | setStencilMode (StencilMode mode) |
| Stencil buffer operations.
|
|
StencilMode | getStencilMode () const |
| Stencil buffer operations.
|
|
const STK::Matrix4x4f & | getTransform () |
|
void | setPosition (float x, float y) |
| Set 2D position of the item. This method will invalidate the transform and cause it to be recalculated on the next frame.
|
|
void | setPosition (const STK::Vector2f &pos) |
| Same as above.
|
|
void | setPositionX (float x) |
| Set X position separately.
|
|
void | setPositionY (float y) |
| Set Y position separately.
|
|
const STK::Vector2f & | getPosition () const |
|
float | getPositionX () const |
|
float | getPositionY () const |
|
void | setScale (const STK::Vector2f &scale) |
|
void | setScale (float scale) |
| Set scale factor for the text item. This method will invalidate the transform and cause it to be recalculated on the next frame.
|
|
STK::Vector2f | getScale () const |
| Returns current scale factor for the item.
|
|
void | setAngle (float angle) |
| Set rotation angle for the item. Positive rotation direction is counter-clockwise. This method will invalidate the transform and cause it to be recalculated on the next frame.
|
|
float | getAngle () const |
|
void | setTransform (const STK::Matrix4x4f &transform) |
| Set transform directly. This method will set the transformation matrix for this item directly. This will override any values for setPosition(), setScale(), setDepth() and setAngle(). Also, any subsequent calls to these methods will again override this method. In short, either use setTransform() or setPosition/Scale/Angle/Depth.
|
|
void | setPreTransform (const STK::Matrix4x4f &transform) |
|
void | setPostTransform (const STK::Matrix4x4f &transform) |
|
std::optional< STK::Matrix4x4f > | getPreTransform () const |
|
std::optional< STK::Matrix4x4f > | getPostTransform () const |
|
void | setOpacity (float opacity) |
|
float | getOpacity () const |
|
virtual STK::Box2< float > | getViewBoundingBox (const STK::Matrix4x4f &mvp, const STK::Viewport &glVp, bool reverse_y=false)=0 |
| Get bounding box in viewport pixel coordinates.
|
|