volume data

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 13/06/2003 at 04:16, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   8.100 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;  C++  ;

---------
I am running into problems with the vd->lhit member. The actual C++ SDK reads (for TraceGeometry) :
"If you set want to set no previous intersection then set this parameter to 0 and the BaseVolumeData::lhit member variable to 0 also.", but the description of "lhit" in the BaseVolumeData class says "Read only".
So how do I reset the vd->lhit value ?
Thanks,
Arndt

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/06/2003 at 08:19, xxxxxxxx wrote:

This is how it works according to the programmers:

  • If you want to avoid a self-intersection directly pass the value as 'lhit' (last hit).
  • If you want to include all polys in the testing process (e.g. if you start off a ray from somewhere else than from the current surface) then do the following:
    
          LONG backup = sd->lhit;  
      sd->lhit = 0;  
      TraceGeometry / TraceColor (...0...);  
      sd->lhit=backup;

In future versions you will be able to directly write:

    
          TraceGeometry / TraceColor (...NOTOK...);
  • TraceColorDirect is not affected by this - the lhit passed is the lhit used. In TraceGeometry/Color unfortunately it has to stay this way for compatibility reasons.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/06/2003 at 09:15, xxxxxxxx wrote:

So sd->lhit is not "read only"? Great news, thanks Mikael.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/06/2003 at 01:56, xxxxxxxx wrote:

No, only effectively. You always have to restore it afterwards as described.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/06/2003 at 02:03, xxxxxxxx wrote:

Understood. Thanks, Mikael.