RangeMapper function in C.O.F.F.E.E.?

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

On 13/07/2007 at 16:45, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10.111 
Platform:   Windows  ;   
Language(s) :   C.O.F.F.E.E  ;   XPRESSO  ;

---------
Hi,

I wondered if there is some function in C.O.F.F.E.E. that works like the RangeMapper node in XPresso. Especially I am looking for a possibility to use a spline curve , just like in the node.

Is there anything I could use?

Best regards,
Jack

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

On 16/07/2007 at 01:08, xxxxxxxx wrote:

no, you have to write your own. you could use a dummy splineobject to read out interpolated inbetween points though. as long as you don't insert it into the document it will be invisible to the user.

cheers,
Matthias

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

On 16/07/2007 at 02:03, xxxxxxxx wrote:

Hi Matthias,

I was hoping for an answer from you 😉
Actually, I take the occasion as a good reason to get into C++

And there I immediately get new problems with VisualC++ 2005 Express. Maybe you'll here from me some more times.

Best regards from Braunschweig,
Frank

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

On 20/07/2007 at 07:14, xxxxxxxx wrote:

Howdy,

A range mapper is fairly easy to code:

  
if((inMax-inMin) != 0)   //Check for division by 0  
{  
       mix = (input-inMin)/(inMax-inMin);  
}  
else  
{  
      mix = 0;  
}  
output = outMin + mix * (outMax-outMin);  

Adios,
Cactus Dan

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

On 23/07/2007 at 00:04, xxxxxxxx wrote:

Hey Dan,

yeah, without the spline function, it is quite easy. Thanks for the code! But since I want to use especially the spline of the Range Mapper node, I can't use it.

Anyway I started learning C++ for CINEMA 4D SDK (learning by doing), so I will do everything different as I planned.

Thanks for your help!

Greetings,
Frank