MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / WireChartSphere

Function WireChartSphere

xdevice.cpp:2669–2999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2667// switch. Like XChartSphere() except for 3D wireframe format.
2668
2669void WireChartSphere()
2670{
2671 char sz[cchSzDef], chT;
2672 int rgx[objMax], rgy[objMax], rgz[objMax], zGlyph,
2673 cChart, iChart, zr, xo = 0, yo = 0, zo = 0, xp, yp, zp, i, j, k, k2, nSav;
2674 flag fHouse3D = !us.fHouse3D, fNoHorizon;
2675 real rT;
2676 CONST CP *pcp;
2677 CP cpSav;
2678 byte ignoreSav[objMax];
2679 ES es;
2680#ifdef SWISS
2681 ES *pes1, *pes2;
2682#endif
2683
2684 // Initialize variables.
2685 if (gs.fText && gs.fDoSidebar)
2686 gs.xWin -= xSideT;
2687
2688 fNoHorizon = ignorez[0] && ignorez[1] && ignorez[2] && ignorez[3];
2689 zGlyph = 7*gi.nScale;
2690 zr = Min(gs.xWin >> 1, gs.yWin >> 1) - zGlyph;
2691 if (!(us.nRel <= rcTransit))
2692 cChart = 1 - (FBetween(us.nRel, rcHexaWheel, rcDual) ? us.nRel : 0);
2693 else {
2694 cChart = 2;
2695 CopyRgb(ignore, ignoreSav, sizeof(ignore));
2696 }
2697
2698 // Draw constellations.
2699 if (gs.fConstel) {
2700 neg(gs.rTilt);
2701 WireDrawGlobe(fTrue, gs.rRot);
2702 neg(gs.rTilt);
2703 }
2704
2705 // Draw horizon.
2706 if (!fNoHorizon || (!gs.fHouseExtra && fHouse3D)) {
2707 if (!gs.fColorHouse)
2708 DrawColor(gi.kiOn);
2709 for (i = 0; i <= nDegMax; i++) {
2710 if (gs.fColorHouse && (i == 0 || i == nDegHalf))
2711 DrawColor(kSignB(i ? sLib : sAri));
2712 WireSphereLocal((real)i, 0.0, zr, &xp, &yp, &zp);
2713 if (i > 0) {
2714 WireLine(xo, yo, zo, xp, yp, zp);
2715 k = i % 10 == 0 ? 3 : (i % 5 == 0 ? 2 : 1);
2716 for (j = -k; j <= k; j += (k << 1)) {
2717 WireSphereLocal((real)i, (real)j / 2.0, zr, &xo, &yo, &zo);
2718 WireLine(xo, yo, zo, xp, yp, zp);
2719 }
2720 }
2721 xo = xp; yo = yp; zo = zp;
2722 }
2723 }
2724
2725 // Draw Earth's equator.
2726 if (gs.fEquator) {

Callers 1

DrawChartXFunction · 0.85

Calls 15

CopyRgbFunction · 0.85
WireDrawGlobeFunction · 0.85
DrawColorFunction · 0.85
WireSphereLocalFunction · 0.85
WireLineFunction · 0.85
WireSphereEarthFunction · 0.85
WireSpherePrimeFunction · 0.85
ModFunction · 0.85
WireSphereMeridianFunction · 0.85
WireSphereZodiacFunction · 0.85
DrawSignFunction · 0.85
DrawHouseFunction · 0.85

Tested by

no test coverage detected