1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 07:27:40 +00:00

product:: preliminary version (no turning)

This commit is contained in:
Zeno Rogue
2019-08-17 23:28:41 +02:00
parent f3dd779947
commit 6958cbcbd9
22 changed files with 349 additions and 116 deletions

View File

@@ -656,7 +656,7 @@ EX ld scale_at(const transmatrix& T) {
EX ld linewidthat(const hyperpoint& h) {
if(!(vid.antialias & AA_LINEWIDTH)) return 1;
else if(hyperbolic && pmodel == mdDisk && vid.alpha == 1 && !ISWEB) {
double dz = h[GDIM];
double dz = h[LDIM];
if(dz < 1 || abs(dz-current_display->scrdist) < 1e-6) return 1;
else {
double dx = sqrt(dz * dz - 1);
@@ -893,6 +893,21 @@ void debug_this() { }
void dqi_poly::draw() {
if(flags & POLY_DEBUG) debug_this();
if(prod && vid.usingGL && pmodel == mdPerspective && (current_display->set_all(global_projection), shaderside_projection)) {
auto npoly = *this;
glcoords.clear();
for(int i=0; i<cnt; i++)
glcoords.push_back(glhr::pointtogl(product::where(V * glhr::gltopoint( (*tab)[offset+i]))));
npoly.offset = 0;
npoly.tab = &glcoords;
npoly.V = Id;
set_width(1);
npoly.gldraw();
return;
}
dynamicval<ld> bs(hr::band_shift, band_shift);
if(!hyperbolic && among(pmodel, mdPolygonal, mdPolynomial)) {
bool any = false;