23 #ifndef __PLY_EXAMPLES_H__
24 #define __PLY_EXAMPLES_H__
46 value =
val;
return true;
52 val = (float)value;
return true;
67 Vertex(): value_x(0), value_y(0), value_z(0) {}
74 Vertex(
float x,
float y,
float z): value_x(x), value_y(y), value_z(z) {}
78 if (prop.
name.compare(prop_x.
name.c_str()) == 0)
return &value_x;
79 else if (prop.
name.compare(prop_y.
name.c_str()) == 0)
return &value_y;
80 else if (prop.
name.compare(prop_z.
name.c_str()) == 0)
return &value_z;
87 elem.
props.push_back(prop_x);
88 elem.
props.push_back(prop_y);
89 elem.
props.push_back(prop_z);
97 float x()
const {
double dval; value_x.
get_scalar(prop_x, dval);
return (
float)dval; }
101 float y()
const {
double dval; value_y.
get_scalar(prop_y, dval);
return (
float)dval; }
105 float z()
const {
double dval; value_z.
get_scalar(prop_z, dval);
return (
float)dval; }
123 static const char*
name;
154 for (
size_t n = 0; n <
size; ++n) {
170 elem.
props.push_back(prop_ind);
184 size_t vertex(
const size_t& num)
const {
double index;
indices.
get_item(prop_ind, num, index);
return (
size_t)index; }
200 static const char*
name;
290 #endif // __PLY_EXAMPLES_H__