Go to the documentation of this file.
6 #ifndef CNOID_UTIL_STD_SCENE_READER_H
7 #define CNOID_UTIL_STD_SCENE_READER_H
12 #include <cnoid/stdx/filesystem>
13 #include "exportdecl.h"
18 class FilePathVariableProcessor;
26 void setMessageSink(std::ostream& os);
27 void setDefaultDivisionNumber(
int n);
28 int defaultDivisionNumber()
const;
31 void setBaseDirectory(
const std::string& directory);
34 std::string baseDirectory()
const;
35 stdx::filesystem::path baseDirPath()
const;
39 void readHeader(
Mapping* info,
double formatVersion);
42 void setAngleUnit(AngleUnit unit);
47 return isDegreeMode_ ?
radian(angle) : angle;
50 return isDegreeMode_ ?
radian(angle) : angle;
53 bool readAngle(
const Mapping* info,
const char* key,
double& angle)
const;
54 bool readAngle(
const Mapping* info, std::initializer_list<const char*> keys,
double& angle)
const;
55 bool readAngle(
const Mapping* info,
const char* key,
float& angle)
const;
56 bool readAngle(
const Mapping* info, std::initializer_list<const char*> keys,
float& angle)
const;
58 bool readRotation(
const Mapping* info,
const char* key,
Matrix3& out_R)
const;
59 bool readRotation(
const Mapping* info, std::initializer_list<const char*> keys,
Matrix3& out_R)
const;
62 bool readTranslation(
const Mapping* info,
const char* key,
Vector3& out_p)
const;
77 typedef std::function<std::string(
const std::string& path, std::ostream& os)>
UriSchemeHandler;
79 static void registerUriSchemeHandler(
const std::string& scheme,
UriSchemeHandler handler);
81 [[deprecated(
"Use readAngle(const Mapping* info, const char* key, double& angle) const")]]
82 bool readAngle(
const Mapping& info,
const char* key,
double& angle)
const;
83 [[deprecated(
"Use readAngle(const Mapping* info, const char* key, float& angle) const")]]
84 bool readAngle(
const Mapping& info,
const char* key,
float& angle)
const;
85 [[deprecated(
"Use readRotation(const Mapping* info, Matrix3& out_R) const")]]
87 [[deprecated(
"Use readRotation(const Mapping* info, const char* key, Matrix3& out_R) const")]]
88 bool readRotation(
const Mapping& info,
const char* key,
Matrix3& out_R)
const;
89 [[deprecated(
"Use extractRotation(Mapping* info, Matrix3& out_R) const")]]
91 [[deprecated(
"Use readTranslation(const Mapping* info, Vector3& out_p) const")]]
93 [[deprecated(
"Use readTranslation(const Mapping* info, const char* key, Vector3& out_p) const")]]
94 bool readTranslation(
const Mapping& info,
const char* key,
Vector3& out_p)
const;
95 [[deprecated(
"Use extractTranslation(Mapping* info, Vector3& out_p) const")]]
97 [[deprecated(
"Use readNode(Mapping* info)")]]
99 [[deprecated(
"Use readNode(Mapping* info, const std::string& type)")]]
101 [[deprecated(
"Use readResourceNode(Mapping* info)")]]
Definition: YAMLReader.h:15
Definition: ValueTree.h:253
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
std::string fragment
Definition: StdSceneReader.h:73
std::string uri
Definition: StdSceneReader.h:71
AngleUnit
Definition: StdSceneReader.h:41
Definition: ValueTree.h:34
ValueNodePtr info
Definition: StdSceneReader.h:70
Eigen::Matrix3d Matrix3
Definition: EigenTypes.h:56
Vector3 radian(const Vector3 &v)
Definition: EigenUtil.h:16
std::string directory
Definition: StdSceneReader.h:72
std::function< std::string(const std::string &path, std::ostream &os)> UriSchemeHandler
Definition: StdSceneReader.h:77
Definition: FilePathVariableProcessor.h:18
Definition: AbstractSceneLoader.h:11
bool isDegreeMode() const
Definition: StdSceneReader.h:43
double toRadian(double angle) const
Definition: StdSceneReader.h:46
float toRadian(float angle) const
Definition: StdSceneReader.h:49
SgNodePtr scene
Definition: StdSceneReader.h:69
Definition: SceneGraph.h:157
Definition: StdSceneReader.h:20
Definition: StdSceneReader.h:68