本文整理汇总了C++中ON_BinaryArchive::ReadPlane方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BinaryArchive::ReadPlane方法的具体用法?C++ ON_BinaryArchive::ReadPlane怎么用?C++ ON_BinaryArchive::ReadPlane使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BinaryArchive
的用法示例。
在下文中一共展示了ON_BinaryArchive::ReadPlane方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ON_BOOL32
ON_PlaneSurface::Read(
ON_BinaryArchive& file // open binary file
)
{
int major_version = 0;
int minor_version = 0;
ON_BOOL32 rc = file.Read3dmChunkVersion(&major_version,&minor_version);
if (rc && major_version == 1) {
// common to all 1.x formats
if (rc)
rc = file.ReadPlane( m_plane );
if (rc)
rc = file.ReadInterval( m_domain[0] );
if (rc)
rc = file.ReadInterval( m_domain[1] );
m_extents[0] = m_domain[0];
m_extents[1] = m_domain[1];
if ( minor_version >= 1 )
{
if (rc)
rc = file.ReadInterval( m_extents[0] );
if (rc)
rc = file.ReadInterval( m_extents[1] );
}
}
return rc;
}
示例2: Read
bool ON_ClippingPlane::Read( ON_BinaryArchive& file )
{
Default();
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;
ON_UUID viewport_id;
rc = file.ReadUuid(viewport_id);
if(!rc) break;
if( 0 == minor_version )
m_viewport_ids.AddUuid( viewport_id );
rc = file.ReadUuid(m_plane_id);
if (!rc) break;
rc = file.ReadPlane(m_plane);
if (!rc) break;
rc = file.ReadBool(&m_bEnabled);
if (!rc) break;
if( minor_version > 0 )
{
rc = m_viewport_ids.Read(file);
if (!rc) break;
}
break;
}
if ( !file.EndRead3dmChunk() )
rc = false;
return rc;
}
示例3: Read
ON_BOOL32 ON_Annotation::Read( ON_BinaryArchive& file )
{
Destroy();
int major_version = 0;
int minor_version = 0;
ON_BOOL32 rc = file.Read3dmChunkVersion(&major_version,&minor_version);
if ( rc && major_version == 1 )
{
int i;
if (rc)
{
rc = file.ReadInt( &i );
if (rc)
m_type = ON::AnnotationType(i);
}
if (rc)
rc = file.ReadPlane( m_plane );
if (rc)
rc = file.ReadArray( m_points );
if (rc)
rc = file.ReadString( m_usertext );
if (rc)
rc = file.ReadString( m_defaulttext );
if( rc )
{
rc = file.ReadInt( &i );
if (rc) m_userpositionedtext = i ? true : false;
}
}
if( fabs( m_plane.origin.x) > REALLY_BIG_NUMBER || fabs( m_plane.origin.y) > REALLY_BIG_NUMBER || fabs( m_plane.origin.z) > REALLY_BIG_NUMBER)
return false;
for( int i = 0; i < m_points.Count(); i++)
{
if( fabs( m_points[i].x) > REALLY_BIG_NUMBER || fabs( m_points[i].y) > REALLY_BIG_NUMBER)
return false;
}
return rc;
}
示例4: 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;
}
示例5: Read
BOOL ON_Hatch::Read( ON_BinaryArchive& ar)
{
m_plane.CreateFromNormal( ON_origin, ON_zaxis);
m_pattern_scale = 1.0;
m_pattern_rotation = 0.0;
m_pattern_index = -1;
m_loops.Empty();
int major_version = 0;
int minor_version = 0;
BOOL rc = ar.Read3dmChunkVersion( &major_version, &minor_version);
if ( major_version == 1 )
{
if( rc) rc = ar.ReadPlane( m_plane);
if( rc) rc = ar.ReadDouble( &m_pattern_scale);
if( rc) rc = ar.ReadDouble( &m_pattern_rotation);
if( rc) rc = ar.ReadInt( &m_pattern_index);
if( rc)
{
m_loops.Empty();
int i, count = 0;
rc = ar.ReadInt( &count);
if( rc && count > 0)
{
m_loops.SetCapacity( count );
for( i = 0; rc && i < count; i++)
{
ON_HatchLoop*& pLoop = m_loops.AppendNew();
pLoop = new ON_HatchLoop;
if( pLoop)
rc = pLoop->Read( ar);
else
rc = false;
}
}
}
}
return rc;
}