Component that draws its game object as a textured rectangle.
More...
#include <quadrenderer_component.hpp>
|
| bool | isUnique = true |
| | If true, only one of this component type may exist per object.
|
| |
Component that draws its game object as a textured rectangle.
Each frame it submits a rectangle (sized/colored via the setters, placed by the object's Transform) to the QuadRenderer.
◆ firstFrame()
| void cangine::QuadRendererComponent::firstFrame |
( |
| ) |
|
|
overridevirtual |
◆ frame()
| void cangine::QuadRendererComponent::frame |
( |
double |
deltaTime | ) |
|
|
overridevirtual |
Called every frame to update the component.
- Parameters
-
| deltaTime | Seconds elapsed since the previous frame. |
Reimplemented from cangine::IComponent.
◆ getRect()
| Rectangle * cangine::QuadRendererComponent::getRect |
( |
| ) |
|
Returns the underlying rectangle.
- Returns
- Pointer to the rectangle geometry.
◆ getRectPos()
| Vector3 cangine::QuadRendererComponent::getRectPos |
( |
| ) |
|
Returns the rectangle's position.
- Returns
- Rectangle position.
◆ getRectSize()
| Vector2 cangine::QuadRendererComponent::getRectSize |
( |
| ) |
|
Returns the rectangle's size.
- Returns
- Width and height as a vector.
◆ setRectColor()
| void cangine::QuadRendererComponent::setRectColor |
( |
Color |
colorIn | ) |
|
|
virtual |
◆ setRectHeight()
| void cangine::QuadRendererComponent::setRectHeight |
( |
int |
heightIn | ) |
|
|
virtual |
◆ setRectWidth()
| void cangine::QuadRendererComponent::setRectWidth |
( |
int |
widthIn | ) |
|
|
virtual |
◆ setTexture()
| void cangine::QuadRendererComponent::setTexture |
( |
Texture & |
t | ) |
|
|
virtual |
Sets the texture applied to the quad.
- Parameters
-
◆ qr
Renderer used to draw the quad.
◆ rect
| Rectangle cangine::QuadRendererComponent::rect |
|
protected |
◆ texture
| Texture* cangine::QuadRendererComponent::texture |
|
protected |
Texture applied to the quad, if any.
◆ transform
| Transform* cangine::QuadRendererComponent::transform |
|
protected |
Cached transform of the owning object.
The documentation for this class was generated from the following files: