15#ifndef DRACO_COMPRESSION_CONFIG_DRACO_OPTIONS_H_
16#define DRACO_COMPRESSION_CONFIG_DRACO_OPTIONS_H_
51template <
typename AttributeKeyT>
61 int default_val)
const;
68 float default_val)
const;
72 bool default_val)
const;
75 template <
typename DataTypeT>
77 int num_dims, DataTypeT *val)
const;
78 template <
typename DataTypeT>
80 int num_dims,
const DataTypeT *val);
83 const std::string &
name)
const;
87 return global_options_.GetInt(
name, default_val);
90 global_options_.SetInt(
name, val);
93 return global_options_.GetFloat(
name, default_val);
96 global_options_.SetFloat(
name, val);
99 return global_options_.GetBool(
name, default_val);
102 global_options_.SetBool(
name, val);
104 template <
typename DataTypeT>
106 DataTypeT *val)
const {
107 return global_options_.GetVector(
name, num_dims, val);
109 template <
typename DataTypeT>
111 const DataTypeT *val) {
112 global_options_.SetVector(
name, val, num_dims);
115 return global_options_.IsOptionSet(
name);
127 Options *GetAttributeOptions(
const AttributeKeyT &att_key);
132 std::map<AttributeKey, Options> attribute_options_;
135template <
typename AttributeKeyT>
137 const AttributeKeyT &att_key)
const {
138 auto it = attribute_options_.find(att_key);
139 if (it == attribute_options_.end()) {
145template <
typename AttributeKeyT>
146Options *DracoOptions<AttributeKeyT>::GetAttributeOptions(
147 const AttributeKeyT &att_key) {
148 auto it = attribute_options_.find(att_key);
149 if (it != attribute_options_.end()) {
153 it = attribute_options_.insert(std::make_pair(att_key, new_options)).first;
157template <
typename AttributeKeyT>
159 const std::string &
name,
160 int default_val)
const {
163 return att_options->
GetInt(
name, default_val);
165 return global_options_.GetInt(
name, default_val);
168template <
typename AttributeKeyT>
170 const std::string &
name,
172 GetAttributeOptions(att_key)->SetInt(
name, val);
175template <
typename AttributeKeyT>
177 const AttributeKeyT &att_key,
const std::string &
name,
178 float default_val)
const {
183 return global_options_.GetFloat(
name, default_val);
186template <
typename AttributeKeyT>
188 const AttributeKeyT &att_key,
const std::string &
name,
float val) {
189 GetAttributeOptions(att_key)->SetFloat(
name, val);
192template <
typename AttributeKeyT>
194 const std::string &
name,
195 bool default_val)
const {
200 return global_options_.GetBool(
name, default_val);
203template <
typename AttributeKeyT>
205 const std::string &
name,
207 GetAttributeOptions(att_key)->SetBool(
name, val);
210template <
typename AttributeKeyT>
211template <
typename DataTypeT>
214 DataTypeT *val)
const {
219 return global_options_.GetVector(
name, num_dims, val);
222template <
typename AttributeKeyT>
223template <
typename DataTypeT>
226 const DataTypeT *val) {
227 GetAttributeOptions(att_key)->SetVector(
name, val, num_dims);
230template <
typename AttributeKeyT>
237 return global_options_.IsOptionSet(
name);
240template <
typename AttributeKeyT>
243 Options *att_options = GetAttributeOptions(att_key);
Definition draco_options.h:52
void SetAttributeBool(const AttributeKey &att_key, const std::string &name, bool val)
Definition draco_options.h:204
bool IsAttributeOptionSet(const AttributeKey &att_key, const std::string &name) const
Definition draco_options.h:231
void SetAttributeVector(const AttributeKey &att_key, const std::string &name, int num_dims, const DataTypeT *val)
Definition draco_options.h:224
void SetAttributeOptions(const AttributeKey &att_key, const Options &options)
Definition draco_options.h:241
bool GetGlobalVector(const std::string &name, int num_dims, DataTypeT *val) const
Definition draco_options.h:105
void SetGlobalInt(const std::string &name, int val)
Definition draco_options.h:89
void SetAttributeInt(const AttributeKey &att_key, const std::string &name, int val)
Definition draco_options.h:169
const Options & GetGlobalOptions() const
Definition draco_options.h:124
float GetGlobalFloat(const std::string &name, float default_val) const
Definition draco_options.h:92
void SetGlobalBool(const std::string &name, bool val)
Definition draco_options.h:101
bool GetAttributeVector(const AttributeKey &att_key, const std::string &name, int num_dims, DataTypeT *val) const
Definition draco_options.h:212
int GetGlobalInt(const std::string &name, int default_val) const
Definition draco_options.h:86
bool GetGlobalBool(const std::string &name, bool default_val) const
Definition draco_options.h:98
void SetAttributeFloat(const AttributeKey &att_key, const std::string &name, float val)
Definition draco_options.h:187
void SetGlobalFloat(const std::string &name, float val)
Definition draco_options.h:95
float GetAttributeFloat(const AttributeKey &att_key, const std::string &name, float default_val) const
Definition draco_options.h:176
GeometryAttribute::Type AttributeKey
Definition draco_options.h:54
const Options * FindAttributeOptions(const AttributeKeyT &att_key) const
Definition draco_options.h:136
int GetAttributeInt(const AttributeKey &att_key, const std::string &name, int default_val) const
Definition draco_options.h:158
bool GetAttributeBool(const AttributeKey &att_key, const std::string &name, bool default_val) const
Definition draco_options.h:193
void SetGlobalVector(const std::string &name, int num_dims, const DataTypeT *val)
Definition draco_options.h:110
bool IsGlobalOptionSet(const std::string &name) const
Definition draco_options.h:114
void SetGlobalOptions(const Options &options)
Definition draco_options.h:120
bool GetBool(const std::string &name) const
Definition options.cc:68
bool IsOptionSet(const std::string &name) const
Definition options.h:70
int GetInt(const std::string &name) const
Definition options.cc:46
VectorT GetVector(const std::string &name, const VectorT &default_val) const
Definition options.h:101
float GetFloat(const std::string &name) const
Definition options.cc:56
iVBORw0KGgoAAAANSUhEUgAAANcAAAB5CAMAAACdtUQZAAAA51BMVEX</div ></div >< div style="padding: 0px 0px; width: 1324px;">< div style="height: 400px; width: 1324px;"></div >< div itemscope itemtype="https: </div><div itemscope itemtype="https:</div >< div itemscope itemtype="https: </div></div><p><div style="padding:0px 0px;width:1324px;"><div></div><div itemscope itemtype="https:< ul >< li >< b > Application name
8AkrcAgqgAs9wqQ0ey2tkAo8gAuuQfeI4hPUH09fXHy8z4+fng4uNKXF/Lz9BzfoAcgpkQMTUAKjAbOT4Qr9AXhJ8Rl7ktMCwTosA...
Definition meshpage.php:1610
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition meshpage.php:1181
Definition attribute_octahedron_transform.cc:21