Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Muto::SpriteRendererComponent Struct Reference

Component that holds sprite rendering data. More...

#include <Components.h>

Public Member Functions

glm::vec4 & GetColor ()
 Returns the color of the sprite.
 
 operator const glm::vec4 & () const
 
 operator glm::vec4 & ()
 
 SpriteRendererComponent ()=default
 
 SpriteRendererComponent (const glm::vec4 &color)
 Constructor that initializes the color.
 
 SpriteRendererComponent (const SpriteRendererComponent &)=default
 

Public Attributes

bool Billboard = false
 whether the sprite should always face the camera
 
glm::vec4 Color { 1.0f, 1.0f, 1.0f, 1.0f }
 Color of the sprite.
 
Ref< Texture2D > Texture = nullptr
 Texture of the sprite.
 
bool TextureEnabled = false
 whether the texturing is enabled
 
float TilingFactor = 1.0f
 Tiling factor for the texture.
 

Detailed Description

Component that holds sprite rendering data.

Constructor & Destructor Documentation

◆ SpriteRendererComponent() [1/3]

Muto::SpriteRendererComponent::SpriteRendererComponent ( )
default

◆ SpriteRendererComponent() [2/3]

Muto::SpriteRendererComponent::SpriteRendererComponent ( const SpriteRendererComponent &  )
default

◆ SpriteRendererComponent() [3/3]

Muto::SpriteRendererComponent::SpriteRendererComponent ( const glm::vec4 &  color)
inline

Constructor that initializes the color.

108 : Color(color) {
109 }
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51
glm::vec4 Color
Color of the sprite.
Definition Components.h:98

References SpriteRendererComponent().

Referenced by SpriteRendererComponent().

Member Function Documentation

◆ GetColor()

glm::vec4 & Muto::SpriteRendererComponent::GetColor ( )
inline

Returns the color of the sprite.

115{ return Color; }

◆ operator const glm::vec4 &()

Muto::SpriteRendererComponent::operator const glm::vec4 & ( ) const
inline
112{ return Color; }

◆ operator glm::vec4 &()

Muto::SpriteRendererComponent::operator glm::vec4 & ( )
inline
111{ return Color; }

Member Data Documentation

◆ Billboard

bool Muto::SpriteRendererComponent::Billboard = false

whether the sprite should always face the camera

WIP

◆ Color

glm::vec4 Muto::SpriteRendererComponent::Color { 1.0f, 1.0f, 1.0f, 1.0f }

Color of the sprite.

98{ 1.0f, 1.0f, 1.0f, 1.0f };

◆ Texture

Ref<Texture2D> Muto::SpriteRendererComponent::Texture = nullptr

Texture of the sprite.

◆ TextureEnabled

bool Muto::SpriteRendererComponent::TextureEnabled = false

whether the texturing is enabled

◆ TilingFactor

float Muto::SpriteRendererComponent::TilingFactor = 1.0f

Tiling factor for the texture.


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