本文整理汇总了C++中ON_BinaryArchive::WriteVector方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BinaryArchive::WriteVector方法的具体用法?C++ ON_BinaryArchive::WriteVector怎么用?C++ ON_BinaryArchive::WriteVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BinaryArchive
的用法示例。
在下文中一共展示了ON_BinaryArchive::WriteVector方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Write
ON_BOOL32 ON_Light::Write(
ON_BinaryArchive& file
) const
{
int i;
ON_BOOL32 rc = file.Write3dmChunkVersion(1,2);
// version 1.0 fields
if ( rc ) rc = file.WriteInt( m_bOn );
i = m_style;
if ( rc ) rc = file.WriteInt( i );
if ( rc ) rc = file.WriteDouble( m_intensity );
if ( rc ) rc = file.WriteDouble( m_watts );
if ( rc ) rc = file.WriteColor( m_ambient );
if ( rc ) rc = file.WriteColor( m_diffuse );
if ( rc ) rc = file.WriteColor( m_specular );
if ( rc ) rc = file.WriteVector( m_direction );
if ( rc ) rc = file.WritePoint( m_location );
if ( rc ) rc = file.WriteDouble( m_spot_angle );
if ( rc ) rc = file.WriteDouble( m_spot_exponent );
if ( rc ) rc = file.WriteVector( m_attenuation );
if ( rc ) rc = file.WriteDouble( m_shadow_intensity );
if ( rc ) rc = file.WriteInt( m_light_index );
if ( rc ) rc = file.WriteUuid( m_light_id );
if ( rc ) rc = file.WriteString( m_light_name );
// version 1.1 added support for linear and rectangular
if ( rc ) rc = file.WriteVector( m_length );
if ( rc ) rc = file.WriteVector( m_width );
// version 1.2 added m_hotspot support
if ( rc ) rc = file.WriteDouble( m_hotspot );
return rc;
}
示例2: Write
BOOL ON_HatchLine::Write( ON_BinaryArchive& ar) const
{
BOOL rc = ar.Write3dmChunkVersion(1,1);
if (rc) rc = ar.WriteDouble( m_angle);
if (rc) rc = ar.WritePoint( m_base);
if (rc) rc = ar.WriteVector( m_offset);
if (rc) rc = ar.WriteArray( m_dashes);
return rc;
}
示例3: 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;
}