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


C++ ON_BinaryArchive::ReadBoundingBox方法代码示例

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


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

示例1: Read

ON_BOOL32 ON_BrepRegion::Read(ON_BinaryArchive& file)
{
    int major_version = 0;
    int minor_version = 0;
    bool rc = file.BeginRead3dmChunk(TCODE_ANONYMOUS_CHUNK,&major_version,&minor_version);
    if ( !rc )
        return false;
    for(;;)
    {
        rc = (1==major_version);
        if (!rc) break;
        rc = file.ReadInt( &m_region_index );
        if (!rc) break;
        rc = file.ReadInt( &m_type );
        if (!rc) break;
        rc = file.ReadArray( m_fsi );
        if (!rc) break;
        rc = file.ReadBoundingBox( m_bbox );
        if (!rc) break;

        break;
    }
    if (!file.EndRead3dmChunk())
        rc = false;
    return rc;
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:26,代码来源:opennurbs_brep_region.cpp

示例2: Read

ON_BOOL32 ON_InstanceRef::Read(
       ON_BinaryArchive& binary_archive
     )
{
  int major_version = 0;
  int minor_version = 0;
  bool rc = binary_archive.Read3dmChunkVersion(&major_version,&minor_version);
  if ( rc )
  {
    if ( major_version != 1 )
      rc = false;
    if (rc )
      rc = binary_archive.ReadUuid( m_instance_definition_uuid );
    if ( rc )
      rc = binary_archive.ReadXform( m_xform );
    if ( rc )
      rc = binary_archive.ReadBoundingBox( m_bbox );
  }
  return rc;
}
开发者ID:jl2,项目名称:ONView,代码行数:20,代码来源:opennurbs_instance.cpp

示例3: Read

ON_BOOL32 ON_PointCloud::Read( ON_BinaryArchive& file )
{
  int major_version = 0;
  int minor_version = 0;
  bool rc = file.Read3dmChunkVersion(&major_version,&minor_version);
  if (rc && major_version == 1 ) 
  {
    if (rc) rc = file.ReadArray( m_P );
    if (rc) rc = file.ReadPlane( m_plane );
    if (rc) rc = file.ReadBoundingBox( m_bbox );
    if (rc) rc = file.ReadInt( &m_flags);

    if (rc && minor_version >= 1 )
    {
      if (rc) rc = file.ReadArray( m_N );
      if (rc) rc = file.ReadArray( m_C );
    }
  }
  return rc;
}
开发者ID:jl2,项目名称:ONView,代码行数:20,代码来源:opennurbs_pointcloud.cpp

示例4: Read

ON_BOOL32 ON_InstanceDefinition::Read(
       ON_BinaryArchive& binary_archive
     )
{
  int major_version = 0;
  int minor_version = 0;

  m_idef_layer_style = 0;

  m_us.m_custom_unit_scale = 0.0;
  m_us.m_custom_unit_name.Destroy();
  m_us.m_unit_system = ON::no_unit_system;
  m_source_bRelativePath = false;
  m_source_archive.Destroy();

  bool rc = binary_archive.Read3dmChunkVersion(&major_version,&minor_version);
  if ( rc )
  {
    if ( major_version != 1 )
      rc = false;
    // version 1.0 fields
    if ( rc )
      rc = binary_archive.ReadUuid( m_uuid );
    if ( rc )
      rc = binary_archive.ReadArray( m_object_uuid );
    if ( rc )
      rc = binary_archive.ReadString( m_name );
    if ( rc )
      rc = binary_archive.ReadString( m_description );
    if ( rc )
      rc = binary_archive.ReadString( m_url );
    if ( rc )
      rc = binary_archive.ReadString( m_url_tag );
    if ( rc )
      rc = binary_archive.ReadBoundingBox( m_bbox );
    // m_idef_update_type was an unsigned int and got changed to an enum.  Read and write
    // as an unsigned int to support backwards compatibility
    unsigned int source = m_idef_update_type;
    if ( rc )
      rc = binary_archive.ReadInt( &source );
    if( rc)
      m_idef_update_type = ON_InstanceDefinition::IdefUpdateType(source);
    if ( rc )
      rc = binary_archive.ReadString( m_source_archive );

    // version 1.1 fields
    if ( minor_version >= 1 )
    {
      if ( rc )
        rc = m_source_archive_checksum.Read( binary_archive );
    }

    // version 1.2 fields
    if ( minor_version >= 2 )
    {
      int us = ON::no_unit_system;
      if ( rc )
        rc = binary_archive.ReadInt( &us );
      m_us.m_unit_system = ON::UnitSystem(us);
      if ( ON::custom_unit_system != m_us.m_unit_system && ON::no_unit_system != m_us.m_unit_system )
      {
        m_us.m_custom_unit_scale = ON::UnitScale( m_us.m_unit_system, ON::meters );
      }
      else
      {
        m_us.m_custom_unit_scale = 0.0;
      }

      if ( minor_version >= 3 )
      {
        // version 1.3 fields - added 6 March 2006
        //int us = ON::no_unit_system;
        if ( rc )
          rc = binary_archive.ReadDouble( &m_us.m_custom_unit_scale );
        if ( rc )
          rc = binary_archive.ReadBool( &m_source_bRelativePath );
        if ( rc && minor_version >= 4 )
        {
          rc = m_us.Read(binary_archive);
          if (rc && minor_version >= 5 )
          {
            rc = binary_archive.ReadInt(&m_idef_update_depth);

            if ( rc && minor_version >= 6 )
            {
              unsigned int i = 0;
              rc = binary_archive.ReadInt(&i);
              if ( i && i > 0 && i < 256 )
                m_idef_layer_style = (unsigned char)i;
            }
          }
        }
      }
    }

    if ( ON_InstanceDefinition::embedded_def == m_idef_update_type )
    {
      // 7 February 2012
      //   "embedded_def" is obsolete.
      if (m_source_archive.Length() > 0 )
//.........这里部分代码省略.........
开发者ID:2php,项目名称:pcl,代码行数:101,代码来源:opennurbs_instance.cpp


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