int main(int argc, char* argv[]) { osg::ref_ptr<osgViewer::Viewer> viewer=new osgViewer::Viewer; viewer->setSceneData(CreateSimple()); return viewer->run(); }
CBuilding::CBuilding (int type, int x, int y, int height, int width, int depth, int seed, GLrgba color) { _x = x; _y = y; _width = width; _depth = depth; _height = height; _center = glVector ((float)(_x + width / 2), 0.0f, (float)(_y + depth / 2)); _seed = seed; _texture_type = RandomVal (); _color = color; _color.alpha = 0.1f; _have_lights = false; _have_logo = false; _have_trim = false; _roof_tiers = 0; //Pick a color for logos & roof lights _trim_color = WorldLightColor (seed); _mesh = new CMesh; //The main textured mesh for the building _mesh_flat = new CMesh; //Flat-color mesh for untextured detail items. switch (type) { case BUILDING_SIMPLE: CreateSimple (); break; case BUILDING_MODERN: CreateModern (); break; case BUILDING_TOWER: CreateTower (); break; case BUILDING_BLOCKY: CreateBlocky (); break; } }
SuperPill::SuperPill(int translateX, int translateY){ CreateSimple(translateX, translateY); }
Module1::Module1(int translateX, int translateY){ CreateSimple(translateX, translateY); }
Lmod::Lmod(int translateX, int translateY){ CreateSimple(translateX, translateY); }