Skip to content

Commit

Permalink
Map Renderer: Began consolidating sky-fix geometry generation
Browse files Browse the repository at this point in the history
Began reworking this logic with the same edge-centric model as used
by the SectionEdge and ShadowEdge classes.

Wrapped up the sky-fix triangle strip generation into a preliminary
TriangleStripBuilder class. Presently strips can only be built by
adding new edges.

Added C++ ctors to rvertex_t and rtexcoord_t for cleanliness.
  • Loading branch information
danij-deng committed May 15, 2013
1 parent 97b4329 commit 2e1c0f6
Show file tree
Hide file tree
Showing 2 changed files with 338 additions and 88 deletions.
22 changes: 22 additions & 0 deletions doomsday/client/include/render/rendpoly.h
Expand Up @@ -33,10 +33,32 @@ class SectionEdge;

typedef struct rvertex_s {
float pos[3];
#ifdef __cplusplus
rvertex_s(float x = 0, float y = 0, float z = 0) {
pos[0] = x; pos[1] = y; pos[2] = z;
}
rvertex_s(de::Vector3f const &_pos) {
pos[0] = _pos.x; pos[1] = _pos.y; pos[2] = _pos.z;
}
rvertex_s(rvertex_s const &other) {
std::memcpy(pos, other.pos, sizeof(pos));
}
#endif
} rvertex_t;

typedef struct rtexcoord_s {
float st[2];
#ifdef __cplusplus
rtexcoord_s(float s = 0, float t = 0) {
st[0] = s; st[1] = t;
}
rtexcoord_s(de::Vector2f const &_st) {
st[0] = _st.x; st[1] = _st.y;
}
rtexcoord_s(rtexcoord_s const &other) {
std::memcpy(st, other.st, sizeof(st));
}
#endif
} rtexcoord_t;

/**
Expand Down

0 comments on commit 2e1c0f6

Please sign in to comment.