THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/10/2006 at 08:49, xxxxxxxx wrote:
Thanks Matthias, I'm afraid it's not working though :(, it always returns FALSE. Here's how I'm using it:
... called from VidePostData::Execute(...) when vps->VP == VP_RENDER
(simplified code)
VolumeData* pVolumeData = vps->vd;
RayObject* pObject = pVolumeData->GetObj(objID);
TexData* pTexData = vps->vd->GetTexData(pObject, 0);
Vector* pPolygonPointNormals = ...
for (LONG p = 0; p < pObject->vcnt; p++)
{
RayPolygon polygon = pObject->vadr[ p ];
LONG polygonGlobalID = pVolumeData->Obj_to_ID(pObject) + p,
Vector vA = pObject->padr[polygon.a];
Vector nA = !(ObjectRotationMatrix * pPolygonPointNormals[p * 4]); // normal in world space
UVWStruct UVW;
// assuming the object has a spherical mapping for instance
Bool res = pVolumeData->ProjectPoint(pTexData , polygonGlobalID, vA, nA, &UVW.a;); // <-- returs false, UVW.a = {0,0,0}
...
}