BRL-CAD
optical.h
Go to the documentation of this file.
1/* O P T I C A L . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup liboptical */
21/** @{ */
22/** @file optical.h
23 *
24 * @brief
25 * Header file for the BRL-CAD Optical Library, LIBOPTICAL.
26 *
27 */
28
29#ifndef OPTICAL_H
30#define OPTICAL_H
31
32#include "common.h"
33
34#include "bu/vls.h"
35__BEGIN_DECLS
36
37#include "optical/defines.h"
38#include "optical/debug.h"
39#include "optical/shadework.h"
40#include "optical/shadefuncs.h"
41
42/**
43 * this function sets the provided mfuncs head pointer to the list of
44 * available shaders. the provided mfuncs head pointer should point
45 * to MF_NULL prior to getting passed to optical_shader_init() so that
46 * the same shader list may be returned repeatably.
47 */
48OPTICAL_EXPORT extern void optical_shader_init(struct mfuncs **headp);
49
50/* stub functions useful for debugging */
51/* defined in sh_text.c */
52OPTICAL_EXPORT extern int mlib_zero(struct application *, const struct partition *, struct shadework *, void *);
53OPTICAL_EXPORT extern int mlib_one(struct region *, struct bu_vls *, void **, const struct mfuncs *, struct rt_i *);
54OPTICAL_EXPORT extern void mlib_void(struct region *, void *);
55
56
57/* defined in refract.c */
58OPTICAL_EXPORT extern int
59rr_render(struct application *app, const struct partition *pp, struct shadework *swp);
60
61/* defined in shade.c */
62OPTICAL_EXPORT extern void
63shade_inputs(struct application *app, const struct partition *pp, struct shadework *swp, int want);
64
65/* defined in wray.c */
66OPTICAL_EXPORT extern void
67wray(struct partition *pp, struct application *app, FILE *fp, const vect_t inormal);
68
69OPTICAL_EXPORT extern void
70wraypts(vect_t in, vect_t inorm, vect_t out, int id, struct application *app, FILE *fp);
71
72OPTICAL_EXPORT extern void
73wraypaint(vect_t start, vect_t norm, int paint, struct application *app, FILE *fp);
74
75/* defined in shade.c */
76OPTICAL_EXPORT extern int
77viewshade(struct application *app, const struct partition *pp, struct shadework *swp);
78
79/* defined in vers.c */
80OPTICAL_EXPORT extern const char *optical_version(void);
81
82
83__END_DECLS
84
85#endif /* OPTICAL_H */
86
87/** @} */
88/*
89 * Local Variables:
90 * mode: C
91 * tab-width: 8
92 * indent-tabs-mode: t
93 * c-file-style: "stroustrup"
94 * End:
95 * ex: shiftwidth=4 tabstop=8
96 */
Header file for the BRL-CAD common definitions.
void shade_inputs(struct application *app, const struct partition *pp, struct shadework *swp, int want)
int mlib_zero(struct application *, const struct partition *, struct shadework *, void *)
void wray(struct partition *pp, struct application *app, FILE *fp, const vect_t inormal)
void optical_shader_init(struct mfuncs **headp)
void wraypts(vect_t in, vect_t inorm, vect_t out, int id, struct application *app, FILE *fp)
int rr_render(struct application *app, const struct partition *pp, struct shadework *swp)
const char * optical_version(void)
void mlib_void(struct region *, void *)
int mlib_one(struct region *, struct bu_vls *, void **, const struct mfuncs *, struct rt_i *)
int viewshade(struct application *app, const struct partition *pp, struct shadework *swp)
void wraypaint(vect_t start, vect_t norm, int paint, struct application *app, FILE *fp)
fastf_t vect_t[ELEMENTS_PER_VECT]
3-tuple vector
Definition: vmath.h:345
Definition: vls.h:53
Definition: region.h:44