TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_COLOR_H_
2#define INCLUDE_TINYURDF_COLOR_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include "property_base.h"
7#include <loguru/loguru.hpp>
8#include <sstream>
9#include <string>
10#include <vector>
11#include <iostream>
12
13class Color : public PropertyBase{
14public:
15 enum class Type
16 {
17 Red,
18 Green,
19 Blue,
20 Black,
21 White,
22 Yellow,
23 Cyan,
25 };
26 Color();
27 Color& operator=(const Color& rhs);
28 Color(const double& r_,const double& g_,const double& b_,const double& a_);
29 Color(const double* rgba);
30 Color(const std::string &vector_str);
31 Color(const Type type_);
32 bool isA(const char* name) override;
33 void clear() override;
34 void print(std::ostream& os) override;
35 void set(double&r, double& g, double& b, double& a);
36 ~Color();
37 double getR() const;
38 double getG() const;
39 double getB() const;
40 double getA() const;
41 private:
42 double r, g, b, a;
43};
44#endif // TINYURDF_COLOR_H
Definition color.h:13
void clear() override
Definition color.cc:36
void print(std::ostream &os) override
Definition color.cc:42
~Color()
Definition color.cc:47
double getR() const
Definition color.cc:51
Color & operator=(const Color &rhs)
Definition color.cc:9
double getB() const
Definition color.cc:61
void set(double &r, double &g, double &b, double &a)
Definition color.cc:71
Color()
Definition color.cc:3
double getG() const
Definition color.cc:56
bool isA(const char *name) override
Definition color.cc:132
Color(const double *rgba)
double getA() const
Definition color.cc:66
Type
Definition color.h:16
Definition property_base.h:9