Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r778 - in trunk/Model: Materials Primitives
- Date: Tue, 13 Dec 2005 09:02:23 -0700 (MST)
Author: bigler
Date: Tue Dec 13 09:02:22 2005
New Revision: 778
Modified:
trunk/Model/Materials/Dielectric.cc
trunk/Model/Primitives/Sphere.cc
Log:
Model/Materials/Dielectric.cc
Removed unnecessary RayPacket::Element getting when max depth was
reached.
Model/Primitives/Sphere.cc
Replaced t0 > 0 with t0 > T_EPSILON. This helps internal rays.
Modified: trunk/Model/Materials/Dielectric.cc
==============================================================================
--- trunk/Model/Materials/Dielectric.cc (original)
+++ trunk/Model/Materials/Dielectric.cc Tue Dec 13 09:02:22 2005
@@ -59,7 +59,6 @@
{
for(int i=0;i<rays.getSize();i++)
{
- RayPacket::Element& e = rays.get(i);
rays.setResult(i, Color::black());
}
return;
@@ -165,7 +164,6 @@
}
}
}
-
// Resize the packets.
reflected_rays.resize(num_refl);
Modified: trunk/Model/Primitives/Sphere.cc
==============================================================================
--- trunk/Model/Primitives/Sphere.cc (original)
+++ trunk/Model/Primitives/Sphere.cc Tue Dec 13 09:02:22 2005
@@ -71,7 +71,7 @@
if(disc >= 0){
Real r = Sqrt(disc);
Real t0 = -(r+B);
- if(t0 > 0){
+ if(t0 > T_EPSILON){
e.hitInfo.hit(t0, getMaterial(), this, getTexCoordMapper());
} else {
Real t1 = r-B;
@@ -96,7 +96,7 @@
if(disc >= 0){
Real r = Sqrt(disc);
Real t0 = -(r+B)/A;
- if(t0 > 0){
+ if(t0 > T_EPSILON){
e.hitInfo.hit(t0, getMaterial(), this, getTexCoordMapper());
} else {
Real t1 = (r-B)/A;
@@ -119,7 +119,7 @@
if(disc >= 0){
Real r = Sqrt(disc);
Real t0 = -(r+B);
- if(t0 > 0){
+ if(t0 > T_EPSILON){
e.hitInfo.hit(t0, getMaterial(), this, getTexCoordMapper());
} else {
Real t1 = r-B;
@@ -143,7 +143,7 @@
if(disc >= 0){
Real r = Sqrt(disc);
Real t0 = -(r+B)/A;
- if(t0 > 0){
+ if(t0 > T_EPSILON){
e.hitInfo.hit(t0, getMaterial(), this, getTexCoordMapper());
} else {
Real t1 = (r-B)/A;
- [MANTA] r778 - in trunk/Model: Materials Primitives, bigler, 12/13/2005
Archive powered by MHonArc 2.6.16.