#include <OSGDVRTriangle.h>
Public Member Functions | |
| DVRTriangle (void) | |
| Constructor. | |
| DVRTriangle (const DVRTriangle &tri) | |
| Copy. | |
| ~DVRTriangle (void) | |
| Destructor. | |
| void | dump (void) const |
| Usefull for debugging. | |
| bool | setNumAddPerVertexAttr (UInt32 additionalPerVertexAttributes) |
| set the number of additional per vertex attributes for the cutpoint | |
Public Attributes | |
| Int32 | neighbours [3] |
| Indices of the neighbour triangles of this triangle. | |
| Int32 | vertices [3] |
| Indices of the vertices of this triangle. | |
| Vec3f | normal |
| The triangles normal. | |
| Vec3f | transformedNormal |
| The triangles normal. | |
| bool | visited |
| A Flag. True, iff the triangle has been processed. | |
| bool | inContour |
| True if the triangle belongs to a contour. | |
| DVRTriangle * | contourNeighbour |
| the next triangle in the contour | |
| Pnt3f | cutPnt |
| GLdouble * | cutPoint |
| bool | edgeCut [3] |
| Indicates which edges are cut by the currently processed slice. | |
Definition at line 14 of file OSGDVRTriangle.h.
|
|
Definition at line 8 of file OSGDVRTriangle.cpp. References cutPnt, cutPoint, GLdouble, neighbours, and vertices. 00009 { 00010 // at least we need the vertex position and a texture coordinate 00011 cutPoint = (GLdouble*) malloc(6 * sizeof(GLdouble)); 00012 00013 for(UInt32 i = 0; i < 3; i++) 00014 { 00015 vertices [i] = -1; 00016 neighbours[i] = -1; 00017 cutPnt [i] = 0.0f; 00018 } 00019 }
|
|
|
Definition at line 21 of file OSGDVRTriangle.cpp. References cutPnt, cutPoint, GLdouble, neighbours, normal, and vertices. 00022 { 00023 cutPoint = (GLdouble*) malloc(6 * sizeof(GLdouble)); 00024 00025 for(UInt32 i = 0; i < 3; i++) 00026 { 00027 vertices [i] = tri.vertices [i]; 00028 neighbours[i] = tri.neighbours[i]; 00029 cutPnt [i] = 0.0f; 00030 } 00031 00032 normal = tri.normal; 00033 }
|
|
|
Definition at line 35 of file OSGDVRTriangle.cpp. References cutPoint. 00036 { 00037 free(cutPoint); // allocation by malloc/realloc 00038 }
|
|
|
Definition at line 49 of file OSGDVRTriangle.cpp. References neighbours, and vertices. 00050 { 00051 std::cerr <<"Verts: " 00052 << vertices[0] << " " 00053 << vertices[1] << " " 00054 << vertices[2] 00055 <<" Neighbours: " 00056 << neighbours[0] << " " 00057 << neighbours[1] << " " 00058 << neighbours[2] << std::endl; 00059 }
|
|
|
basically there are two attributes available, the vertex position and a 3D texture coordinate, if one needs additional attributes, e.g. color, texture coordinates,.., the number of (double) values needed has to be set with this function. Definition at line 40 of file OSGDVRTriangle.cpp. References cutPoint, and GLdouble. 00041 { 00042 cutPoint = (GLdouble*) realloc( 00043 cutPoint, 00044 (6 + additionalPerVertexAttributes) * sizeof(GLdouble)); 00045 00046 return cutPoint != NULL; 00047 }
|
|
|
Definition at line 43 of file OSGDVRTriangle.h. Referenced by dump(), DVRTriangle(), and osg::DVRClipGeometry::linkContour(). |
|
|
Definition at line 46 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), dump(), DVRTriangle(), osg::DVRClipGeometry::interpolate(), osg::DVRClipGeometry::isBehindPlane(), osg::DVRClipGeometry::isCut(), and osg::DVRClipGeometry::renderTriangle(). |
|
|
Definition at line 49 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), and DVRTriangle(). |
|
|
Definition at line 55 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::linkContour(). |
|
|
Definition at line 58 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::addNewActiveTriangles(). |
|
|
Definition at line 61 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::addNewActiveTriangles(), osg::DVRClipGeometry::buildContours(), osg::DVRClipGeometry::linkContour(), and osg::DVRClipGeometry::updateActiveTriangles(). |
|
|
Definition at line 64 of file OSGDVRTriangle.h. Referenced by osg::DVRClipper::clipSlice(), osg::DVRClipGeometry::linkContour(), and osg::DVRClipGeometry::updateActiveTriangles(). |
|
|
The intersection point of the triangle and the current slice that contributes to the contour Definition at line 68 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), DVRTriangle(), and osg::DVRClipGeometry::linkContour(). |
|
|
The intersection point of the triangle and the current slice that contributes to the contour with additional texture coordinates, needed because GLUTesselator needs an opaque pointer. The first three values represent the vertex position, the next three the (always available) first texture coordinate for this point and the following values the additional per vertex attributes (if any) Definition at line 77 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::buildTriangledGeometry(), osg::DVRClipper::clipSlice(), DVRTriangle(), osg::DVRClipGeometry::linkContour(), setNumAddPerVertexAttr(), and ~DVRTriangle(). |
|
|
Definition at line 80 of file OSGDVRTriangle.h. Referenced by osg::DVRClipGeometry::isCut(), and osg::DVRClipGeometry::linkContour(). |
1.4.3