ai_ray.h
1 /*
2  * Arnold API header file
3  * Copyright (c) 1998-2009 Marcos Fajardo, (c) 2009-2013 Solid Angle SL
4  */
5 
11 #pragma once
12 #include "ai_shader_sample.h"
13 #include "ai_matrix.h"
14 #include "ai_vector.h"
15 #include "ai_types.h"
16 
17 // forward declaration
18 struct AtShaderGlobals;
19 struct AtBucket;
20 
28 #define AI_RAY_UNDEFINED 0x00
29 #define AI_RAY_CAMERA 0x01
30 #define AI_RAY_SHADOW 0x02
31 #define AI_RAY_REFLECTED 0x04
32 #define AI_RAY_REFRACTED 0x08
33 #define AI_RAY_DIFFUSE 0x20
34 #define AI_RAY_GLOSSY 0x40
35 #define AI_RAY_ALL 0xFF
36 #define AI_RAY_GENERIC AI_RAY_ALL
37 /*\}*/
38 
40 typedef struct AtRay {
48  int x;
49  int y;
50  float sx;
51  float sy;
52  float px;
53  float py;
56  double mindist;
57  double maxdist;
59  void* light_source;
60  AtBucket* bucket;
61  float weight;
62  float time;
67  const char* traceset;
70 } AtRay;
71 
72 AI_API void AiMakeRay(AtRay* ray, AtUInt32 type, const AtPoint* origin, const AtVector* dir, double maxdist, const AtShaderGlobals* sg);
73 AI_API void AiReflectRay(AtRay* ray, const AtVector* normal, const AtShaderGlobals* sg);
74 AI_API bool AiRefractRay(AtRay* ray, const AtVector* normal, float n1, float n2, const AtShaderGlobals* sg);
75 AI_API bool AiTrace(const AtRay* ray, AtScrSample* sample);
76 AI_API void AiTraceBackground(const AtRay* ray, AtScrSample* sample);
77 AI_API bool AiTraceProbe(const AtRay* ray, AtShaderGlobals* sgout);
78 
79 /*\}*/

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com