summaryrefslogtreecommitdiff
path: root/include/glass_data.h
diff options
context:
space:
mode:
authoradmin <contact@optics-design.com>2025-04-25 21:19:44 +0200
committeradmin <contact@optics-design.com>2025-04-25 21:19:44 +0200
commit6be3193593d6fe6dc36e584a44ec629a44fc394b (patch)
treeeec627ebb2abc443ce44b8ce8b9180f2225e13ec /include/glass_data.h
First Commit
Diffstat (limited to 'include/glass_data.h')
-rw-r--r--include/glass_data.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/glass_data.h b/include/glass_data.h
new file mode 100644
index 0000000..a5eb3c6
--- /dev/null
+++ b/include/glass_data.h
@@ -0,0 +1,40 @@
+/**
+ * glass_data.h - header file from glass_data.c.
+ *
+ * Copyright (C) 2025 https://optics-design.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * See the COPYING file for the full license text.
+ */
+#ifndef GLASS_DATA_H
+#define GLASS_DATA_H
+
+#include "glamacdef.h" // For type definitions
+
+// Structure to represent an optical glass
+typedef struct {
+ byte name[50];
+ f32 abbeNumber; // X-axis
+ f32 refractiveIndex; // Y-axis
+} Glass;
+
+// Get number of glasses in the catalog
+u32 get_glass_count(void);
+
+// Get glass at index
+const Glass* get_glass(u32 index);
+
+// Get glass name
+const byte* get_glass_name(u32 index);
+
+// Find data range in glass catalog
+void find_glass_data_range(f32 *minAbbe, f32 *maxAbbe, f32 *minRI, f32 *maxRI);
+
+// Initialize glass data - call at program start
+void initialize_glass_data(void);
+
+#endif /* GLASS_DATA_H */
Back to https://optics-design.com