15#ifndef DRACO_MESH_MESH_ATTRIBUTE_CORNER_TABLE_H_
16#define DRACO_MESH_MESH_ATTRIBUTE_CORNER_TABLE_H_
46 return is_edge_on_seam_[corner.value()];
51 return kInvalidCornerIndex;
53 return corner_table_->Opposite(corner);
57 return corner_table_->Next(corner);
61 return corner_table_->Previous(corner);
66 return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
89 return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
91 int num_faces()
const {
return static_cast<int>(corner_table_->num_faces()); }
92 int num_corners()
const {
return corner_table_->num_corners(); }
99 return corner_to_vertex_map_[corner.value()];
103 return VertexIndex(vertex_to_attribute_entry_id_map_[vert.value()].value());
107 return vertex_to_left_most_corner_map_[v.value()];
111 return corner_table_->Face(corner);
115 return corner_table_->FirstCorner(face);
119 return corner_table_->AllCorners(face);
124 if (corner == kInvalidCornerIndex) {
127 if (
SwingLeft(corner) == kInvalidCornerIndex) {
136 return corner_table_->IsDegenerated(face);
153 if (c == kInvalidCornerIndex) {
170 return valence_cache_;
174 template <
bool init_vertex_to_attribute_entry_map>
177 std::vector<bool> is_edge_on_seam_;
178 std::vector<bool> is_vertex_on_seam_;
182 bool no_interior_seams_;
184 std::vector<VertexIndex> corner_to_vertex_map_;
191 std::vector<CornerIndex> vertex_to_left_most_corner_map_;
196 std::vector<AttributeValueIndex> vertex_to_attribute_entry_id_map_;
Definition corner_table.h:53
int ConfidentValence(CornerIndex c) const
Definition mesh_attribute_corner_table.h:158
const ValenceCache< MeshAttributeCornerTable > & GetValenceCache() const
Definition mesh_attribute_corner_table.h:169
FaceIndex Face(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:110
MeshAttributeCornerTable()
Definition mesh_attribute_corner_table.cc:22
CornerIndex FirstCorner(FaceIndex face) const
Definition mesh_attribute_corner_table.h:114
const CornerTable * corner_table() const
Definition mesh_attribute_corner_table.h:140
CornerIndex Next(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:56
std::array< CornerIndex, 3 > AllCorners(FaceIndex face) const
Definition mesh_attribute_corner_table.h:118
bool RecomputeVertices(const Mesh *mesh, const PointAttribute *att)
Definition mesh_attribute_corner_table.cc:129
VertexIndex VertexParent(VertexIndex vert) const
Definition mesh_attribute_corner_table.h:102
CornerIndex SwingRight(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:79
int num_vertices() const
Definition mesh_attribute_corner_table.h:88
bool InitFromAttribute(const Mesh *mesh, const CornerTable *table, const PointAttribute *att)
Definition mesh_attribute_corner_table.cc:41
void AddSeamEdge(CornerIndex opp_corner)
Definition mesh_attribute_corner_table.cc:108
CornerIndex GetRightCorner(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:74
VertexIndex ConfidentVertex(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:98
bool IsCornerOppositeToSeamEdge(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:45
int num_faces() const
Definition mesh_attribute_corner_table.h:91
int Valence(CornerIndex c) const
Definition mesh_attribute_corner_table.h:151
bool no_interior_seams() const
Definition mesh_attribute_corner_table.h:139
CornerIndex GetLeftCorner(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:71
CornerIndex LeftMostCorner(VertexIndex v) const
Definition mesh_attribute_corner_table.h:106
int ConfidentValence(VertexIndex v) const
Definition mesh_attribute_corner_table.cc:207
int Valence(VertexIndex v) const
Definition mesh_attribute_corner_table.cc:200
bool IsDegenerated(FaceIndex face) const
Definition mesh_attribute_corner_table.h:133
VertexIndex Vertex(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:94
bool IsOnBoundary(VertexIndex vert) const
Definition mesh_attribute_corner_table.h:122
bool IsCornerOnSeam(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:65
CornerIndex Opposite(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:49
bool InitEmpty(const CornerTable *table)
Definition mesh_attribute_corner_table.cc:25
int num_corners() const
Definition mesh_attribute_corner_table.h:92
CornerIndex Previous(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:60
CornerIndex SwingLeft(CornerIndex corner) const
Definition mesh_attribute_corner_table.h:84
Definition point_attribute.h:33
Definition valence_cache.h:31
#define DRACO_DCHECK_LT(a, b)
Definition macros.h:86
Definition attribute_octahedron_transform.cc:21
VertexIndex VertexIndex
Definition mesh_edgebreaker_encoder_impl.cc:37
CornerIndex CornerIndex
Definition mesh_edgebreaker_encoder_impl.cc:35
FaceIndex FaceIndex
Definition mesh_edgebreaker_encoder_impl.cc:36