Ocean
Loading...
Searching...
No Matches
MtlScanner.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_SCENEDESCRIPTION_SDL_OBJ_MTL_SCANNER_H
9#define META_OCEAN_SCENEDESCRIPTION_SDL_OBJ_MTL_SCANNER_H
10
12
13#include "ocean/io/Scanner.h"
14
15namespace Ocean
16{
17
18namespace SceneDescription
19{
20
21namespace SDL
22{
23
24namespace OBJ
25{
26
27/**
28 * This class implements a scanner able to scan obj mtl token.
29 * @ingroup scenedescriptionsdlobj
30 */
31class OCEAN_SCENEDESCRIPTION_SDL_OBJ_EXPORT MtlScanner : public IO::Scanner
32{
33 public:
34
35 /**
36 * Defines different obj mtl keywords.
37 */
38 enum Keyword : uint32_t
39 {
40 /// Mtl keyword
42 /// Mtl keyword
44 /// Mtl keyword 'illum' identifying the illumination model.
46 /// Mtl keyword 'Ka' identifying the ambient color.
48 /// Mtl keyword 'Kd' identifying the diffuse color.
50 /// Mtl keyword 'Ke' identifying the emissive color.
52 /// Mtl keyword 'Ks' identifying the specular color.
54 /// Mtl keyword
56 /// Mtl keyword
58 /// Mtl keyword
60 /// Mtl keyword
62 /// Mtl keyword
64 /// Mtl keyword
66 /// Mtl keyword
68 /// Mtl keyword
70 /// Mtl keyword 'mtllib' identifying a material library.
72 /// Mtl keyword
74 /// Mtl keyword
76 /// Mtl keyword
78 /// Mtl keyword
80 /// Mtl keyword
82 /// Mtl keyword
83 KEYWORD_TR
84 };
85
86 public:
87
88 /**
89 * Creates a new mtl scanner.
90 * @param filename Name of the file to scan
91 */
92 MtlScanner(const std::string& filename);
93};
94
95}
96
97}
98
99}
100
101}
102
103#endif // META_OCEAN_SCENEDESCRIPTION_SDL_OBJ_MTL_SCANNER_H
This class implements a simple scanner.
Definition Scanner.h:31
This class implements a scanner able to scan obj mtl token.
Definition MtlScanner.h:32
Keyword
Defines different obj mtl keywords.
Definition MtlScanner.h:39
@ KEYWORD_MAP_BUMP
Mtl keyword.
Definition MtlScanner.h:55
@ KEYWORD_KA
Mtl keyword 'Ka' identifying the ambient color.
Definition MtlScanner.h:47
@ KEYWORD_KD
Mtl keyword 'Kd' identifying the diffuse color.
Definition MtlScanner.h:49
@ KEYWORD_KS
Mtl keyword 'Ks' identifying the specular color.
Definition MtlScanner.h:53
@ KEYWORD_MAP_OPACITY
Mtl keyword.
Definition MtlScanner.h:67
@ KEYWORD_ILLUM
Mtl keyword 'illum' identifying the illumination model.
Definition MtlScanner.h:45
@ KEYWORD_MAP_D
Mtl keyword.
Definition MtlScanner.h:57
@ KEYWORD_TF
Mtl keyword.
Definition MtlScanner.h:81
@ KEYWORD_NS
Mtl keyword.
Definition MtlScanner.h:75
@ KEYWORD_MAP_KS
Mtl keyword.
Definition MtlScanner.h:63
@ KEYWORD_MAP_NS
Mtl keyword.
Definition MtlScanner.h:65
@ KEYWORD_KE
Mtl keyword 'Ke' identifying the emissive color.
Definition MtlScanner.h:51
@ KEYWORD_MAP_KD
Mtl keyword.
Definition MtlScanner.h:61
@ KEYWORD_MAP_KA
Mtl keyword.
Definition MtlScanner.h:59
@ KEYWORD_SHARPNESS
Mtl keyword.
Definition MtlScanner.h:79
@ KEYWORD_MAP_REFL
Mtl keyword.
Definition MtlScanner.h:69
@ KEYWORD_REFL
Mtl keyword.
Definition MtlScanner.h:77
@ KEYWORD_BUMP
Mtl keyword.
Definition MtlScanner.h:41
@ KEYWORD_NEWMTL
Mtl keyword 'mtllib' identifying a material library.
Definition MtlScanner.h:71
@ KEYWORD_D
Mtl keyword.
Definition MtlScanner.h:43
@ KEYWORD_NI
Mtl keyword.
Definition MtlScanner.h:73
MtlScanner(const std::string &filename)
Creates a new mtl scanner.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15