#include <OSGDVRVertex.h>
Public Member Functions | |
| DVRVertex (void) | |
| Construct a new vertex. | |
| DVRVertex (const DVRVertex &vertex) | |
| Copy. | |
| ~DVRVertex (void) | |
| Destructor. | |
| void | calculatePlaneDistance (const Plane &plane) |
| calculates the distance of the vertex to a reference plane. | |
| void | calculatePlaneDistanceTransformed (const Plane &plane) |
| calculates the distance of the vertex to a reference plane. | |
| void | calculatePlaneDistance (const Plane &plane, const Matrix &transform) |
| calculates the distance of the vertex to a reference plane. | |
| bool | isBehindPlane (float dist2RefPlane, bool &switched) |
| bool | isBehindPlane (float dist2RefPlane) |
| returns true, iff dist2RefPlane ist bigger than this->refPlaneDistance | |
| bool | isCloser (float distance) |
| void | dump (void) const |
| Usefull for debugging. | |
Public Attributes | |
| Pnt3f | pos |
| The vertex index in the parent geometry. | |
| std::vector< Int32 > | adjacentTriangles |
| The adjacent triangles of this vertex. | |
| bool | behindPlane |
| Real32 | refPlaneDistance |
| Pnt3f | transformedPos |
| The position of this vertex in volume coords. | |
Definition at line 13 of file OSGDVRVertex.h.
|
|
Definition at line 8 of file OSGDVRVertex.cpp. References behindPlane, pos, refPlaneDistance, and transformedPos. 00009 { 00010 pos = Pnt3f(0.0, 0.0, 0.0); 00011 transformedPos = pos; 00012 behindPlane = false; 00013 refPlaneDistance = 0.0; 00014 }
|
|
|
Definition at line 16 of file OSGDVRVertex.cpp. References adjacentTriangles, behindPlane, pos, refPlaneDistance, and transformedPos. 00017 { 00018 pos = vertex.pos; 00019 transformedPos = vertex.transformedPos; 00020 adjacentTriangles = vertex.adjacentTriangles; 00021 behindPlane = vertex.behindPlane; 00022 refPlaneDistance = vertex.refPlaneDistance; 00023 }
|
|
|
Definition at line 25 of file OSGDVRVertex.cpp.
|
|
|
uses the vertex position Definition at line 29 of file OSGDVRVertex.cpp. References osg::Plane::distance(), pos, and refPlaneDistance. 00030 { 00031 // calculate distance to the reference plane 00032 refPlaneDistance = plane.distance(pos); 00033 }
|
|
|
uses the transformed vertex position Definition at line 35 of file OSGDVRVertex.cpp. References osg::Plane::distance(), refPlaneDistance, and transformedPos. 00036 { 00037 // calculate distance to the reference plane 00038 refPlaneDistance = plane.distance(transformedPos); 00039 }
|
|
||||||||||||
|
uses the vertex position transformed with 'transform' Definition at line 41 of file OSGDVRVertex.cpp. References osg::Plane::distance(), osg::TransformationMatrix< ValueTypeT >::multPntFullMatrix(), pos, and refPlaneDistance. 00043 { 00044 Pnt3f transPos; 00045 transform.multPntFullMatrix(pos, transPos); 00046 00047 // calculate distance to the reference plane 00048 refPlaneDistance = plane.distance(transPos); 00049 }
|
|
||||||||||||
|
returns true, iff dist2RefPlane ist bigger than this->refPlaneDistance switched will be set, if the vertex was till yet in front of each of the tested planes Definition at line 51 of file OSGDVRVertex.cpp. References behindPlane, and refPlaneDistance. Referenced by osg::DVRClipGeometry::updateActiveTriangles(). 00052 { 00053 switched = false; 00054 00055 if(dist2RefPlane > refPlaneDistance) 00056 { 00057 if(!behindPlane) 00058 switched = true; 00059 00060 behindPlane = true; 00061 00062 return true; 00063 } 00064 00065 return false; 00066 }
|
|
|
Definition at line 68 of file OSGDVRVertex.cpp. References refPlaneDistance. 00069 { 00070 return (dist2RefPlane > refPlaneDistance); 00071 }
|
|
|
One of the calculatePlaneDistance(..) functions has to be called before! Definition at line 74 of file OSGDVRVertex.cpp. References refPlaneDistance. 00075 { 00076 if(distance < refPlaneDistance) 00077 { 00078 return false; 00079 } 00080 00081 if(distance == refPlaneDistance) 00082 return false; 00083 00084 return true; 00085 }
|
|
|
Definition at line 88 of file OSGDVRVertex.cpp. References adjacentTriangles, pos, and transformedPos. 00089 { 00090 std::cerr << "Pos=(" 00091 << pos 00092 << ") transformedPos=(" 00093 << transformedPos 00094 << ") Adj. Tris: "; 00095 00096 for(UInt32 i = 0; i < adjacentTriangles.size(); i++) 00097 { 00098 std::cerr << adjacentTriangles[i] << " "; 00099 } 00100 std::cerr << std::endl; 00101 }
|
|
|
Definition at line 67 of file OSGDVRVertex.h. Referenced by calculatePlaneDistance(), dump(), DVRVertex(), and osg::DVRClipGeometry::insertVertex(). |
|
|
Definition at line 70 of file OSGDVRVertex.h. Referenced by osg::DVRClipGeometry::addNewActiveTriangles(), osg::DVRClipGeometry::buildTriangledGeometry(), dump(), DVRVertex(), and osg::DVRClipGeometry::isLocalMinimum(). |
|
|
Definition at line 75 of file OSGDVRVertex.h. Referenced by DVRVertex(), isBehindPlane(), and osg::DVRClipGeometry::resetLocalData(). |
|
|
Definition at line 81 of file OSGDVRVertex.h. Referenced by calculatePlaneDistance(), calculatePlaneDistanceTransformed(), DVRVertex(), isBehindPlane(), isCloser(), and osg::DVRClipGeometry::isLocalMinimum(). |
|
|
Definition at line 84 of file OSGDVRVertex.h. Referenced by calculatePlaneDistanceTransformed(), dump(), and DVRVertex(). |
1.4.3