 |
Blamite Game Engine - Strings
00386.06.16.23.0646.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Go to the documentation of this file.
7 #define STRINGS_API __declspec(dllexport)
9 #define STRINGS_API __declspec(dllimport)
12 typedef unsigned char byte;
22 byte convert_float_clamped(
float f);
49 BlamColor(
byte _r,
byte _g,
byte _b,
byte _a);
56 std::string ToString();
63 float GetRedAsFloat();
70 float GetGreenAsFloat();
77 float GetBlueAsFloat();
84 float GetAlphaAsFloat();
112 std::string ToString(std::string format);
119 std::string ToStringForCSS();
130 bool FromString(std::string
string);
STRINGS_API std::vector< std::string > Split(std::string string, std::string splitter)
Splits a string around any instance of a substring.
Definition: string.cpp:114
BlamColor()
Definition: BlamColor.cpp:25
byte b
The Blue value of the color.
Definition: BlamColor.h:27
float w
The W-coordinate of the 4D vector.
Definition: vector.h:167
int GetColorAsInt()
Gets the color's value as an integer.
Definition: BlamColor.cpp:74
float y
The Y-coordinate of the 3D vector, representing horizontal Y (depth) position.
Definition: vector.h:83
float x
The X-coordinate of the 3D vector, representing horizontal X (width) position.
Definition: vector.h:82
Structure representing a 3D vector.
Definition: vector.h:80
float y
The Y-coordinate of the 4D vector.
Definition: vector.h:165
BlamVector4 ToVector4()
Converts the color into a BlamVector4.
Definition: BlamColor.cpp:143
float z
The Z-coordinate of the 3D vector, representing vertical position.
Definition: vector.h:84
void FromVector3(BlamVector3 vector)
Parses color information from a BlamVector3.
Definition: BlamColor.cpp:201
unsigned char byte
Definition: BlamColor.h:12
Structure representing a 4D vector.
Definition: vector.h:162
STRINGS_API std::string Replace(std::string orig, std::string to_replace, std::string replace_with)
Replaces part of a string with another string.
Definition: string.cpp:94
byte a
The Alpha value of the color.
Definition: BlamColor.h:28
#define STRINGS_API
Definition: BlamColor.h:9
float GetBlueAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: BlamColor.cpp:64
float GetRedAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: BlamColor.cpp:54
std::basic_string< CharT, Traits, Allocator > to_string(uuid const &id)
Definition: uuid.h:581
void FromVector4(BlamVector4 vector)
Parses color information from a BlamVector4.
Definition: BlamColor.cpp:156
float GetGreenAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: BlamColor.cpp:59
std::string ToString()
Converts the color value to a string.
Definition: BlamColor.cpp:49
std::string ToStringForCSS()
Converts the color to a string that can be used with CSS.
Definition: BlamColor.cpp:105
byte g
The Green value of the color.
Definition: BlamColor.h:26
bool FromString(std::string string)
Attempts to set color information from a string.
Definition: BlamColor.cpp:110
float GetAlphaAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: BlamColor.cpp:69
float x
The X-coordinate of the 4D vector.
Definition: vector.h:164
Class representing a color.
Definition: BlamColor.h:19
byte r
The Red value of the color.
Definition: BlamColor.h:25
float z
The Z-coordinate of the 4D vector.
Definition: vector.h:166
BlamVector3 ToVector3()
Converts the color into a BlamVector3.
Definition: BlamColor.cpp:189
bool Equals(BlamColor other_color)
Checks if this color is equal to another color.
Definition: BlamColor.cpp:164