MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / addTriangle

Method addTriangle

examples/TinyRenderer/model.cpp:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 uv_.push_back(Vec2f(u, v));
105}
106void Model::addTriangle(int vertexposIndex0, int normalIndex0, int uvIndex0,
107 int vertexposIndex1, int normalIndex1, int uvIndex1,
108 int vertexposIndex2, int normalIndex2, int uvIndex2)
109{
110 std::vector<Vec3i> f;
111 f.push_back(Vec3i(vertexposIndex0, normalIndex0, uvIndex0));
112 f.push_back(Vec3i(vertexposIndex1, normalIndex1, uvIndex1));
113 f.push_back(Vec3i(vertexposIndex2, normalIndex2, uvIndex2));
114 faces_.push_back(f);
115}
116
117Model::~Model() {}
118

Callers 8

registerMeshShapeMethod · 0.45
registerMesh2Method · 0.45
createCubeMethod · 0.45
initPhysicsMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by 1

initPhysicsMethod · 0.36