NAME

Qhull::Options - A container for Qhull to minimize re-parsing

VERSION

version 0.05

SYNOPSIS

CONSTRUCTORS

new_from_options

$obj = Qhull::Options->new_from_options( \@qhull_options );

Parse a list of qhull options and return an Qhull::Options object.

new_from_specs

$obj = Qhull::Options->new_from_specs( \@qhull_specs );

Create a Qhull::Options object from a list of specifications in the same format returned by "parse_options" in Qhull::Util::Options. The specifications are used directly and made readonly.

METHODS

clone_with_specs

$new_obj = $obj->clone_with_specs( \@new_specs );

Clone $obj appending the specified specs. If an existing option is also specified in @new_specs, it is removed from the existing specs.

clone_with_options

$new_obj = $obj->clone_with_specs( \@new_options );

Clone $obj appending the specified options. If an existing option is also specified in @new_options, it is removed.

filter_args

$new_obj = $obj->filter_args( %options );

Filter out qhull arguments in the categories

CAT_INPUT
CAT_INPUT_FORMAT
CAT_OUTPUT
CAT_OUTPUT_GEOM

as they will break input or output parsing and don't add anything we need.

Note that the TI and TO options are never filtered out, as they are handled explicitly.

%options can have any of the following entries:

  • passthrough

    An arrayref of qhull options to pass through. Be careful, as they may break output parsing.

specs

\@specs = $obj->specs;

Return the list of option specs; these are immutable.

qhull_opts

\@options = $obj->qhull_opts;

Return a list of options in a form that qhull will recognize

by_category

\%by_category = $obj->by_category;

Return a hash containing the options specified in the $obj object. The hash is keyed off of the category name. Each value is a hash with two entries:

  • by_name

    A hashref keyed off of the option names. Values are the option specifications.

  • by_position

    An arrayref holding the option specifications for this category in the order they were passed to the object constructor.

by_name

\%hash = $obj->by_name;

Return a hash of option specs keyed off of option names.

TI

input

Returns undef if the TI option was not specified, otherwise its value.

TO

output

Returns undef if the TO option was not specified, otherwise its value.

has_compute

Returns true if a CAT_COMPUTE option was specified

has_output_format

Returns true if a CAT_OUTPUT_FORMAT option was specified

SUPPORT

Bugs

Please report any bugs or feature requests to bug-qhull@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=Qhull

Source

Source is available at

https://gitlab.com/djerius/p5-qhull

and may be cloned from

https://gitlab.com/djerius/p5-qhull.git

SEE ALSO

Please see those modules/websites for more information related to this module.

AUTHOR

Diab Jerius <djerius@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2024 by Smithsonian Astrophysical Observatory.

This is free software, licensed under:

The GNU General Public License, Version 3, June 2007