PandA-2024.02
|
#include <math.h>
Go to the source code of this file.
Data Structures | |
struct | Node |
struct | Intersection |
Typedefs | |
typedef float float3 | __attribute__((vector_size(16))) |
Functions | |
void | print (int x) |
void | print2 (int arg0, int arg1) |
void | print3 (int arg0, int arg1, int arg2) |
float | dot3f (float3 a, float3 b) |
struct Intersection | plane_intersect (struct Node *node, float3 start, float3 dir) |
struct Intersection | sphere_intersect (struct Node *node, float3 start, float3 dir) |
struct Intersection | node_intersect (struct Node *node, float3 start, float3 dir) |
float3 | raytrace_color (float3 start, float3 dir) |
struct Intersection | intersection (float dist, float3 color) |
float3 | get_color (float3 pos) |
float3 | view_vec (int x, int y) |
int | rgb (float r, float g, float b) |
void | raytrace (int x, int y) |
Variables | |
struct Node | nodes [7] |
__attribute__ |
Definition at line 9 of file simple_raytrace.c.
float dot3f | ( | float3 | a, |
float3 | b | ||
) |
Definition at line 12 of file simple_raytrace.c.
Referenced by plane_intersect(), and sphere_intersect().
float3 get_color | ( | float3 | pos | ) |
Definition at line 93 of file simple_raytrace.c.
Referenced by plane_intersect().
struct Intersection intersection | ( | float | dist, |
float3 | color | ||
) |
Definition at line 83 of file simple_raytrace.c.
References Node::color, Intersection::color, Intersection::dist, and result.
Referenced by LoadOpNode::opCtorGenerator(), plane_intersect(), and sphere_intersect().
struct Intersection node_intersect | ( | struct Node * | node, |
float3 | start, | ||
float3 | dir | ||
) |
Definition at line 184 of file simple_raytrace.c.
References Intersection::dist, Node::intersect, Node::left, and Node::right.
struct Intersection plane_intersect | ( | struct Node * | node, |
float3 | start, | ||
float3 | dir | ||
) |
Definition at line 106 of file simple_raytrace.c.
References dot3f(), get_color(), and intersection().
void print | ( | int | x | ) |
Referenced by VarNode::getAbstractState(), Parameter::removeOption(), and Schedule::set_csteps().
void print2 | ( | int | arg0, |
int | arg1 | ||
) |
void print3 | ( | int | arg0, |
int | arg1, | ||
int | arg2 | ||
) |
void raytrace | ( | int | x, |
int | y | ||
) |
Definition at line 239 of file simple_raytrace.c.
References Node::color, print3(), raytrace_color(), rgb(), and view_vec().
float3 raytrace_color | ( | float3 | start, |
float3 | dir | ||
) |
Definition at line 227 of file simple_raytrace.c.
References Intersection::dist, and Node::intersect.
Referenced by raytrace(), and rgb().
int rgb | ( | float | r, |
float | g, | ||
float | b | ||
) |
Definition at line 216 of file simple_raytrace.c.
References raytrace_color().
Referenced by raytrace().
struct Intersection sphere_intersect | ( | struct Node * | node, |
float3 | start, | ||
float3 | dir | ||
) |
Definition at line 131 of file simple_raytrace.c.
References Intersection::color, Intersection::dist, dot3f(), intersection(), and Node::pos.
float3 view_vec | ( | int | x, |
int | y | ||
) |
Definition at line 207 of file simple_raytrace.c.
Referenced by raytrace().
struct Node nodes[7] |
Definition at line 62 of file simple_raytrace.c.
Referenced by bfs(), data_to_input(), and input_to_data().