/usr/include/citygml/texture.h is in libcitygml-dev 2.0.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #pragma once
#include <string>
#include <citygml/citygml_api.h>
#include <citygml/appearance.h>
#include <citygml/vecs.hpp>
namespace citygml {
class CityGMLFactory;
class LIBCITYGML_EXPORT Texture : public Appearance
{
friend class CityGMLFactory;
public:
enum class WrapMode
{
WM_NONE, // the resulting color is fully transparent
WM_WRAP, // the texture is repeated
WM_MIRROR, // the texture is repeated and mirrored
WM_CLAMP, // the texture is clamped to its edges
WM_BORDER // the resulting color is specified by the borderColor element (RGBA)
};
std::string getUrl() const;
void setUrl(const std::string& url);
bool getRepeat() const;
WrapMode getWrapMode() const;
void setWrapMode(WrapMode mode);
/**
* @brief tries to interpret the string as a WrapMode. Does nothing on failure.
* @param wrapMode the string e.g. ("WM_NONE")
* @return true if the string could be interpreted as a WrapMode, false otherwise
*/
bool setWrapModeFromString(std::string wrapMode);
TVec4f getBorderColor() const;
void setBorderColor(TVec4f color);
std::string toString() const override;
virtual std::shared_ptr<Texture> asTexture() override;
virtual std::shared_ptr<const Texture> asTexture() const override;
virtual ~Texture();
protected:
Texture( const std::string& id );
Texture( const std::string& id, const std::string& type );
std::string m_url;
bool m_repeat;
WrapMode m_wrapMode;
TVec4f m_borderColor;
};
}
|