本文整理汇总了C++中ON_Xform::IsIdentity方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Xform::IsIdentity方法的具体用法?C++ ON_Xform::IsIdentity怎么用?C++ ON_Xform::IsIdentity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_Xform
的用法示例。
在下文中一共展示了ON_Xform::IsIdentity方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsValid
ON_BOOL32 ON_InstanceRef::IsValid( ON_TextLog* text_log ) const
{
if ( 0 == ON_UuidCompare( m_instance_definition_uuid, ON_nil_uuid) )
{
if ( text_log )
text_log->Print("ON_InstanceRef has nil m_instance_definition_uuid.\n");
return false;
}
ON_Xform tmp = m_xform.Inverse()*m_xform;
if ( !tmp.IsIdentity( ON_InstanceRef::m_singular_xform_tol ) )
{
if ( text_log )
text_log->Print("ON_InstanceRef has singular m_xform.\n");
return false;
}
return true;
}
示例2: Transform
bool ON_Plane::Transform( const ON_Xform& xform )
{
if ( xform.IsIdentity() )
{
// 27 October 2011 Dale Lear
// If the plane is valid and the transformation
// is the identity, then NO changes should be
// made to the plane's values. In particular
// calling CreateFromFrame() can introduce
// slight fuzz.
//
// Please discuss any changes with me.
return IsValid();
}
ON_3dPoint origin_pt = xform*origin;
// use care tranforming vectors
ON_3dVector xaxis_vec = (xform*(origin+xaxis)) - origin_pt;
ON_3dVector yaxis_vec = (xform*(origin+yaxis)) - origin_pt;
return CreateFromFrame( origin_pt, xaxis_vec, yaxis_vec );
}
示例3: Print
void ON_TextLog::Print( const ON_Xform& xform )
{
if ( xform.IsIdentity() )
{
Print("identity transformation\n");
}
else if ( xform.IsZero() )
{
Print("zero transformation\n");
}
else
{
Print(m_double4_format,xform[0][0],xform[0][1],xform[0][2],xform[0][3]);
Print("\n");
Print(m_double4_format,xform[1][0],xform[1][1],xform[1][2],xform[1][3]);
Print("\n");
Print(m_double4_format,xform[2][0],xform[2][1],xform[2][2],xform[2][3]);
Print("\n");
Print(m_double4_format,xform[3][0],xform[3][1],xform[3][2],xform[3][3]);
Print("\n");
}
}