Пример #1
0
void mitk::Material::PrintSelf ( std::ostream &os, itk::Indent /* unused */ ) const
{
  os << "Name: " << GetName() << std::endl;
  os << "Color: " << GetColor() << std::endl;
  os << "ColorCoefficient" << GetColorCoefficient() << std::endl;
  os << "SpecularColor: " << GetSpecularColor() << std::endl;
  os << "SpecularCoefficient: " << GetSpecularCoefficient() << std::endl;
  os << "SpecularPower: " << GetSpecularPower() << std::endl;
  os << "Opacity: " << GetOpacity() << std::endl;
  os << "Line width: " << GetLineWidth() << std::endl;
  switch ( GetInterpolation() )
  {
  case ( Flat ) : os << "Interpolation: Flat" << std::endl;
    break;
  case ( Gouraud ) : os << "Interpolation: Gouraud" << std::endl;
    break;
  case ( Phong ) : os << "Interpolation: Phong" << std::endl;
    break;
  }
  switch ( GetRepresentation() )
  {
  case ( Points ) : os << "Representation: Points" << std::endl;
    break;
  case ( Wireframe ) : os << "Representation: Wireframe" << std::endl;
    break;
  case ( Surface ) : os << "Representation: Surface" << std::endl;
    break;
  }
}
Пример #2
0
mitk::Material::Material(  )
{
  InitializeStandardValues();
  SetColor( GetColor() );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( GetOpacity() );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
}
Пример #3
0
mitk::Material::Material( mitk::Material::Color color, vtkFloatingPointType colorCoefficient, vtkFloatingPointType specularCoefficient, vtkFloatingPointType specularPower, vtkFloatingPointType opacity )
{
  InitializeStandardValues();
  SetColor( color );
  SetColorCoefficient( colorCoefficient );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( specularCoefficient );
  SetSpecularPower( specularPower );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
}
Пример #4
0
mitk::Material::Material( vtkFloatingPointType red, vtkFloatingPointType green, vtkFloatingPointType blue, vtkFloatingPointType opacity )
{
  InitializeStandardValues();
  SetColor( red, green, blue );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Пример #5
0
void
UsdGeomPrimvar::GetDeclarationInfo(TfToken *name, SdfValueTypeName *typeName,
                                 TfToken *interpolation, 
                                 int *elementSize) const
{
    TF_VERIFY(name && typeName && interpolation && elementSize);

    // We don't have any more efficient access pattern yet, but at least
    // we're still saving client some code
    *name = GetBaseName();
    *typeName = GetTypeName();
    *interpolation = GetInterpolation();
    *elementSize = GetElementSize();
}
Пример #6
0
mitk::Material::Material( Color color, double opacity )
{
  InitializeStandardValues();
  SetColor( color );
  SetColorCoefficient( GetColorCoefficient() );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( GetSpecularCoefficient() );
  SetSpecularPower( GetSpecularPower() );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Пример #7
0
mitk::Material::Material( double red, double green, double blue,
    double colorCoefficient, double specularCoefficient,
    double specularPower, double opacity )
{
  InitializeStandardValues();
  SetColor( red, green, blue );
  SetColorCoefficient( colorCoefficient );
  SetSpecularColor( GetSpecularColor() );
  SetSpecularCoefficient( specularCoefficient );
  SetSpecularPower( specularPower );
  SetOpacity( opacity );
  SetInterpolation( GetInterpolation() );
  SetRepresentation( GetRepresentation() );
  SetLineWidth( GetLineWidth() );
  m_Name = "";
}
Пример #8
0
 SidConfig::sampling_method_t GetSamplingMethod() const
 {
   return Parameters::ZXTune::Core::SID::INTERPOLATION_HQ == GetInterpolation()
       ? SidConfig::RESAMPLE_INTERPOLATE : SidConfig::INTERPOLATE;
 }
Пример #9
0
 bool GetFastSampling() const
 {
   return Parameters::ZXTune::Core::SID::INTERPOLATION_NONE == GetInterpolation();
 }
Пример #10
0
BOOL XKeyScale::EditDialog()
{
	CDlgScaleProp dlg;
	dlg.m_fScaleX = m_vScaleOrig.x;
	dlg.m_fScaleY = m_vScaleOrig.y;
// 	dlg.m_rangeXY1 = m_vRangeXY.v1;
// 	dlg.m_rangeXY2 = m_vRangeXY.v2;
// 	dlg.m_rangeX1 = m_vRangeX.v1;
// 	dlg.m_rangeX2 = m_vRangeX.v2;
// 	dlg.m_rangeY1 = m_vRangeY.v1;
// 	dlg.m_rangeY2 = m_vRangeY.v2;
	dlg.m_rangeXY = m_vRangeXY;
	dlg.m_rangeX = m_vRangeX;
	dlg.m_rangeY = m_vRangeY;
	dlg.m_bInterpolation = ( GetInterpolation() ) ? TRUE : FALSE;
	dlg.m_Interpolation = GetInterpolation();
	if( dlg.DoModal() == IDOK )	{
// 		CONSOLE("3(%.1f, %.1f), (%.1f, %.1f), (%.1f, %.1f) "
// 						 , dlg.m_rangeX1, dlg.m_rangeX2
// 						 , dlg.m_rangeY1, dlg.m_rangeY2 
// 						 , dlg.m_rangeXY1, dlg.m_rangeXY2 );
// 		CONSOLE("==========================");
		m_vScaleOrig.Set( dlg.m_fScaleX, dlg.m_fScaleY );
// 		m_vRangeXY.v1 = dlg.m_rangeXY1;
// 		m_vRangeXY.v2 = dlg.m_rangeXY2;
// 		m_vRangeX.v1 = dlg.m_rangeX1;
// 		m_vRangeX.v2 = dlg.m_rangeX2;
// 		m_vRangeY.v1 = dlg.m_rangeX1;
// 		m_vRangeY.v2 = dlg.m_rangeY2;
// 		CONSOLE("1");
// 		XBREAK( m_vRangeX.v1 != 0 );
// 		m_vScaleOrig.Set( dlg.m_fScaleX, dlg.m_fScaleY );
// 		CONSOLE( "2" );
// 		m_vRangeXY.v1 = dlg.m_rangeXY1;
// 		m_vRangeXY.v2 = dlg.m_rangeXY2;
// 		CONSOLE( "3" );
// 		m_vRangeX.v1 = dlg.m_rangeX1;
// 		CONSOLE( "4" );
// 		XBREAK( m_vRangeX.v1 != 0 );
// 		m_vRangeY.v2 = dlg.m_rangeY1;
// 		CONSOLE( "5" );
// 		XBREAK( m_vRangeX.v1 != 0 );
// 		m_vRangeXY.v2 = dlg.m_rangeXY2;
// 		CONSOLE( "6" );
// 		XBREAK( m_vRangeX.v1 != 0 );
// 		m_vRangeX.v2 = dlg.m_rangeX2;
// 		CONSOLE( "7" );
// 		XBREAK( m_vRangeX.v1 != 0 );
// 		m_vRangeY.v2 = dlg.m_rangeY2;
// 		XBREAK( m_vRangeX.v1 != 0 );
		m_vRangeXY = dlg.m_rangeXY;
		m_vRangeX = dlg.m_rangeX;
		m_vRangeY = dlg.m_rangeY;
		m_Interpolation = dlg.m_Interpolation;
		if( dlg.m_bInterpolation == FALSE )
			m_Interpolation = xSpr::xNONE;
		else
		if( !m_Interpolation )
			m_Interpolation = xSpr::xLINEAR;
		return TRUE;
	}
	return FALSE;
}