Beispiel #1
0
float UDisplace::GetValue(FVector Coordinates)
{
	if (GetSourceModule(0) == NULL) throw ExceptionNoModule();
	if (GetSourceModule(1) == NULL) throw ExceptionNoModule();
	if (GetSourceModule(2) == NULL) throw ExceptionNoModule();
	if (GetSourceModule(3) == NULL) throw ExceptionNoModule();

	// Get the output values from the three displacement modules.  Add each
	// value to the corresponding coordinate in the input value.
	double xDisplace = Coordinates.X + (GetSourceModule(1)->GetValue(Coordinates));
	double yDisplace = Coordinates.Y + (GetSourceModule(2)->GetValue(Coordinates));
	double zDisplace = Coordinates.Z + (GetSourceModule(3)->GetValue(Coordinates));

	// Retrieve the output value using the offsetted input value instead of
	// the original input value.
	return GetSourceModule(0)->GetValue(FVector(xDisplace, yDisplace, zDisplace));
}
Beispiel #2
0
float UAbs::GetValue(FVector Coordinates)
{
	return FMath::Abs(GetSourceModule(0)->GetValue(Coordinates));
}
Beispiel #3
0
float UAdd::GetValue(FVector Coordinates)
{
	return GetSourceModule(0)->GetValue(Coordinates) + GetSourceModule(1)->GetValue(Coordinates);
}
Beispiel #4
0
			virtual
			ValueType
			GetValue( ValueType x, ValueType y ) const
			{
				return GetSourceModule( 0 ).GetValue( x, y ) + GetSourceModule( 1 ).GetValue( x, y );
			}
Beispiel #5
0
			virtual
			ValueType
			GetValue( ValueType x ) const
			{
				return GetSourceModule( 0 ).GetValue( x ) + GetSourceModule( 1 ).GetValue( x );
			}
Beispiel #6
0
			virtual
			ValueType
			GetValue( ValueType x, ValueType y, ValueType z, ValueType w ) const
			{
				return GetSourceModule( 0 ).GetValue( x, y, z, w ) + GetSourceModule( 1 ).GetValue( x, y, z, w );
			}