Differential D9642 Diff 31697 extern/draco/draco/src/draco/compression/mesh/traverser/traverser_base.h
Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/compression/mesh/traverser/traverser_base.h
- This file was moved from extern/draco/dracoenc/src/draco/compression/mesh/traverser/traverser_base.h.
| Show All 37 Lines | virtual void Init(const CornerTable *corner_table, | ||||
| is_face_visited_.assign(corner_table->num_faces(), false); | is_face_visited_.assign(corner_table->num_faces(), false); | ||||
| is_vertex_visited_.assign(corner_table_->num_vertices(), false); | is_vertex_visited_.assign(corner_table_->num_vertices(), false); | ||||
| traversal_observer_ = traversal_observer; | traversal_observer_ = traversal_observer; | ||||
| } | } | ||||
| const CornerTable &GetCornerTable() const { return *corner_table_; } | const CornerTable &GetCornerTable() const { return *corner_table_; } | ||||
| inline bool IsFaceVisited(FaceIndex face_id) const { | inline bool IsFaceVisited(FaceIndex face_id) const { | ||||
| if (face_id == kInvalidFaceIndex) | if (face_id == kInvalidFaceIndex) { | ||||
| return true; // Invalid faces are always considered as visited. | return true; // Invalid faces are always considered as visited. | ||||
| } | |||||
| return is_face_visited_[face_id.value()]; | return is_face_visited_[face_id.value()]; | ||||
| } | } | ||||
| // Returns true if the face containing the given corner was visited. | // Returns true if the face containing the given corner was visited. | ||||
| inline bool IsFaceVisited(CornerIndex corner_id) const { | inline bool IsFaceVisited(CornerIndex corner_id) const { | ||||
| if (corner_id == kInvalidCornerIndex) | if (corner_id == kInvalidCornerIndex) { | ||||
| return true; // Invalid faces are always considered as visited. | return true; // Invalid faces are always considered as visited. | ||||
| } | |||||
| return is_face_visited_[corner_id.value() / 3]; | return is_face_visited_[corner_id.value() / 3]; | ||||
| } | } | ||||
| inline void MarkFaceVisited(FaceIndex face_id) { | inline void MarkFaceVisited(FaceIndex face_id) { | ||||
| is_face_visited_[face_id.value()] = true; | is_face_visited_[face_id.value()] = true; | ||||
| } | } | ||||
| inline bool IsVertexVisited(VertexIndex vert_id) const { | inline bool IsVertexVisited(VertexIndex vert_id) const { | ||||
| return is_vertex_visited_[vert_id.value()]; | return is_vertex_visited_[vert_id.value()]; | ||||
| Show All 23 Lines | |||||