Inventor/oivAlgebraicShape.h File Reference

This file contains utilities fonction when defining custom SoAlgebraicShape. More...

Go to the source code of this file.

Classes

struct  OivASRay
 Structure for parameter of the ray. More...
struct  OivASPoint
 Structure containing information about the the raycast intersection point. More...

Functions

bool OivASSolveQuadric (in vec3 abc, inout vec2 roots)
bool OivASRayPlaneIntersection (in OivASRay ray, in vec4 p, inout float t)
vec4 OivASGetColor ()
float OivASGetOpacity ()
bool OivASIsOpaque ()
void OivASVertexShaderEntry ()
vec4 OivASComputeColor (in OivASPoint p)
bool OivASRayIntersection (in OivASRay ray, inout OivASPoint p)

Detailed Description

This file contains utilities fonction when defining custom SoAlgebraicShape.

Definition in file oivAlgebraicShape.h.


Function Documentation

vec4 OivASComputeColor ( in OivASPoint  p  ) 

[Slot] COMPUTE_COLOR Returns the color of the fragment.

Note that for shading facilities, the position, normal and color of the fragment are filled in the input parameter 'p'.

vec4 OivASGetColor (  ) 

Get the color (i.e.

from material or vertex color) of the shape.

float OivASGetOpacity (  ) 

Get the opacity (i.e.

alpha component) of the shape.

bool OivASIsOpaque (  ) 

Ask if the shape is opaque (i.e.

OivASGetOpacity() == 1.0).

bool OivASRayIntersection ( in OivASRay  ray,
inout OivASPoint  p 
)

[Slot] rayIntersection Computes the intersection between ray and shape.

* ray: ray parameters * p: structure containing the intersection point position (if any), normal (if any) and color (if any) * return true if there is intersection, false otherwise

Note that all positions and directions are defined in the space specified in the constructor of the SoAlgebraicShape node. The default one is the local frame coordinate centered at (0,0,0) with bounding box coordinates between -1.0 and 1.0.

For example, for a sphere, we consider in this function that the sphere has a radius of 1.0, centered at the origin.

bool OivASRayPlaneIntersection ( in OivASRay  ray,
in vec4  p,
inout float  t 
)

Ray intersects plane, returns true is there is an intersection at 't' Plane 'p' is define such as 'xyz' represents the orientation and 'w', the distance from origin (i.e.

the point p.w*p.xyz lies on the plane).

bool OivASSolveQuadric ( in vec3  abc,
inout vec2  roots 
)

Helper function to solve quadric of type -> a*x*x + b*x + c = 0.

Return true if there are roots, stored in 'roots' vector. Note that it can be used in fragment shader only.

void OivASVertexShaderEntry (  ) 

[Slot] VERTEX_SHADER_ENTRY Defines actions from the vertex shader such as initialize varying parameters from vertex attribute and so on.


Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/