TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
mesh.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_GEOMETRY_MESH_H_
2#define INCLUDE_TINYURDF_GEOMETRY_MESH_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include <iostream>
7#include <string>
8#include <filesystem>
9
10#include <loguru/loguru.hpp>
11
12#include "geometry_base.h"
13#include "color.h"
14#include "utils.h"
15
16class Mesh : public GeometryBase {
17public:
18 Mesh();
19 ~Mesh();
20 bool isA(const char* name) override;
21 void clear() override;
22 void setFilename(const std::string& path);
23 std::string getFilename() override;
24 void setScale(double xs, double ys, double zs);
25 Vec3 getScale() override;
26 void setColor(Color c);
27 void setColor(double r, double g, double b, double a = 1.0);
28 void print(std::ostream& os) override;
29 void setOrigin(double x, double y, double z) override;
30 void getOrigin(double* xyz) const override;
31 bool empty() const override;
32 const char* getTypename() override;
33private:
34 std::string filename;
35 Vec3 scale;
36 Color color;
37};
38#endif // INCLUDE_TINYURDF_GEOMETRY_MESH_H_
Definition color.h:13
Definition geometry_base.h:9
Definition mesh.h:16
std::string getFilename() override
Definition mesh.cc:30
Mesh()
Definition mesh.cc:3
void getOrigin(double *xyz) const override
Definition mesh.cc:71
void setColor(Color c)
Definition mesh.cc:51
~Mesh()
Definition mesh.cc:7
void setOrigin(double x, double y, double z) override
Definition mesh.cc:67
Vec3 getScale() override
Definition mesh.cc:46
void setScale(double xs, double ys, double zs)
Definition mesh.cc:35
const char * getTypename() override
Definition mesh.cc:80
void clear() override
Definition mesh.cc:15
void print(std::ostream &os) override
Definition mesh.cc:59
bool empty() const override
Definition mesh.cc:75
bool isA(const char *name) override
Definition mesh.cc:11
void setFilename(const std::string &path)
Definition mesh.cc:21
Eigen::Matrix< double, 3, 1 > Vec3
Definition utils.h:14