NL3D::CZoneLighter::CPredPointLightToPoint Struct Reference


Detailed Description

For sort().

Definition at line 556 of file zone_lighter.h.

Public Member Functions

bool operator() (CPointLightRT *pla, CPointLightRT *plb) const

Data Fields

CVector Point


Member Function Documentation

bool CZoneLighter::CPredPointLightToPoint::operator() CPointLightRT pla,
CPointLightRT plb
const
 

Definition at line 3329 of file zone_lighter.cpp.

References NL3D::CZoneLighter::CPointLightRT::BSphere, NLMISC::CBSphere::Center, NL3D::CPointLight::getAttenuationEnd(), NL3D::CZoneLighter::CPointLightRT::OODeltaAttenuation, and NL3D::CZoneLighter::CPointLightRT::PointLight.

03330 {
03331         float   ra= (pla->BSphere.Center - Point).norm();
03332         float   rb= (plb->BSphere.Center - Point).norm();
03333         float   infA= (pla->PointLight.getAttenuationEnd() - ra) * pla->OODeltaAttenuation;
03334         float   infB= (plb->PointLight.getAttenuationEnd() - rb) * plb->OODeltaAttenuation;
03335         // return which light impact the most.
03336         // If same impact
03337         if(infA==infB)
03338                 // return nearest
03339                 return ra < rb;
03340         else
03341                 // return better impact
03342                 return  infA > infB;
03343 }


Field Documentation

CVector NL3D::CZoneLighter::CPredPointLightToPoint::Point
 

Definition at line 558 of file zone_lighter.h.

Referenced by NL3D::CZoneLighter::processZonePointLightRT().


The documentation for this struct was generated from the following files:
Generated on Tue Mar 16 08:35:55 2004 for NeL by doxygen 1.3.6