Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Vesper::SpriteRendererComponent Struct Reference

Component that holds sprite rendering data. More...

#include <Components.h>

Public Member Functions

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

Public Attributes

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

Detailed Description

Component that holds sprite rendering data.

Constructor & Destructor Documentation

◆ SpriteRendererComponent() [1/3]

Vesper::SpriteRendererComponent::SpriteRendererComponent ( )
default

◆ SpriteRendererComponent() [2/3]

Vesper::SpriteRendererComponent::SpriteRendererComponent ( const SpriteRendererComponent & )
default

◆ SpriteRendererComponent() [3/3]

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

Constructor that initializes the color.

102 : Color(color) {
103 }
glm::vec4 Color
Color of the sprite.
Definition Components.h:92

Member Function Documentation

◆ GetColor()

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

Returns the color of the sprite.

109{ return Color; }

◆ operator const glm::vec4 &()

Vesper::SpriteRendererComponent::operator const glm::vec4 & ( ) const
inline
106{ return Color; }

◆ operator glm::vec4 &()

Vesper::SpriteRendererComponent::operator glm::vec4 & ( )
inline
105{ return Color; }

Member Data Documentation

◆ Billboard

bool Vesper::SpriteRendererComponent::Billboard = false

whether the sprite should always face the camera

WIP

◆ Color

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

Color of the sprite.

92{ 1.0f, 1.0f, 1.0f, 1.0f };

◆ Texture

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

Texture of the sprite.

◆ TextureEnabled

bool Vesper::SpriteRendererComponent::TextureEnabled = false

whether the texturing is enabled

◆ TilingFactor

float Vesper::SpriteRendererComponent::TilingFactor = 1.0f

Tiling factor for the texture.


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