Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/mesh/mesh.h
- This file was moved from extern/draco/dracoenc/src/draco/mesh/mesh.h.
| Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | public: | ||||
| } | } | ||||
| void SetAttributeElementType(int att_id, MeshAttributeElementType et) { | void SetAttributeElementType(int att_id, MeshAttributeElementType et) { | ||||
| attribute_data_[att_id].element_type = et; | attribute_data_[att_id].element_type = et; | ||||
| } | } | ||||
| // Returns the point id of for a corner |ci|. | // Returns the point id of for a corner |ci|. | ||||
| inline PointIndex CornerToPointId(int ci) const { | inline PointIndex CornerToPointId(int ci) const { | ||||
| if (ci == kInvalidCornerIndex.value()) | if (ci < 0 || static_cast<uint32_t>(ci) == kInvalidCornerIndex.value()) { | ||||
| return kInvalidPointIndex; | return kInvalidPointIndex; | ||||
| } | |||||
| return this->face(FaceIndex(ci / 3))[ci % 3]; | return this->face(FaceIndex(ci / 3))[ci % 3]; | ||||
| } | } | ||||
| // Returns the point id of a corner |ci|. | // Returns the point id of a corner |ci|. | ||||
| inline PointIndex CornerToPointId(CornerIndex ci) const { | inline PointIndex CornerToPointId(CornerIndex ci) const { | ||||
| return this->CornerToPointId(ci.value()); | return this->CornerToPointId(ci.value()); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||