htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit 3e74747f33b5f080deece426fae655224b3240e1
parent b9b7b4083f3f104c3a5b677fb08c72470df357b2
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri,  9 May 2025 09:33:57 +0200

core : add the htrdr_args_camera_orthographic_check function

Diffstat:
Msrc/core/htrdr_args.c | 12++++++++++++
Msrc/core/htrdr_args.h.in | 4++++
2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/core/htrdr_args.c b/src/core/htrdr_args.c @@ -655,6 +655,18 @@ htrdr_args_camera_orthographic_parse } res_T +htrdr_args_camera_orthographic_check + (const struct htrdr_args_camera_orthographic* cam) +{ + if(!cam) return RES_BAD_ARG; + + /* Invalid image plane height */ + if(cam->height <= 0) return RES_BAD_ARG; + + return RES_OK; +} + +res_T htrdr_args_rectangle_parse(struct htrdr_args_rectangle* rect, const char* str) { if(!rect || !str) return RES_BAD_ARG; diff --git a/src/core/htrdr_args.h.in b/src/core/htrdr_args.h.in @@ -146,6 +146,10 @@ htrdr_args_camera_orthographic_parse const char* str); HTRDR_API res_T +htrdr_args_camera_orthographic_check + (const struct htrdr_args_camera_orthographic* cam); + +HTRDR_API res_T htrdr_args_rectangle_parse (struct htrdr_args_rectangle* rect, const char* str);