|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Configuration of a 2D rectangle instance, optionally textured, to draw. More...
#include <GREM/graphics_2d/Instances2D.hpp>
Public Attributes | |
| const Texture * | texture = nullptr |
| Non-owning pointer to a texture to apply to the rectangle, or nullptr to use a fully white texture. | |
| vec2 | position {0.0f, 0.0f} |
| Position, in world coordinates, to draw the rectangle at, with respect to its RectangleInstance2D::origin. | |
| float | angle = 0.0f |
| Angle, in radians, to rotate the rectangle counter-clockwise by, around its RectangleInstance2D::origin. | |
| vec2 | size {1.0f, 1.0f} |
| Size of the rectangle, in world coordinates. | |
| vec2 | origin {0.0f, 0.0f} |
| Offset, in local vertex coordinates, specifying the origin relative to the bottom left of the rectangle. | |
| vec2 | textureOffset {0.0f, 0.0f} |
| Offset, in texture coordinates, to apply to the texture coordinates before sampling the texture. | |
| float | textureAngle = 0.0f |
| Angle, in radians, to rotate the texture coordinates by before sampling the texture. | |
| vec2 | textureScale {1.0f, 1.0f} |
| Coefficients to scale the texture coordinates by before sampling the texture. | |
| Color | color = Color::WHITE |
| Tint color to use in the shader. | |
| Color | emissiveColor = Color::INVISIBLE |
| Emissive color to use in the shader. | |
Configuration of a 2D rectangle instance, optionally textured, to draw.
| const Texture* grem::graphics::RectangleInstance2D::texture = nullptr |
Non-owning pointer to a texture to apply to the rectangle, or nullptr to use a fully white texture.
| vec2 grem::graphics::RectangleInstance2D::position {0.0f, 0.0f} |
Position, in world coordinates, to draw the rectangle at, with respect to its RectangleInstance2D::origin.
| float grem::graphics::RectangleInstance2D::angle = 0.0f |
Angle, in radians, to rotate the rectangle counter-clockwise by, around its RectangleInstance2D::origin.
| vec2 grem::graphics::RectangleInstance2D::size {1.0f, 1.0f} |
Size of the rectangle, in world coordinates.
| vec2 grem::graphics::RectangleInstance2D::origin {0.0f, 0.0f} |
Offset, in local vertex coordinates, specifying the origin relative to the bottom left of the rectangle.
For example, a value of (0.5, 0.5) corresponds to the middle of the rectangle.
| vec2 grem::graphics::RectangleInstance2D::textureOffset {0.0f, 0.0f} |
Offset, in texture coordinates, to apply to the texture coordinates before sampling the texture.
| float grem::graphics::RectangleInstance2D::textureAngle = 0.0f |
Angle, in radians, to rotate the texture coordinates by before sampling the texture.
| vec2 grem::graphics::RectangleInstance2D::textureScale {1.0f, 1.0f} |
Coefficients to scale the texture coordinates by before sampling the texture.
| Color grem::graphics::RectangleInstance2D::color = Color::WHITE |
Tint color to use in the shader.
When no texture is specified, this controls the base color of the rectangle.
| Color grem::graphics::RectangleInstance2D::emissiveColor = Color::INVISIBLE |
Emissive color to use in the shader.