00001 #ifndef ALGEBRAIC_SHAPE_H 00002 #define ALGEBRAIC_SHAPE_H 00003 00004 #ifndef OIV_HAS_ASRAY 00005 #define OIV_HAS_ASRAY 00006 00009 struct OivASRay { 00010 vec3 rs; // ray start 00011 vec3 re; // ray end 00012 vec3 rd; // ray direction 00013 }; 00014 #endif 00015 00019 struct OivASPoint { 00020 vec3 position; 00021 vec3 normal; 00022 vec4 color; 00023 }; 00024 00030 bool OivASSolveQuadric ( in vec3 abc, inout vec2 roots ); 00031 00037 bool OivASRayPlaneIntersection ( in OivASRay ray, in vec4 plane, inout float t ); 00038 00042 vec4 OivASGetColor (); 00043 00047 float OivASGetOpacity (); 00048 00052 bool OivASIsOpaque (); 00053 00054 /******************************** SLOT ***************************************/ 00055 00061 void OivASVertexShaderEntry (); 00062 00068 vec4 OivASComputeColor ( in OivASPoint p ); 00069 00086 bool OivASRayIntersection ( in OivASRay ray, inout OivASPoint p ); 00087 00088 #endif // ALGEBRAIC_SHAPE_H 00089