Exemplo n.º 1
0
void CxDib::SetPixelColor(long x,long y,RGBQUAD c)
{
	if ((hDib==NULL)||(x<0)||(y<0)||
		(x>=m_bi.biWidth)||(y>=m_bi.biHeight)) return;
	if (m_nColors)
		SetPixelIndex(x,y,GetNearestIndex(c));
	else {
		BYTE* iDst = GetBits()+(m_bi.biHeight - y)*m_LineWidth + x*sizeof(RGBQUAD);
		*(RGBQUAD*)iDst = c;
	}
	return;
}
/** Pling */
void UFluidSurfaceComponent::Pling( const FVector& Position, float Strength, float Radius )
{
	if (NumPLing >= MAX_FLUID_PLINGS)
		return;

	int HitX, HitY;
	GetNearestIndex( Position, HitX, HitY );

	PLingBuffer[ NumPLing ].LocalHitPosition = GetWorldToComponent( ).TransformPosition( Position );
	PLingBuffer[ NumPLing ].HitX = HitX;
	PLingBuffer[ NumPLing ].HitY = HitY;
	PLingBuffer[ NumPLing ].Strength = Strength;
	PLingBuffer[ NumPLing ].Radius = Radius;

	NumPLing++;
}