当前位置: 首页>>代码示例>>C++>>正文


C++ ON_TextLog::PrintRGB方法代码示例

本文整理汇总了C++中ON_TextLog::PrintRGB方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_TextLog::PrintRGB方法的具体用法?C++ ON_TextLog::PrintRGB怎么用?C++ ON_TextLog::PrintRGB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ON_TextLog的用法示例。


在下文中一共展示了ON_TextLog::PrintRGB方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Dump

void ON_Layer::Dump( ON_TextLog& dump ) const
{
  const wchar_t* sName = LayerName();
  if ( !sName )
    sName = L"";
  dump.Print("index = %d\n",m_layer_index);
  dump.Print("name = \"%S\"\n",sName);
  dump.Print("display = %s\n",m_bVisible?"visible":"hidden");
  dump.Print("picking = %s\n",m_bLocked?"locked":"unlocked");
  dump.Print("display color rgb = "); dump.PrintRGB(m_color); dump.Print("\n");
  dump.Print("plot color rgb = "); dump.PrintRGB(m_plot_color); dump.Print("\n");
  dump.Print("default material index = %d\n",m_material_index);
}
开发者ID:cciechad,项目名称:brlcad,代码行数:13,代码来源:opennurbs_layer.cpp

示例2: Dump

void ON_Light::Dump( ON_TextLog& dump ) const
{
  ON_BOOL32 bDumpDir = false;
  ON_BOOL32 bDumpLength = false;
  ON_BOOL32 bDumpWidth = false;

  const char* sStyle = "unknown";
  switch(Style())
  {
  //case ON::view_directional_light:
  //  sStyle = "view_directional_light";
  //  bDumpDir = true;
  //  break;
  //case ON::view_point_light:
  //  sStyle = "view_point_light";
  //  break;
  //case ON::view_spot_light:
  //  sStyle = "view_spot_light";
  //  bDumpDir = true;
  //  break;
  case ON::camera_directional_light:
    sStyle = "camera_directional_light";
    bDumpDir = true;
    break;
  case ON::camera_point_light:
    sStyle = "camera_point_light";
    break;
  case ON::camera_spot_light:
    sStyle = "camera_spot_light";
    bDumpDir = true;
    break;
  case ON::world_directional_light:
    sStyle = "world_directional_light";
    bDumpDir = true;
    break;
  case ON::world_point_light:
    sStyle = "world_point_light";
    break;
  case ON::world_spot_light:
    sStyle = "world_spot_light";
    bDumpDir = true;
    break;
  case ON::world_linear_light:
    sStyle = "linear_light";
    bDumpDir = true;
    bDumpLength = true;
    break;
  case ON::world_rectangular_light:
    sStyle = "rectangular_light";
    bDumpDir = true;
    bDumpLength = true;
    bDumpWidth = true;
    break;
  case ON::ambient_light:
    sStyle = "ambient_light";
    break;
  case ON::unknown_light_style:
    sStyle = "unknown";
    break;
  default:
    sStyle = "unknown";
    break;
  }
  dump.Print("index = %d  style = %s\n",LightIndex(),sStyle);

  dump.Print("location = "); dump.Print(Location()); dump.Print("\n");
  if ( bDumpDir )
    dump.Print("direction = "); dump.Print(Direction()); dump.Print("\n");
  if ( bDumpLength )
    dump.Print("length = "); dump.Print(Length()); dump.Print("\n");
  if ( bDumpWidth )
    dump.Print("width = "); dump.Print(Width()); dump.Print("\n");

  dump.Print("intensity = %g%%\n",Intensity()*100.0);

  dump.Print("ambient rgb = "); dump.PrintRGB(Ambient()); dump.Print("\n");
  dump.Print("diffuse rgb = "); dump.PrintRGB(Diffuse()); dump.Print("\n");
  dump.Print("specular rgb = "); dump.PrintRGB(Specular()); dump.Print("\n");

  dump.Print("spot angle = %g degrees\n",SpotAngleDegrees());
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:81,代码来源:opennurbs_light.cpp


注:本文中的ON_TextLog::PrintRGB方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。