Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
oivAlgebraicShape.h
Go to the documentation of this file.
1#ifndef ALGEBRAIC_SHAPE_H
2#define ALGEBRAIC_SHAPE_H
3
4#ifndef OIV_HAS_ASRAY
5#define OIV_HAS_ASRAY
9struct OivASRay {
10 vec3 rs; // ray start
11 vec3 re; // ray end
12 vec3 rd; // ray direction
13};
14#endif
15
19struct OivASPoint {
21 vec3 normal;
22 vec4 color;
23};
24
30bool OivASSolveQuadric ( in vec3 abc, inout vec2 roots );
31
37bool OivASRayPlaneIntersection ( in OivASRay ray, in vec4 plane, inout float t );
38
43
48
53
54/******************************** SLOT ***************************************/
55
62
69
86bool OivASRayIntersection ( in OivASRay ray, inout OivASPoint p );
87
88#endif // ALGEBRAIC_SHAPE_H
vec4 OivASGetColor()
Returns the color (i.e.
bool OivASIsOpaque()
Returns true if the shape is opaque (i.e.
bool OivASSolveQuadric(in vec3 abc, inout vec2 roots)
Helper function to solve quadric of type -> a*x*x + b*x + c = 0.
bool OivASRayPlaneIntersection(in OivASRay ray, in vec4 plane, inout float t)
If 'ray' intersects 'plane', returns true and sets location of intersection in 't'.
void OivASVertexShaderEntry()
[Slot] VERTEX_SHADER_ENTRY Defines actions from the vertex shader such as initialize varying paramete...
float OivASGetOpacity()
Returns the opacity (i.e.
vec4 OivASComputeColor(in OivASPoint p)
[Slot] COMPUTE_COLOR Returns the color of the fragment.
bool OivASRayIntersection(in OivASRay ray, inout OivASPoint p)
[Slot] rayIntersection Computes the intersection between ray and shape.
Structure containing information about the the raycast intersection point.
Structure for parameters of the ray.