comparison engine/core/view/camera.cpp @ 57:47979f9dce55

add possibility to hide instances/instance visuals; initialize instance visuals properly
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 14 Jul 2008 14:41:12 +0000
parents 90005975cdbb
children 29309cd5e240
comparison
equal deleted inserted replaced
56:73a9f7addd33 57:47979f9dce55
501 std::vector<Instance*>::const_iterator instance_it = allinstances.begin(); 501 std::vector<Instance*>::const_iterator instance_it = allinstances.begin();
502 std::vector<Instance*>& instances_to_render = m_layer_to_instances[*layer_it]; 502 std::vector<Instance*>& instances_to_render = m_layer_to_instances[*layer_it];
503 for (;instance_it != allinstances.end(); ++instance_it) { 503 for (;instance_it != allinstances.end(); ++instance_it) {
504 Instance* instance = *instance_it; 504 Instance* instance = *instance_it;
505 InstanceVisual* visual = instance->getVisual<InstanceVisual>(); 505 InstanceVisual* visual = instance->getVisual<InstanceVisual>();
506 if(!visual->isVisible())
507 continue;
506 InstanceVisualCacheItem& vc = visual->getCacheItem(this); 508 InstanceVisualCacheItem& vc = visual->getCacheItem(this);
507 509
508 // use cached values if there is no need to do full recalculation 510 // use cached values if there is no need to do full recalculation
509 ScreenPoint drawpt; 511 ScreenPoint drawpt;
510 int angle = 0; 512 int angle = 0;