Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1747 - trunk/Model/Instances
- Date: Mon, 1 Oct 2007 12:38:17 -0600 (MDT)
Author: bigler
Date: Mon Oct 1 12:38:17 2007
New Revision: 1747
Modified:
trunk/Model/Instances/Instance.cc
Log:
Model/Instances/Instance.cc
Overriding the material didn't do anything, because the child's
material was always used. The whole instance code needs to be
rethought, due to some of the changes made to handle nested
instances.
Modified: trunk/Model/Instances/Instance.cc
==============================================================================
--- trunk/Model/Instances/Instance.cc (original)
+++ trunk/Model/Instances/Instance.cc Mon Oct 1 12:38:17 2007
@@ -175,11 +175,15 @@
// another call to texcoords 3 here
sub_packet.computeTextureCoordinates2(context);
+ // TODO(bigler: change this to zero when we fix InstanceMaterial)
+ bool override_material = material != this;
+
for (int j = i; j < end; j++) {
Real s = scales[j];
+ const Material* hit_material = override_material ? material :
instance_rays.getHitMaterial(j);
if(rays.hit(j,
instance_rays.getMinT(j)*s,
- instance_rays.getHitMaterial(j),
+ hit_material,
this,
this)) {
// NOTE(boulos): We're deferring the normal transform until
- [Manta] r1747 - trunk/Model/Instances, bigler, 10/01/2007
Archive powered by MHonArc 2.6.16.