本文整理汇总了C++中Geom::GetSurfPtr方法的典型用法代码示例。如果您正苦于以下问题:C++ Geom::GetSurfPtr方法的具体用法?C++ Geom::GetSurfPtr怎么用?C++ Geom::GetSurfPtr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geom
的用法示例。
在下文中一共展示了Geom::GetSurfPtr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
//==== Update Method ===//
void SSControlSurf::Update()
{
// Build Control Surface as a rectangle with the points counter clockwise
vec3d c_uws_upper, c_uws_lower, c_uwe_upper, c_uwe_lower;
vector< vec3d > pnt_vec;
double u, w;
Geom* geom = VehicleMgr.GetVehicle()->FindGeom( m_CompID );
if ( !geom ) { return; }
VspSurf* surf = geom->GetSurfPtr();
if ( !surf ) { return; }
m_UWStart.clear();
m_UWEnd.clear();
VspCurve startcrv;
surf->GetU01ConstCurve( startcrv, m_UStart() );
piecewise_curve_type c = startcrv.GetCurve();
double vmin = c.get_parameter_min(); // Really must be 0.0
double vmax = c.get_parameter_max(); // Really should be 4.0
double vle = ( vmin + vmax ) * 0.5;
double vtelow = vmin + TMAGIC;
double vteup = vmax - TMAGIC;
double vlelow = vle - TMAGIC;
double vleup = vle + TMAGIC;
curve_point_type te, le;
te = c.f( vmin );
le = c.f( vle );
double chord, d;
chord = dist( le, te );
if ( m_AbsRelFlag() == vsp::REL )
{
d = chord * m_StartLenFrac();
m_StartLength.Set( d );
}
else
{
d = m_StartLength();
m_StartLenFrac.Set( d / chord );
}
if ( m_ConstFlag.Get() )
{
if ( m_AbsRelFlag() == vsp::REL )
{
m_EndLenFrac.Set( d / chord );
}
else
{
m_EndLength.Set( d );
}
}
curve_point_type telow, teup;
telow = c.f( vtelow );
teup = c.f( vteup );
curve_point_type lelow, leup;
lelow = c.f( vlelow );
leup = c.f( vleup );
piecewise_curve_type clow, cup;
c.split( clow, cup, vle );
double vlow, vup;
if ( m_SurfType() != LOWER_SURF )
{
if ( !m_LEFlag() )
{
eli::geom::intersect::specified_distance( vup, cup, teup, d );
}
else
{
eli::geom::intersect::specified_distance( vup, cup, leup, d );
}
c_uws_upper = vec3d( m_UStart(), vup / vmax, 0 );
m_UWStart.push_back( c_uws_upper );
}
if ( m_SurfType() != UPPER_SURF )
{
if ( !m_LEFlag() )
{
eli::geom::intersect::specified_distance( vlow, clow, telow, d );
}
else
{
eli::geom::intersect::specified_distance( vlow, clow, lelow, d );
//.........这里部分代码省略.........