aboutsummaryrefslogtreecommitdiff
path: root/libexe/shaveSDKCALLBACKS.c
blob: bdb0e71143c9c5a799fa635c5e406b309b1c5e12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// 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;
}