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


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

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


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

示例1: Write

ON_BOOL32 ON_ClippingPlaneSurface::Write( ON_BinaryArchive& file ) const
{
  bool rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
  if (!rc)
    return false;

  for(;;)
  {
    rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,0);
    if (rc)
    {
      rc = ON_PlaneSurface::Write(file)?true:false;
      if (!file.EndWrite3dmChunk())
        rc = false;
    }
    if (!rc) break;

    rc = m_clipping_plane.Write(file);
    if (rc) break;

    break;
  }

  if (!file.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:2php,项目名称:pcl,代码行数:28,代码来源:opennurbs_planesurface.cpp

示例2: Write

ON_BOOL32 ON_SurfaceArray::Write( ON_BinaryArchive& file ) const
{
  ON_BOOL32 rc = file.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 0 );
  if (rc) rc = file.Write3dmChunkVersion(1,0);
  if (rc ) 
  {
    int i;
    rc = file.WriteInt( Count() );
    for ( i = 0; rc && i < Count(); i++ ) {
      if ( m_a[i] ) 
      {
        rc = file.WriteInt(1);
        if ( rc ) 
          rc = file.WriteObject( *m_a[i] ); // polymorphic surfaces
      }
      else 
      {
        // NULL surface
        rc = file.WriteInt(0);
      }
    }
    if ( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:26,代码来源:opennurbs_surface.cpp

示例3: Write

BOOL ON_UserStringList::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
  if ( !rc )
    return false;

  for(;;)
  {
    int count = m_e.Count();
    rc = archive.WriteInt(count);
    if(!rc) break;

    for ( int i = 0; i < count && rc; i++ )
    {
      rc = m_e[i].Write(archive);
    }
    if (!rc) break;

    break;
  }

  if ( !archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:26,代码来源:opennurbs_userdata.cpp

示例4: Write

ON_BOOL32 ON_PolyEdgeSegment::Write( ON_BinaryArchive& archive ) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
  if (!rc)
    return false;
  for(;;)
  {
    rc = archive.WriteUuid(m_object_id);
    if (!rc) break;
    rc = archive.WriteComponentIndex(m_component_index);
    if (!rc) break;
    rc = archive.WriteInterval(m_edge_domain);
    if (!rc) break;
    rc = archive.WriteInterval(m_trim_domain);
    if (!rc) break;
    bool b = ON_CurveProxy::ProxyCurveIsReversed();
    rc = archive.WriteBool(b);
    if (!rc) break;
    rc = archive.WriteInterval(ON_CurveProxy::Domain());
    if (!rc) break;
    rc = archive.WriteInterval(ON_CurveProxy::ProxyCurveDomain());
    if (!rc) break;

    break;
  }
  if ( !archive.EndWrite3dmChunk() )
    rc = false;
  return rc;
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:29,代码来源:opennurbs_polyedgecurve.cpp

示例5: Write

BOOL ON_BrepFaceArray::Write( ON_BinaryArchive& file ) const
{
  int i;
  BOOL rc = file.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 0 );
  if (rc)
  {
    rc = file.Write3dmChunkVersion(1,1); // 1.1 added m_face_uuid

    // chunk version 1.0 and later
    const int count = Count();
    if (rc) rc = file.WriteInt( count );
    for ( i = 0; rc && i < count; i++ )
    {
      if (rc) rc = m_a[i].Write(file);
    }

    // chunk version 1.1 and later
    for ( i = 0; rc && i < count; i++ )
    {
      rc = file.WriteUuid( m_a[i].m_face_uuid );
    }

    if ( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:27,代码来源:opennurbs_brep_io.cpp

示例6: Write

// virtual ON_Object override
ON_BOOL32 ON__IDefLayerSettingsUserData::Write(ON_BinaryArchive& binary_archive) const
{
  bool rc = binary_archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,1);
  if ( !rc )
    return false;

  rc = false;
  for(;;)
  {
    if ( !binary_archive.WriteArray(m_layers.Count(),m_layers.Array()) )
      break;

    // added in version 1.1 chunks
    bool bHaveParentLayer = ( 0 != m_idef_layer_table_parent_layer );
    if ( !binary_archive.WriteBool(bHaveParentLayer) )
      break;

    if ( bHaveParentLayer )
    {
      if ( !binary_archive.WriteObject(m_idef_layer_table_parent_layer) )
        break;
    }

    rc = true;
    break;
  }

  if ( !binary_archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:33,代码来源:opennurbs_instance.cpp

示例7: Write

ON_BOOL32 ON_Linetype::Write( ON_BinaryArchive& file) const
{
  bool rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,1);
  if (rc)
  {
    for(;;)
    {
      // chunk version 1.0 fields
      rc = file.WriteInt( LinetypeIndex());
      if(!rc) break;

      rc = file.WriteString( m_linetype_name );
      if (!rc) break;

      rc = file.WriteArray( m_segments );
      if(!rc) break;

      // chunk version 1.1 fields
      rc = file.WriteUuid( m_linetype_id );
      if (!rc) break;

      break;
    }

    if ( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:29,代码来源:opennurbs_linetype.cpp

示例8: Write

bool ON_PlugInRef::Write( ON_BinaryArchive& file ) const
{
  bool rc = file.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,2);
  if (rc)
  {
    //version 1.0 fields
    if (rc) rc = file.WriteUuid(m_plugin_id);
    if (rc) rc = file.WriteInt(m_plugin_type);
    if (rc) rc = file.WriteString(m_plugin_name);
    if (rc) rc = file.WriteString(m_plugin_version);
    if (rc) rc = file.WriteString(m_plugin_filename);

    // version 1.1 fields 
    if (rc) rc = file.WriteString(m_developer_organization);
    if (rc) rc = file.WriteString(m_developer_address);
    if (rc) rc = file.WriteString(m_developer_country);
    if (rc) rc = file.WriteString(m_developer_phone);
    if (rc) rc = file.WriteString(m_developer_email);
    if (rc) rc = file.WriteString(m_developer_website);
    if (rc) rc = file.WriteString(m_developer_updateurl);
    if (rc) rc = file.WriteString(m_developer_fax);

    // version 1.2 fields
    if (rc) rc = file.WriteInt(m_plugin_platform);
    if (rc) rc = file.WriteInt(m_plugin_sdk_version);
    if (rc) rc = file.WriteInt(m_plugin_sdk_service_release);

    if( !file.EndWrite3dmChunk() )
      rc = false;
  }
  return rc;
}
开发者ID:jl2,项目名称:ONView,代码行数:32,代码来源:opennurbs_pluginlist.cpp

示例9: Write

ON_BOOL32 ON_DetailView::Write( ON_BinaryArchive& archive ) const
{
  bool rc = archive.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 1, 1 );
  if (!rc)
    return false;

  for(;;)
  {
    // m_view is wrapped in a subchunk so ON_3dmView can be expanded 
    // without breaking the file format.
    rc = archive.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 1, 0 );
    if (rc) 
    {
      rc = m_view.Write(archive);
      if (!archive.EndWrite3dmChunk())
        rc = false;
    }
    if(!rc)
      break;

    // m_boundary is wrapped in a subchunk so ON_NurbsCurve can be expanded 
    // without breaking the file format.
    rc = archive.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 1, 0 );
    if (rc) 
    {
      rc = m_boundary.Write(archive)?true:false;
      if (!archive.EndWrite3dmChunk())
        rc = false;
    }
    if(!rc)
      break;

    // 28 Feb 2006  1.1 fields added
    rc = archive.WriteDouble(m_page_per_model_ratio);
    if ( !rc )
      break;

    break;
  }

  if ( !archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:45,代码来源:opennurbs_detail.cpp

示例10: Write

bool ON_Localizer::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
  if (!rc)
    return false;

  for(;;)
  {
    rc = archive.WriteInt(m_type);
    if ( !rc ) break;
    rc = archive.WritePoint(m_P);
    if ( !rc ) break;
    rc = archive.WriteVector(m_V);
    if ( !rc ) break;
    rc = archive.WriteInterval(m_d);
    if ( !rc ) break;

    rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
    if (!rc) break;
    rc = archive.WriteBool( m_nurbs_curve ? true : false );
    if ( rc && m_nurbs_curve )
      rc = m_nurbs_curve->Write(archive)?true:false;
    if ( !archive.EndWrite3dmChunk() )
      rc = false;
    if (!rc) break;

    rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);
    if (!rc) break;
    rc = archive.WriteBool( m_nurbs_surface ? true : false );
    if ( rc && m_nurbs_surface )
      rc = m_nurbs_surface->Write(archive)?true:false;
    if ( !archive.EndWrite3dmChunk() )
      rc = false;
    if (!rc) break;

    break;
  }
  
  if ( !archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:43,代码来源:opennurbs_morph.cpp

示例11: Write

ON_BOOL32 ON_HatchExtra::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);

  if(rc) rc = archive.WriteUuid( m_parent_hatch);
  if(rc) rc = archive.WritePoint(m_basepoint);

  if(!archive.EndWrite3dmChunk())
    rc = false;

  return rc;
}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:12,代码来源:opennurbs_hatch.cpp

示例12: Write

bool ON_BezierCage::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,0);

  if (rc)
  {
    rc = archive.WriteInt(m_dim);
    if(rc)
      rc = archive.WriteInt(m_is_rat);
    if (rc)
      rc = archive.WriteInt(m_order[0]);
    if (rc)
      rc = archive.WriteInt(m_order[1]);
    if (rc)
      rc = archive.WriteInt(m_order[2]);
    int i,j,k;
    const int cv_dim = m_is_rat?(m_dim+1):m_dim;
    double* bogus_cv = 0;
    for(i = 0; i < m_order[0] && rc; i++)
    {
      for(j = 0; j < m_order[1] && rc; j++)
      {
        for ( k = 0; k < m_order[2] && rc; k++)
        {
          const double* cv = CV(i,j,k);
          if ( !cv )
          {
            if ( 0 == bogus_cv )
            {
              bogus_cv = (double*)onmalloc(cv_dim*sizeof(*bogus_cv));
              for ( int n = 0; n < cv_dim; n++ )
                bogus_cv[n] = ON_UNSET_VALUE;
            }
            cv = bogus_cv;
          }
          rc = archive.WriteDouble(cv_dim,cv);
        }
      }
    }

    if ( 0 != bogus_cv )
      onfree(bogus_cv);

    if ( !archive.EndWrite3dmChunk() )
    {
      rc = false;
    }
  }

  return rc;
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:51,代码来源:opennurbs_beziervolume.cpp

示例13: Write

BOOL CSampleObjectUserData::Write( ON_BinaryArchive& binary_archive ) const
{
  int minor_version = 0;
  bool rc = binary_archive.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 1, minor_version );
  if( !rc )
    return false;

  // Write class members like this
  for(;;)
  {
    // version 1.0 fields
    rc = binary_archive.WritePoint( m_point );
    if( !rc ) break;

    rc = binary_archive.WriteString( m_string );
    if( !rc ) break;

    // If you add data members to CSampleObjectUserData after you 
    // have released a product, simply increment minor_version
    // by one, and write the new information.  This way you
    // can enhance your user data over several versions of
    // your product without breaking file IO.  It is CRITICAL
    // that once you write something to a customer's .3dm
    // file, you continue to write it the same way for all
    // future versions.
    
    // version 1.1 fields added DD MMM YYYY
    // rc = binary_archive.WriteSomethingNew( ... );
    // if (!rc) break;
    // rc = binary_archive.WriteSomethingElseNew( ... );
    // if (!rc) break;
    
    // version 1.2 fields added DD MMM YYYY
    // rc = binary_archive.WriteAnotherSomethingNew( ... );
    // if (!rc) break;
    // rc = binary_archive.WriteAnotherSomethingElseNew( ... );
    // if (!rc) break;

    break;
  }

  // If BeginWrite3dmChunk() returns true,
  // then EndWrite3dmChunk() must be called, 
  // even if a write operation failed.
  if( !binary_archive.EndWrite3dmChunk() )
    rc = false;

  return rc;
}
开发者ID:619486,项目名称:Rhino5Samples_CPP,代码行数:49,代码来源:SampleObjectUserData.cpp

示例14: Write

bool ON_BrepRegionArray::Write( ON_BinaryArchive& file ) const
{
    int i;
    bool rc = file.BeginWrite3dmChunk( TCODE_ANONYMOUS_CHUNK, 1, 0 );
    if (rc)
    {
        const int count = Count();
        if (rc) rc = file.WriteInt( count );
        for ( i = 0; rc && i < count; i++ )
        {
            rc = m_a[i].Write(file)?true:false;
        }
        if ( !file.EndWrite3dmChunk() )
            rc = false;
    }
    return rc;
}
开发者ID:raazui,项目名称:3D-Surface-Reconstruction,代码行数:17,代码来源:opennurbs_brep_region.cpp

示例15: Write

ON_BOOL32 ON_MeshNgonUserData::Write(ON_BinaryArchive& archive) const
{
  bool rc = archive.BeginWrite3dmChunk(TCODE_ANONYMOUS_CHUNK,1,1);
  if (!rc)
    return false;
  for (;;)
  {
    int count = ( 0 == m_ngon_list ) ? 0 : m_ngon_list->NgonCount();
    const ON_MeshNgon* ngon_array = (count > 0) ? m_ngon_list->Ngon(0) : 0;
    if ( 0 == ngon_array )
      count = 0;
    rc = archive.WriteInt(count);
    if (count <= 0 || !rc)
      break;
    for ( int i = 0; i < count; i++ )
    {
      const struct ON_MeshNgon& ngon = ngon_array[i];
      rc = archive.WriteInt(ngon.N);
      if (!rc)
        break;
      rc = archive.WriteInt(ngon.N,ngon.vi);
      if (!rc)
        break;
      rc = archive.WriteInt(ngon.N,ngon.fi);
      if (!rc)
        break;
    }
    if (!rc)
      break;

    // chunk version 1.1 added face and vertex validation counts.
    rc = archive.WriteInt(m_mesh_F_count);
    if (!rc)
      break;
    rc = archive.WriteInt(m_mesh_V_count);
    if (!rc)
      break;

    break;
  }
  if ( !archive.EndWrite3dmChunk() )
    rc = false;
  return rc;
}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:44,代码来源:opennurbs_mesh_ngon.cpp


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