Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoAlgebraicShape.h
1#ifndef SO_ALGEBRAIC_SHAPE_H
2#define SO_ALGEBRAIC_SHAPE_H
3
4#include <Inventor/nodes/SoShape.h>
5#include <Inventor/nodes/SoShaderObject.h>
6#include <Inventor/nodes/SoVertexShader.h>
7#include <Inventor/nodes/SoFragmentShader.h>
8#include <Inventor/SbBox.h>
9#include <Inventor/SbVec.h>
10
11
12class SoBufferedShape;
13
14SO_PIMPL_PUBLIC_DECLARATION(SoAlgebraicShape)
15
16
141{
142 SO_NODE_HEADER(SoAlgebraicShape);
143 SO_PIMPL_PUBLIC_HEADER(SoAlgebraicShape)
144
145public:
146
167
175 MAX_WORK_SPACE
176 };
177
192
201
235
248
257
263
264private:
265
270
274 virtual ~SoAlgebraicShape ();
275
281 virtual void computeBBox ( SbBox3f &box, SbVec3f &center ) = 0;
282
289 bool solveQuadric ( const SbVec3f& abc, SbVec2f& roots ) const;
290
296 static SoFragmentShader* fragmentShaderFromFile ( const SbString& filename );
297
302 virtual void generatePrimitives(SoAction *action);
303
305
308 void setCustomTransformationShaderObject( SoVertexShader* vso );
309 void setCustomRayParametersShaderObject ( SoVertexShader* vso );
310 void setCustomGeometryBufferedShape ( SoBufferedShape* shape );
312
313private:
314
316
319 virtual void GLRender ( SoGLRenderAction *action );
320 virtual void computeBBox ( SoAction *action, SbBox3f &box, SbVec3f &center );
322
323private:
324
326
329 static void initClass ();
330 static void exitClass ();
332
336 virtual void notify ( SoNotList *list );
337
338private:
339
340 // Internal for common constructor initialization
341 void initialize ();
342
343 // Internal for updating shader parameter when BBox is not valid
344 void updateBBox ();
345
346};
347
348#endif // SO_QUADRIC_SHAPE_H
3D box class.
Definition SbBox.h:649
Class for smart character strings.
Definition SbString.h:202
2D vector class.
Definition SbVec.h:76
3D vector class.
Definition SbVec.h:932
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
SoMFNode shaderSlots
Multi-field for Shader slots of type SoShaderObject.
SoSFEnum clippingPolicy
Specifies how the algebraic shape should be clipped by a clipping plane.
ASWorkSpace
Specifies which reference frame to use inside the ray intersection shader function.
@ WORLD
The camera space (or view space)
@ CAMERA
The normalized bounding box space.
ASShaderSlot
Specifies the available slots for shader programs.
SoSFNode rayIntersection
Field for an SoFragmentShader object that defines the GLSL ray intersection function.
SoSFEnum workspace
Field to define the workspace.
ASClippingPolicy
Specifies how the algebraic shape should be clipped by a clipping plane.
@ FULL_SHAPE
Standard behaviour.
SoSFBool generateTransparency
Specify if the shape generates transparent fragment.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node to render g...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
Renders a scene graph using Open Inventor's Render Engine.
Multiple-value field containing any number of nodes.
Definition SoMFNode.h:94
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a a node.
Definition SoSFNode.h:97
Abstract base class for all shape nodes.
Definition SoShape.h:116
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...