0.1.8
Loading...
Searching...
No Matches
pyhelios.validation.datatypes Namespace Reference

Functions

 validate_color_component (float value, str component_name, str param_name, str function_name=None)
 Validate a color component is in valid range [0,1].
 
 validate_rgb_color (Any color, str param_name="color", str function_name=None)
 Validate RGBcolor has finite values in [0,1] range.
 
 validate_rgba_color (Any color, str param_name="color", str function_name=None)
 Validate RGBAcolor has finite values in [0,1] range.
 
 validate_vector_finite (Any vector, str param_name="vector", int expected_dims=3, str function_name=None)
 Validate vector has finite components.
 
 validate_vec2 (Any vector, str param_name="vector", str function_name=None)
 Validate vec2 has finite x,y components.
 
 validate_vec3 (Any vector, str param_name="vector", str function_name=None)
 Validate vec3 has finite x,y,z components.
 
 validate_vec4 (Any vector, str param_name="vector", str function_name=None)
 Validate vec4 has finite x,y,z,w components.
 
 validate_spherical_coord (Any coord, str param_name="coordinate", str function_name=None)
 Validate SphericalCoord has valid values.
 
 validate_integer_vector (Any vector, str param_name="vector", int expected_dims=3, str function_name=None)
 Validate integer vector (int2, int3, int4) has valid integer components.
 
 validate_int2 (Any vector, str param_name="vector", str function_name=None)
 Validate int2 has valid integer x,y components.
 
 validate_int3 (Any vector, str param_name="vector", str function_name=None)
 Validate int3 has valid integer x,y,z components.
 
 validate_int4 (Any vector, str param_name="vector", str function_name=None)
 Validate int4 has valid integer x,y,z,w components.
 

Function Documentation

◆ validate_color_component()

pyhelios.validation.datatypes.validate_color_component ( float value,
str component_name,
str param_name,
str function_name = None )

Validate a color component is in valid range [0,1].

Definition at line 14 of file datatypes.py.

◆ validate_int2()

pyhelios.validation.datatypes.validate_int2 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate int2 has valid integer x,y components.

Parameters
vectorint2 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Returns
The validated vector

Definition at line 298 of file datatypes.py.

◆ validate_int3()

pyhelios.validation.datatypes.validate_int3 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate int3 has valid integer x,y,z components.

Parameters
vectorint3 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages

Definition at line 311 of file datatypes.py.

◆ validate_int4()

pyhelios.validation.datatypes.validate_int4 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate int4 has valid integer x,y,z,w components.

Parameters
vectorint4 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages

Definition at line 323 of file datatypes.py.

◆ validate_integer_vector()

pyhelios.validation.datatypes.validate_integer_vector ( Any vector,
str param_name = "vector",
int expected_dims = 3,
str function_name = None )

Validate integer vector (int2, int3, int4) has valid integer components.

Parameters
vectorInteger vector object to validate
param_nameParameter name for error messages
expected_dimsExpected number of dimensions
function_nameFunction name for error messages
Exceptions
ValidationErrorIf vector has invalid or non-integer components

Definition at line 256 of file datatypes.py.

◆ validate_rgb_color()

pyhelios.validation.datatypes.validate_rgb_color ( Any color,
str param_name = "color",
str function_name = None )

Validate RGBcolor has finite values in [0,1] range.

Parameters
colorRGBcolor object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Exceptions
ValidationErrorIf color is invalid or components out of range

Definition at line 47 of file datatypes.py.

◆ validate_rgba_color()

pyhelios.validation.datatypes.validate_rgba_color ( Any color,
str param_name = "color",
str function_name = None )

Validate RGBAcolor has finite values in [0,1] range.

Parameters
colorRGBAcolor object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Exceptions
ValidationErrorIf color is invalid or components out of range

Definition at line 78 of file datatypes.py.

◆ validate_spherical_coord()

pyhelios.validation.datatypes.validate_spherical_coord ( Any coord,
str param_name = "coordinate",
str function_name = None )

Validate SphericalCoord has valid values.

Parameters
coordSphericalCoord object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Exceptions
ValidationErrorIf coordinate has invalid values

Definition at line 197 of file datatypes.py.

◆ validate_vec2()

pyhelios.validation.datatypes.validate_vec2 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate vec2 has finite x,y components.

Parameters
vectorvec2 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Returns
The validated vec2 object

Definition at line 153 of file datatypes.py.

◆ validate_vec3()

pyhelios.validation.datatypes.validate_vec3 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate vec3 has finite x,y,z components.

Parameters
vectorvec3 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages
Returns
The validated vec3 object

Definition at line 169 of file datatypes.py.

◆ validate_vec4()

pyhelios.validation.datatypes.validate_vec4 ( Any vector,
str param_name = "vector",
str function_name = None )

Validate vec4 has finite x,y,z,w components.

Parameters
vectorvec4 object to validate
param_nameParameter name for error messages
function_nameFunction name for error messages

Definition at line 182 of file datatypes.py.

◆ validate_vector_finite()

pyhelios.validation.datatypes.validate_vector_finite ( Any vector,
str param_name = "vector",
int expected_dims = 3,
str function_name = None )

Validate vector has finite components.

Parameters
vectorVector object to validate (vec2, vec3, vec4, etc.)
param_nameParameter name for error messages
expected_dimsExpected number of dimensions
function_nameFunction name for error messages
Exceptions
ValidationErrorIf vector is invalid or has non-finite components

Definition at line 111 of file datatypes.py.