本文整理汇总了C++中LASreadOpener::set_offset方法的典型用法代码示例。如果您正苦于以下问题:C++ LASreadOpener::set_offset方法的具体用法?C++ LASreadOpener::set_offset怎么用?C++ LASreadOpener::set_offset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LASreadOpener
的用法示例。
在下文中一共展示了LASreadOpener::set_offset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: parse_string\n", argv[i]);
usage(true);
}
i++;
lasreadopener.set_parse_string(argv[i]);
}
else if (strcmp(argv[i],"-skip") == 0)
{
if ((i+1) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 1 argument: number_of_lines\n", argv[i]);
usage(true);
}
i++;
lasreadopener.set_skip_lines(atoi(argv[i]));
}
else if (strcmp(argv[i],"-set_scale") == 0)
{
if ((i+3) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 3 arguments: x y z\n", argv[i]);
usage(true);
}
F64 scale_factor[3];
i++;
sscanf(argv[i], "%lf", &(scale_factor[0]));
i++;
sscanf(argv[i], "%lf", &(scale_factor[1]));
i++;
sscanf(argv[i], "%lf", &(scale_factor[2]));
lasreadopener.set_scale_factor(scale_factor);
}
else if (strcmp(argv[i],"-set_offset") == 0)
{
if ((i+3) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs 3 arguments: x y z\n", argv[i]);
usage(true);
}
F64 offset[3];
i++;
sscanf(argv[i], "%lf", &(offset[0]));
i++;
sscanf(argv[i], "%lf", &(offset[1]));
i++;
sscanf(argv[i], "%lf", &(offset[2]));
lasreadopener.set_offset(offset);
}
else if (strcmp(argv[i],"-add_extra") == 0 || strcmp(argv[i],"-add_attribute") == 0)
{
if ((i+3) >= argc)
{
fprintf(stderr,"ERROR: '%s' needs at least 3 arguments: data_type name description\n", argv[i]);
usage(true);
}
if (((i+4) < argc) && (atof(argv[i+4]) != 0.0))
{
if (((i+5) < argc) && ((atof(argv[i+5]) != 0.0) || (strcmp(argv[i+5], "0") == 0) || (strcmp(argv[i+5], "0.0") == 0)))
{
if (((i+6) < argc) && (atof(argv[i+6]) != 0.0))
{
if (((i+7) < argc) && ((atof(argv[i+7]) != 0.0) || (strcmp(argv[i+7], "0") == 0) || (strcmp(argv[i+7], "0.0") == 0)))
{
lasreadopener.add_attribute(atoi(argv[i+1]), argv[i+2], argv[i+3], atof(argv[i+4]), atof(argv[i+5]), atof(argv[i+6]), atof(argv[i+7]));
i+=7;