Go to the documentation of this file.
6 #ifndef CNOID_BODY_MATERIAL_H
7 #define CNOID_BODY_MATERIAL_H
9 #include <cnoid/Referenced>
10 #include <cnoid/ValueTree>
11 #include "exportdecl.h"
23 static int idOfName(
const std::string& name);
24 [[deprecated(
"Use idOfName")]]
25 static int id(
const std::string& name) {
return idOfName(name); }
27 static std::string nameOfId(
int id);
28 [[deprecated(
"Use nameOfId")]]
29 static std::string
name(
int id) {
return nameOfId(
id); }
31 const std::string&
name()
const {
return name_; }
32 void setName(
const std::string& name) { name_ = name; }
40 template<
typename T> T info(
const std::string& key,
const T& defaultValue)
const;
51 template<> CNOID_EXPORT
bool Material::info(
const std::string& key,
const bool& defaultValue)
const;
52 template<> CNOID_EXPORT
int Material::info(
const std::string& key,
const int& defaultValue)
const;
53 template<> CNOID_EXPORT
double Material::info(
const std::string& key,
const double& defaultValue)
const;
const Mapping * info() const
Definition: Material.h:39
Definition: ValueTree.h:253
void setName(const std::string &name)
Definition: Material.h:32
const std::string & name() const
Definition: Material.h:31
void setViscosity(double v)
Definition: Material.h:36
void resetInfo(Mapping *info)
Definition: Material.h:42
Mapping * info()
Definition: Material.h:38
void setRoughness(double r)
Definition: Material.h:34
Definition: Material.h:15
ref_ptr< Material > MaterialPtr
Definition: Material.h:55
double roughness() const
Definition: Material.h:33
static std::string name(int id)
Definition: Material.h:29
Definition: AbstractSceneLoader.h:11
static int id(const std::string &name)
Definition: Material.h:25
Definition: Referenced.h:54
double viscosity() const
Definition: Material.h:35