model_t
and
camera_t
objects
tar.gz
archive of your asg6/ directory, including:
README
file containing
Makefile
.h
headers and .cpp
source)
make clean
before tar
)
handin
notes
camera_t
object.
main()
routine works unaltered:
int main(int argc, char *argv[])
{
model_t model;
std::ifstream model_ifs;
if(argc != 2) {
std::cerr << "Usage " << argv[0] << " " << std::endl;
return 1;
}
model_ifs.open(argv[1],std::ifstream::in);
model_ifs >> model;
model_ifs.close();
std::cout << model;
return 0;
}
camera cam1 { pixeldim 640 480 worlddim 8 6 viewpoint 4 3 6 } material green { ambient 0 5 0 } material yellow { ambient 5 4 0 diffuse 4 4 0 specular 1 1 1 } plane leftwall { material green normal 3 0 1 point 0 0 0 } plane rightwall { material yellow normal -3 0 1 point 8 0 0 } material gray { ambient 2 2 2 } plane floor { material gray normal 0 1 0 point 0 -0.2 0 }
loaded cam1 loaded green loaded yellow loaded leftwall loaded rightwall loaded gray loaded floor camera cam1 { pixeldim 640 480 worldim 8 6 viewpoint 4 3 6 } material green { ambient 0 5 0 } material yellow { ambient 5 4 0 diffuse 4 4 0 specular 1 1 1 } material gray { ambient 2 2 2 } plane leftwall { material green normal 3 0 1 point 0 0 0 } plane rightwall { material yellow normal -3 0 1 point 8 0 0 } plane floor { material gray normal 0 1 0 point 0 -0.2 0 }