// Shave and a Haircut // (c) 2019 Epic Games // US Patent 6720962 #include "shaveSDKTYPES.h" #include "shaveSDKCALLBACKS.h" // Callback functions (shave calls you) void SHAVEapply_inst_color( WFTYPE * instance_geom, int hairID, int slgID, unsigned long shaveINSTID ) { } VERT SHAVEdisplace_root( VERT * root, CURVEINFO * ci, int ID ) { VERT ret; ret.x = 0; ret.y = 0; ret.z = 0; return ret; } int SHAVEprogress( int actual, int estimated_total ) { int killit = 0; printf( "actuall = %d estimated = %d\n", actual, estimated_total ); return killit; } void SHAVEcoord_convertTOSHAVE( VERT * in ) { } void SHAVEcoord_convertFROMSHAVE( VERT * in ) { } float SHAVEapply_texture( CURVEINFO * ci, VERT rest_root_worldpos, unsigned long shaveINSTID, int parm, float inbound_value ) { // if (ci->UTpid==6) // if( ci->UTpid >= 576 - 1 ) // printf( "ci->UTpid = %d\n", ci->UTpid ); // if( parm == 28 ) // { // inbound_value = rest_root_worldpos.x + .5; //inbound_value= .3; //if ((inbound_value>1.0)||(inbound_value<0.0)) //printf ("inbound value = %f\n",inbound_value); // } // printf ("UT %d\n",ci->UTpid); // printf ("pid %d\n",ci->Tpid); // if (ci->u!=0.0f) // if (activate==1) // if (parm==29) // printf ("%f %f ",ci->u,ci->v); // if (activate==1) // if (parm==29) // printf ("%d \n",ci->hairID); return inbound_value; } void MAYAexternal_forces( VERT * lastpos, VERT * velocity, int y ) { } void MAYAcache_forces(int clearCache) {} void MAYAapply_cached_forces(int guideNum, int vertNum, VERT* velocity) {} extern float SHAVEapply_falloff( int lightNUM, VERT pos, float cone ) { return ( cone ); } VERT SHAVEapply_illumination( int LIGHTID, VERT wpos, VERT vector, VERT color ) { // this function is now obsolete!! see SHAVEapply_illuminationWF return color; } void SHAVEapply_illuminationWF( int LIGHTID, WFTYPE * samples ) { } VERT SHAVEapply_atmosphere( VERT wpos, VERT inbound_color ) { return inbound_color; } float SHAVEapply_VMAP( long SHAVEINSTID, int VERTID, int chan, float inbound_value ) { return inbound_value; }