0.1.33
Loading...
Searching...
No Matches
pyhelios.wrappers.DataTypes.AdaptiveTileRefinement Class Reference

Parameters controlling the adaptive sub-patch refinement of an adaptive tile object. More...

Detailed Description

Parameters controlling the adaptive sub-patch refinement of an adaptive tile object.

Sub-patch edge length grows with distance from target, from subpatch_size_min at the target itself up to subpatch_size_max at the point of the tile farthest from it. Refinement is performed by recursive quadtree subdivision, so the achieved sizes are the requested sizes rounded onto a power-of-two ladder; both ends are typically within about 20% of the request. Query what was actually achieved with Context.getAdaptiveTileObjectSubpatchSizeRange().

       from the target (default: 0.35, which suits a typical ground plane). Useful values run
       from about 0.25 to 1. This does not change the achieved size range, but it is by far
       the most consequential parameter for the sub-patch count -- on a 50 m tile refined from
       2 m to 2 cm, 0.25 gives roughly 9 thousand sub-patches and 2 gives roughly 2 million.
       Use ``Context.predictAdaptiveTileObjectSubpatchCount()`` to check before building.
Examples
>>> refinement = AdaptiveTileRefinement(target=vec2(0, 0), subpatch_size_min=0.02, ... subpatch_size_max=2.0) >>> refinement.subpatch_size_min 0.02

Definition at line 666 of file DataTypes.py.

+ Inheritance diagram for pyhelios.wrappers.DataTypes.AdaptiveTileRefinement:
+ Collaboration diagram for pyhelios.wrappers.DataTypes.AdaptiveTileRefinement:

Public Member Functions

str __repr__ (self)
 
str __str__ (self)
 
 __new__ (cls, target=None, subpatch_size_min=None, subpatch_size_max=None, transition_exponent=None)
 Create only pass cls to prevent TypeError on Windows.
 
 __init__ (self, 'vec2' target=None, float subpatch_size_min=0.05, float subpatch_size_max=1.0, float transition_exponent=0.35)
 Initialize AdaptiveTileRefinement fields with validation.
 
 from_list (self, List[float] input_list)
 Initialize from list [target_x, target_y, subpatch_size_min, subpatch_size_max, transition_exponent].
 
List[float] to_list (self)
 Convert to the flat 5-element form used across the C ABI.
 

Public Attributes

 target = target
 Point of maximum refinement, in tile-local coordinates relative to the tile center.
 
 subpatch_size_min = float(subpatch_size_min)
 Requested edge length of the finest sub-patches, which occur at the.
 
 subpatch_size_max = float(subpatch_size_max)
 Requested edge length of the coarsest sub-patches, which occur farthest.
 
 transition_exponent = float(transition_exponent)
 Exponent controlling how rapidly sub-patch size grows with distance.
 

Static Protected Member Functions

bool _is_finite_numeric (value)
 Check if value is a finite number (not NaN or inf).
 

Static Protected Attributes

list _fields_
 

Constructor & Destructor Documentation

◆ __init__()

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.__init__ ( self,
'vec2' target = None,
float subpatch_size_min = 0.05,
float subpatch_size_max = 1.0,
float transition_exponent = 0.35 )

Initialize AdaptiveTileRefinement fields with validation.

Do not call super().__init__() for Windows compatibility.

Defaults match helios::AdaptiveTileRefinement.

Exceptions
ValueErrorIf target is not a vec2, if either size is not a positive finite number, if subpatch_size_min exceeds subpatch_size_max, if their ratio exceeds the largest supported value of 16777216, or if transition_exponent is not positive and finite.

Definition at line 724 of file DataTypes.py.

Member Function Documentation

◆ __new__()

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.__new__ ( cls,
target = None,
subpatch_size_min = None,
subpatch_size_max = None,
transition_exponent = None )

Create only pass cls to prevent TypeError on Windows.

Definition at line 709 of file DataTypes.py.

◆ __repr__()

str pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.__repr__ ( self)

Definition at line 699 of file DataTypes.py.

◆ __str__()

str pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.__str__ ( self)

Definition at line 705 of file DataTypes.py.

◆ _is_finite_numeric()

bool pyhelios.wrappers.DataTypes.AdaptiveTileRefinement._is_finite_numeric ( value)
staticprotected

Check if value is a finite number (not NaN or inf).

Definition at line 783 of file DataTypes.py.

◆ from_list()

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.from_list ( self,
List[float] input_list )

Initialize from list [target_x, target_y, subpatch_size_min, subpatch_size_max, transition_exponent].

Definition at line 759 of file DataTypes.py.

◆ to_list()

List[float] pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.to_list ( self)

Convert to the flat 5-element form used across the C ABI.

   Element order matches the order helios itself uses to serialize the struct to XML:
   [target_x, target_y, subpatch_size_min, subpatch_size_max, transition_exponent]

Definition at line 775 of file DataTypes.py.

Member Data Documentation

◆ _fields_

list pyhelios.wrappers.DataTypes.AdaptiveTileRefinement._fields_
staticprotected

Definition at line 692 of file DataTypes.py.

◆ subpatch_size_max

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.subpatch_size_max = float(subpatch_size_max)

Requested edge length of the coarsest sub-patches, which occur farthest.

Definition at line 755 of file DataTypes.py.

◆ subpatch_size_min

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.subpatch_size_min = float(subpatch_size_min)

Requested edge length of the finest sub-patches, which occur at the.

Definition at line 754 of file DataTypes.py.

◆ target

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.target = target

Point of maximum refinement, in tile-local coordinates relative to the tile center.

Definition at line 753 of file DataTypes.py.

◆ transition_exponent

pyhelios.wrappers.DataTypes.AdaptiveTileRefinement.transition_exponent = float(transition_exponent)

Exponent controlling how rapidly sub-patch size grows with distance.

Definition at line 756 of file DataTypes.py.


The documentation for this class was generated from the following file: