[ create a new paste ] login | about

Link: http://codepad.org/WfAe2Uhi    [ raw code | fork ]

C++, pasted on Nov 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
inline void* Utils::PushXYZ(void* destination, float xValue, float yValue, float zValue)
{	
	float* pFloat = (float*)destination;
	*pFloat = xValue;
	pFloat++;
	*pFloat = yValue;
	pFloat++;
	*pFloat = zValue;
	pFloat++;
	return (void*) pFloat;
}

// called like so

Data = new char[sizeOfVertex * numVertices];
void* destination = (void*) Data;
destination = Utils::PushXYZ(destination, 3.0f, 0.0f, 0.0f);


Create a new paste based on this one


Comments: