本文整理汇总了C++中ossimDrect::width方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimDrect::width方法的具体用法?C++ ossimDrect::width怎么用?C++ ossimDrect::width使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimDrect
的用法示例。
在下文中一共展示了ossimDrect::width方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
//*****************************************************************************
// METHOD: ossimDblGrid::initialize()
//
// Permits initialization after construction
//
//*****************************************************************************
void ossimDblGrid::initialize(const ossimDrect& uv_rect,
const ossimDpt& spacing,
double null_value)
{
static const char MODULE[] = "ossimDblGrid::initialize()";
if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
ossimIpt size ((int) (uv_rect.width()/spacing.x) + 1,
(int) (uv_rect.height()/spacing.y) + 1);
initialize(size, uv_rect.ul(), spacing, null_value);
if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " returning...\n";
return;
}
示例2: size
/*!****************************************************************************
* CONSTRUCTOR: ossimDblGrid
*
*****************************************************************************/
ossimDblGrid::ossimDblGrid(const ossimDrect& rect,
const ossimDpt& spacing,
double null_value)
:
theGridData (0),
theMinValue (OSSIM_DEFAULT_MIN_PIX_DOUBLE),
theMaxValue (OSSIM_DEFAULT_MAX_PIX_DOUBLE),
theExtrapIsEnabled (true),
theDomainType (CONTINUOUS)
{
static const char MODULE[] = "ossimDblGrid Constructor";
if (traceExec()) ossimNotify(ossimNotifyLevel_DEBUG) << MODULE << " entering...\n";
ossimIpt size ((int) (rect.width()/spacing.x) + 1,
(int) (rect.height()/spacing.y) + 1);
initialize(size, rect.ul(), spacing, null_value);
if (traceExec()) ossimNotify(ossimNotifyLevel_WARN) << MODULE << " returning...\n";
}
示例3: getScaleChangeImageToView
void ossimImageViewTransform::getScaleChangeImageToView(ossimDpt& result,
const ossimDrect& imageRect)
{
result.makeNan();
if(!imageRect.hasNans())
{
ossimDpt vul;
ossimDpt vur;
ossimDpt vlr;
ossimDpt vll;
imageToView(imageRect.ul(),
vul);
imageToView(imageRect.ur(),
vur);
imageToView(imageRect.lr(),
vlr);
imageToView(imageRect.ll(),
vll);
if(!vul.hasNans()&&
!vur.hasNans()&&
!vlr.hasNans()&&
!vll.hasNans())
{
double deltaTop = (vul - vur).length();
double deltaBottom = (vll - vlr).length();
double deltaRight = (vur - vlr).length();
double w = imageRect.width();
double h = imageRect.height();
result.x = (deltaTop/w + deltaBottom/w)*.5;
result.y = (deltaRight/h + deltaRight/h)*.5;
}
}
}
示例4: getScaleChangeViewToImage
void ossimImageViewTransform::getScaleChangeViewToImage(ossimDpt& result,
const ossimDrect& viewRect)
{
result.makeNan();
if(!viewRect.hasNans())
{
ossimDpt iul;
ossimDpt iur;
ossimDpt ilr;
ossimDpt ill;
imageToView(viewRect.ul(),
iul);
imageToView(viewRect.ur(),
iur);
imageToView(viewRect.lr(),
ilr);
imageToView(viewRect.ll(),
ill);
if(!iul.hasNans()&&
!iur.hasNans()&&
!ilr.hasNans()&&
!ill.hasNans())
{
double deltaTop = (iul - iur).length();
double deltaBottom = (ill - ilr).length();
double deltaRight = (iur - ilr).length();
double w = viewRect.width();
double h = viewRect.height();
result.x = (deltaTop/w + deltaBottom/w)*.5;
result.y = (deltaRight/h + deltaRight/h)*.5;
}
}
}