draco/docs/spec/mesh.attribute.indices.encoding.observer.md
Lou Quillio 8d8c88e08f Re-org files, refine styles, add README, et al.
Draco bitstream spec source should be ready for author contributions.
2017-07-12 15:18:53 -07:00

19 lines
493 B
Markdown

## Mesh Attribute Indices Encoding Observer
### OnNewVertexVisited()
~~~~~
OnNewVertexVisited(vertex, corner) {
point_id = mesh_->face(corner / 3)[corner % 3];
sequencer_->AddPointId(point_id);
// Keep track of visited corners.
encoding_data_->encoded_attribute_value_index_to_corner_map.push_back(corner);
encoding_data_
->vertex_to_encoded_attribute_value_index_map[vertex] =
encoding_data_->num_values;
encoding_data_->num_values++;
}
~~~~~
{:.draco-syntax }