0001: #include "stdafx.h"
0002: #include "prim.h"
0003: 
0004: namespace Render {
0005: 
0006: OBJ_DATA sphere_data[] = {
0007: {// 小さいのに乗ってるほう
0008:     OBJ_TYPE_SPHERE,
0009:     {
0010:         {0.10f, 0.100f, 0.10f},
0011:         0.2f, 0.8f, 0.0f, 0.0f,
0012:     },{{0,0,0},{0,0,0},{0,0,0},},{
0013:         {125.5, 0+100,169},
0014: //      {185.5, 165+100,169},
0015:         100.0f,
0016:     }
0017: },{// 大きいのに乗ってるほう
0018:     OBJ_TYPE_SPHERE,
0019:     {
0020:         {0.05f, 0.050f, 0.05f},
0021:         0.80f, 0.00f, 0.20f, 0.0f,
0022:     },{{0,0,0},{0,0,0},{0,0,0},},{
0023:         {368.5, 330+100,351},
0024:         100.0f,
0025:     }
0026: }};
0027: OBJ_DATA room_data[14] = {
0028: {
0029: // ライト1
0030:     OBJ_TYPE_TRIANGLE,
0031:     {
0032:         {100.0f*1.00f, 100.0f*0.90f, 100.0f*0.50f},
0033:         0.0f, 0.0f, 0.0f, 1.0f,
0034:     },{
0035:         {213.0, 548.799f, 227.0},
0036:         {213.0, 548.799f, 332.0},
0037:         {343.0, 548.799f, 227.0},
0038:     }
0039: },{// ライト2
0040:     OBJ_TYPE_TRIANGLE,
0041:     {
0042:         {100.0f*1.00f, 100.0f*0.90f, 100.0f*0.50f},
0043:         0.0f, 0.0f, 0.0f, 1.0f,
0044:     },{
0045:         {343.0, 548.799f, 227.0},
0046:         {213.0, 548.799f, 332.0},
0047:         {343.0, 548.799f, 332.0},
0048:     }
0049: },{ // 左1
0050:     OBJ_TYPE_TRIANGLE,
0051:     {
0052:         {0.70f, 0.15f, 0.15f},
0053:         0.0f, 0.0f, 1.0f, 0.0f,
0054:     },{
0055:         {552.8f,   0.0f,   0.0f},
0056:         {556.0f, 548.8f,   0.0f},
0057:         {549.6f,   0.0f, 559.2f},
0058:     }
0059: 
0060: },{// 左2
0061:     OBJ_TYPE_TRIANGLE,
0062:     {
0063:         {0.70f, 0.15f, 0.15f},
0064:         0.0f, 0.0f, 1.0f, 0.0f,
0065:     },{
0066:         {549.6f,   0.0f, 559.2f},
0067:         {556.0f, 548.8f,   0.0f},
0068:         {556.0f, 548.8f, 559.2f},
0069:     }
0070: 
0071: },{// 右1
0072:     OBJ_TYPE_TRIANGLE,
0073:     {
0074:         {0.15f, 0.15f, 0.70f},
0075:         0.0f, 0.0f, 1.0f, 0.0f,
0076:     },{
0077:         {0.0f,   0.0f,   0.0f},
0078:         {0.0f,   0.0f, 559.2f},
0079:         {0.0f, 548.8f,   0.0f},
0080:     }
0081: 
0082: },{// 右2
0083:     OBJ_TYPE_TRIANGLE,
0084:     {
0085:         {0.15f, 0.15f, 0.70f},
0086:         0.0f, 0.0f, 1.0f, 0.0f,
0087:     },{
0088:         {0.0f, 548.8f,   0.0f},
0089:         {0.0f,   0.0f, 559.2f},
0090:         {0.0f, 548.8f, 559.2f},
0091:     }
0092: 
0093: },{// 奥1
0094:     OBJ_TYPE_TRIANGLE,
0095:     {
0096:         {0.70f, 0.70f, 0.70f},
0097:         0.0f, 0.0f, 1.0f, 0.0f,
0098:     },{
0099:         {  0.0f,   0.0f, 559.2f},
0100:         {549.6f,   0.0f, 559.2f},
0101:         {  0.0f, 548.8f, 559.2f},
0102:     }
0103: 
0104: },{// 奥2
0105:     OBJ_TYPE_TRIANGLE,
0106:     {
0107:         {0.70f, 0.70f, 0.70f},
0108:         0.0f, 0.0f, 1.0f, 0.0f,
0109:     },{
0110:         {  0.0f, 548.8f, 559.2f},
0111:         {549.6f,   0.0f, 559.2f},
0112:         {556.0f, 548.8f, 559.2f},
0113:     }
0114: 
0115: },{// 天井1
0116:     OBJ_TYPE_TRIANGLE,
0117:     {
0118:         {0.70f, 0.70f, 0.70f},
0119:         0.0f, 0.0f, 1.0f, 0.0f,
0120:     },{
0121:         {  0.0f, 548.8f,   0.0f},
0122:         {  0.0f, 548.8f, 559.2f},
0123:         {556.0f, 548.8f,   0.0f},
0124:     }
0125: 
0126: },{// 天井2
0127:     OBJ_TYPE_TRIANGLE,
0128:     {
0129:         {0.70f, 0.70f, 0.70f},
0130:         0.0f, 0.0f, 1.0f, 0.0f,
0131:     },{
0132:         {  0.0f, 548.8f, 559.2f},
0133:         {556.0f, 548.8f, 559.2f},
0134:         {556.0f, 548.8f,   0.0f},
0135:     }
0136: 
0137: },{// 床1
0138:     OBJ_TYPE_TRIANGLE,
0139:     {
0140:         {0.70f, 0.70f, 0.70f},
0141:         0.0f, 0.0f, 1.0f, 0.0f,
0142:     },{
0143:         {  0.0f, 0.0f,   0.0f},
0144:         {552.8f, 0.0f,   0.0f},
0145:         {  0.0f, 0.0f, 559.2f},
0146:     }
0147: },{// 床1
0148:     OBJ_TYPE_TRIANGLE,
0149:     {
0150:         {0.70f, 0.70f, 0.70f},
0151:         0.0f, 0.0f, 1.0f, 0.0f,
0152:     },{
0153:         {  0.0f, 0.0f, 559.2f},
0154:         {552.8f, 0.0f,   0.0f},
0155:         {549.6f, 0.0f, 559.2f},
0156:     }
0157: },{// 手前1
0158:     OBJ_TYPE_TRIANGLE,
0159:     {
0160:         {0.70f, 0.70f, 0.70f},
0161:         0.0f, 0.0f, 1.0f, 0.0f,
0162:     },{
0163:         {  0.0f,   0.0f, 0.0f},
0164:         {  0.0f, 548.8f, 0.0f},
0165:         {549.6f,   0.0f, 0.0f},
0166:     }
0167: 
0168: },{// 手前2
0169:     OBJ_TYPE_TRIANGLE,
0170:     {
0171:         {0.70f, 0.70f, 0.70f},
0172:         0.0f, 0.0f, 1.0f, 0.0f,
0173:     },{
0174:         {  0.0f, 548.8f, 0.0f},
0175:         {556.0f, 548.8f, 0.0f},
0176:         {549.6f,   0.0f, 0.0f},
0177:     }
0178: 
0179: 
0180: }};
0181: 
0182: 
0183: OBJ_DATA Short_block[] = {
0184: {
0185:     // 床
0186:     OBJ_TYPE_TRIANGLE,
0187:     {
0188:         {0.70f, 0.70f, 0.70f},
0189:         0.0f, 0.0f, 1.0f, 0.0f,
0190:     },{
0191:         { 82.0f, 165.0f, 225.0f},
0192:         {130.0f, 165.0f,  65.0f},
0193:         {240.0f, 165.0f, 272.0f},
0194:     }
0195: },{
0196:     OBJ_TYPE_TRIANGLE,
0197:     {
0198:         {0.70f, 0.70f, 0.70f},
0199:         0.0f, 0.0f, 1.0f, 0.0f,
0200:     },{
0201:         {290.0, 165.0, 114.0},
0202:         {240.0, 165.0, 272.0},
0203:         {130.0, 165.0,  65.0},
0204:     }
0205: },{//側面
0206:     OBJ_TYPE_TRIANGLE,
0207:     {
0208:         {0.70f, 0.70f, 0.70f},
0209:         0.0f, 0.0f, 1.0f, 0.0f,
0210:     },{
0211:         {290.0, 165.0, 114.0},
0212:         {290.0,   0.0, 114.0},
0213:         {240.0, 165.0, 272.0},
0214:     }
0215: },{
0216:     OBJ_TYPE_TRIANGLE,
0217:     {
0218:         {0.70f, 0.70f, 0.70f},
0219:         0.0f, 0.0f, 1.0f, 0.0f,
0220:     },{
0221:         {240.0, 165.0, 272.0},
0222:         {290.0,   0.0, 114.0},
0223:         {240.0,   0.0, 272.0},
0224:     }
0225: },{//前面
0226:     OBJ_TYPE_TRIANGLE,
0227:     {
0228:         {0.70f, 0.70f, 0.70f},
0229:         0.0f, 0.0f, 1.0f, 0.0f,
0230:     },{
0231:         {290.0,   0.0, 114.0},
0232:         {290.0, 165.0, 114.0},
0233:         {130.0,   0.0,  65.0},
0234:     }
0235: },{
0236:     OBJ_TYPE_TRIANGLE,
0237:     {
0238:         {0.70f, 0.70f, 0.70f},
0239:         0.0f, 0.0f, 1.0f, 0.0f,
0240:     },{
0241:         {130.0,   0.0,  65.0},
0242:         {290.0, 165.0, 114.0},
0243:         {130.0, 165.0,  65.0},
0244:     }
0245: },{//側面
0246:     OBJ_TYPE_TRIANGLE,
0247:     {
0248:         {0.70f, 0.70f, 0.70f},
0249:         0.0f, 0.0f, 1.0f, 0.0f,
0250:     },{
0251:         { 82.0,   0.0, 225.0},
0252:         {130.0, 165.0,  65.0},
0253:         { 82.0, 165.0, 225.0},
0254:     }
0255: },{
0256:     OBJ_TYPE_TRIANGLE,
0257:     {
0258:         {0.70f, 0.70f, 0.70f},
0259:         0.0f, 0.0f, 1.0f, 0.0f,
0260:     },{
0261:         { 82.0,   0.0, 225.0},
0262:         {130.0,   0.0,  65.0},
0263:         {130.0, 165.0,  65.0},
0264:     }
0265: },{//背面
0266:     OBJ_TYPE_TRIANGLE,
0267:     {
0268:         {0.70f, 0.70f, 0.70f},
0269:         0.0f, 0.0f, 1.0f, 0.0f,
0270:     },{
0271:         {240.0,   0.0, 272.0},
0272:         { 82.0, 165.0, 225.0},
0273:         {240.0, 165.0, 272.0},
0274:     }
0275: },{
0276:     OBJ_TYPE_TRIANGLE,
0277:     {
0278:         {0.70f, 0.70f, 0.70f},
0279:         0.0f, 0.0f, 1.0f, 0.0f,
0280:     },{
0281:         {240.0,   0.0, 272.0},
0282:         { 82.0,   0.0, 225.0},
0283:         { 82.0, 165.0, 225.0},
0284:     }
0285: }};
0286: 
0287: OBJ_DATA Tall_block[] = {
0288: {
0289:     // 床
0290:     OBJ_TYPE_TRIANGLE,
0291:     {
0292:         {0.70f, 0.70f, 0.70f},
0293:         0.0f, 0.0f, 1.0f, 0.0f,
0294:     },{
0295:         {423.0f, 330.0f, 247.0f},
0296:         {314.0f, 330.0f, 456.0f},
0297:         {265.0f, 330.0f, 296.0f},
0298:     }
0299: },{
0300:     OBJ_TYPE_TRIANGLE,
0301:     {
0302:         {0.70f, 0.70f, 0.70f},
0303:         0.0f, 0.0f, 1.0f, 0.0f,
0304:     },{
0305:         {423.0f, 330.0f, 247.0f},
0306:         {472.0f, 330.0f, 406.0f},
0307:         {314.0f, 330.0f, 456.0f},
0308:     }
0309: },{//側面
0310:     OBJ_TYPE_TRIANGLE,
0311:     {
0312:         {0.70f, 0.70f, 0.70f},
0313:         0.0f, 0.0f, 1.0f, 0.0f,
0314:     },{
0315:         {423.0f,   0.0f, 247.0f},
0316:         {472.0f,   0.0f, 406.0f},
0317:         {423.0f, 330.0f, 247.0f},
0318:     }
0319: },{
0320:     OBJ_TYPE_TRIANGLE,
0321:     {
0322:         {0.70f, 0.70f, 0.70f},
0323:         0.0f, 0.0f, 1.0f, 0.0f,
0324:     },{
0325:         {423.0f, 330.0f, 247.0f},
0326:         {472.0f,   0.0f, 406.0f},
0327:         {472.0f, 330.0f, 406.0f},
0328:     }
0329: },{//背面
0330:     OBJ_TYPE_TRIANGLE,
0331:     {
0332:         {0.70f, 0.70f, 0.70f},
0333:         0.0f, 0.0f, 1.0f, 0.0f,
0334:     },{
0335:         {314.0f,   0.0f, 456.0f},
0336:         {314.0f, 330.0f, 456.0f},
0337:         {472.0f,   0.0f, 406.0f},
0338:     }
0339: },{
0340:     OBJ_TYPE_TRIANGLE,
0341:     {
0342:         {0.70f, 0.70f, 0.70f},
0343:         0.0f, 0.0f, 1.0f, 0.0f,
0344:     },{
0345:         {314.0f, 330.0f, 456.0f},
0346:         {472.0f, 330.0f, 406.0f},
0347:         {472.0f,   0.0f, 406.0f},
0348:     }
0349: },{//側面
0350:     OBJ_TYPE_TRIANGLE,
0351:     {
0352:         {0.70f, 0.70f, 0.70f},
0353:         0.0f, 0.0f, 1.0f, 0.0f,
0354:     },{
0355:         {314.0f,   0.0f, 456.0f},
0356:         {265.0f,   0.0f, 296.0f},
0357:         {265.0f, 330.0f, 296.0f},
0358:     }
0359: },{
0360:     OBJ_TYPE_TRIANGLE,
0361:     {
0362:         {0.70f, 0.70f, 0.70f},
0363:         0.0f, 0.0f, 1.0f, 0.0f,
0364:     },{
0365:         {314.0f,   0.0f, 456.0f},
0366:         {265.0f, 330.0f, 296.0f},
0367:         {314.0f, 330.0f, 456.0f},
0368:     }
0369: },{//前面
0370:     OBJ_TYPE_TRIANGLE,
0371:     {
0372:         {0.70f, 0.70f, 0.70f},
0373:         0.0f, 0.0f, 1.0f, 0.0f,
0374:     },{
0375:         {265.0f,   0.0f, 296.0f},
0376:         {423.0f,   0.0f, 247.0f},
0377:         {265.0f, 330.0f, 296.0f},
0378:     }
0379: },{
0380:     OBJ_TYPE_TRIANGLE,
0381:     {
0382:         {0.70f, 0.70f, 0.70f},
0383:         0.0f, 0.0f, 1.0f, 0.0f,
0384:     },{
0385:         {265.0f, 330.0f, 296.0f},
0386:         {423.0f,   0.0f, 247.0f},
0387:         {423.0f, 330.0f, 247.0f},
0388:     }
0389: }};
0390: 
0391: };// namespace Render
0392: