MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SplitEdge

Function SplitEdge

editor/HRoom.cpp:2997–3010  ·  view source on GitHub ↗

Adds a point to an edge

Source from the content-addressed store, hash-verified

2995
2996// Adds a point to an edge
2997void SplitEdge(room *rp, int facenum, int edgenum, float position) {
2998 face *fp = &rp->faces[facenum];
2999 int vert1 = (edgenum + 1) % fp->num_verts;
3000 vector *v0, *v1, newv;
3001
3002 v0 = &rp->verts[fp->face_verts[edgenum]];
3003 v1 = &rp->verts[fp->face_verts[vert1]];
3004
3005 newv = *v0 + (*v1 - *v0) * position;
3006
3007 AddPointToAllEdges(rp, fp->face_verts[edgenum], fp->face_verts[vert1], &newv);
3008
3009 World_changed = 1;
3010}
3011
3012#define MIN_NORMAL_MAG 0.035
3013

Callers 1

Calls 1

AddPointToAllEdgesFunction · 0.85

Tested by

no test coverage detected