VTK 4.1.1 Documentation

Revision:
1.1091
Date:
2001/12/20 03:45:03
Useful links:
  • VTK Home: http://public.kitware.com/VTK
  • VTK Mailing-list: http://public.kitware.com/mailman/listinfo/vtkusers
  • VTK FAQ: http://public.kitware.com/cgi-bin/vtkfaq
  • VTK Search: http://www.kitware.com/search.html
  • VTK Dashboard: http://public.kitware.com/VTK/Testing/Dashboard/MostRecentResults-Nightly/Dashboard.html
  • VTK-Doxygen scripts (Sebastien Barre): http://www.barre.nom.fr/vtk/doc/README
  • Kitware Home: http://www.kitware.com
  • Sebastien's VTK Links: http://www.barre.nom.fr/vtk/links.html
  • Other Links: http://public.kitware.com/VTK/links.php
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


File Index

VTK File List

Here is a list of all files with brief descriptions:
doc_VTK_class2examples.dox
doc_VTK_class2tests.dox
doc_VTK_events.dox
doc_VTK_events2.dox
doc_VTK_index.dox
doc_VTK_version.dox
Common/vtkAbstractMapper.h [code]
Common/vtkAbstractTransform.h [code]
Common/vtkActor2D.h [code]
Common/vtkActor2DCollection.h [code]
Common/vtkAssemblyNode.h [code]
Common/vtkAssemblyPath.h [code]
Common/vtkAssemblyPaths.h [code]
Common/vtkAttributeData.h [code]
Common/vtkBitArray.h [code]
Common/vtkByteSwap.h [code]
Common/vtkCallbackCommand.h [code]
Common/vtkCell.h [code]
Common/vtkCell3D.h [code]
Common/vtkCellArray.h [code]
Common/vtkCellData.h [code]
Common/vtkCellLinks.h [code]
Common/vtkCellType.h [code]
Common/vtkCellTypes.h [code]
Common/vtkCharArray.h [code]
Common/vtkCollection.h [code]
Common/vtkCommand.h [code]
Common/vtkContourValues.h [code]
Common/vtkCoordinate.h [code]
Common/vtkCriticalSection.h [code]
Common/vtkDataArray.h [code]
Common/vtkDataObject.h [code]
Common/vtkDataObjectCollection.h [code]
Common/vtkDataSet.h [code]
Common/vtkDataSetAttributes.h [code]
Common/vtkDataSetCollection.h [code]
Common/vtkDebugLeaks.h [code]
Common/vtkDirectory.h [code]
Common/vtkDoubleArray.h [code]
Common/vtkDynamicLoader.h [code]
Common/vtkEdgeTable.h [code]
Common/vtkEmptyCell.h [code]
Common/vtkExtentTranslator.h [code]
Common/vtkFieldData.h [code]
Common/vtkFileOutputWindow.h [code]
Common/vtkFloatArray.h [code]
Common/vtkFunctionParser.h [code]
Common/vtkFunctionSet.h [code]
Common/vtkGeneralTransform.h [code]
Common/vtkGenericCell.h [code]
Common/vtkHeap.h [code]
Common/vtkHexahedron.h [code]
Common/vtkHomogeneousTransform.h [code]
Common/vtkIdentityTransform.h [code]
Common/vtkIdList.h [code]
Common/vtkIdTypeArray.h [code]
Common/vtkImageData.h [code]
Common/vtkImageIterator.h [code]
Common/vtkImageProgressIterator.h [code]
Common/vtkImplicitFunction.h [code]
Common/vtkImplicitFunctionCollection.h [code]
Common/vtkIndent.h [code]
Common/vtkInitialValueProblemSolver.h [code]
Common/vtkInstantiator.h [code]
Common/vtkIntArray.h [code]
Common/vtkInterpolatedVelocityField.h [code]
Common/vtkJavaAwt.h [code]
Common/vtkJavaUtil.h [code]
Common/vtkLargeInteger.h [code]
Common/vtkLine.h [code]
Common/vtkLinearTransform.h [code]
Common/vtkLocator.h [code]
Common/vtkLogLookupTable.h [code]
Common/vtkLongArray.h [code]
Common/vtkLookupTable.h [code]
Common/vtkMapper2D.h [code]
Common/vtkMarchingCubesCases.h [code]
Common/vtkMarchingSquaresCases.h [code]
Common/vtkMath.h [code]
Common/vtkMatrix4x4.h [code]
Common/vtkMatrixToHomogeneousTransform.h [code]
Common/vtkMatrixToLinearTransform.h [code]
Common/vtkMultiThreader.h [code]
Common/vtkMutexLock.h [code]
Common/vtkNormals.h [code]
Common/vtkObject.h [code]
Common/vtkObjectFactory.h [code]
Common/vtkObjectFactoryCollection.h [code]
Common/vtkOldStyleCallbackCommand.h [code]
Common/vtkOrderedTriangulator.h [code]
Common/vtkOutputWindow.h [code]
Common/vtkOverrideInformation.h [code]
Common/vtkOverrideInformationCollection.h [code]
Common/vtkPerspectiveTransform.h [code]
Common/vtkPixel.h [code]
Common/vtkPlane.h [code]
Common/vtkPlaneCollection.h [code]
Common/vtkPlanes.h [code]
Common/vtkPointData.h [code]
Common/vtkPointLocator.h [code]
Common/vtkPointLocator2D.h [code]
Common/vtkPoints.h [code]
Common/vtkPointSet.h [code]
Common/vtkPolyData.h [code]
Common/vtkPolygon.h [code]
Common/vtkPolyLine.h [code]
Common/vtkPolyVertex.h [code]
Common/vtkPriorityQueue.h [code]
Common/vtkProcessObject.h [code]
Common/vtkProcessStatistics.h [code]
Common/vtkProp.h [code]
Common/vtkPropAssembly.h [code]
Common/vtkPropCollection.h [code]
Common/vtkProperty2D.h [code]
Common/vtkPyramid.h [code]
Common/vtkPythonUtil.h [code]
Common/vtkQuad.h [code]
Common/vtkQuadric.h [code]
Common/vtkRayCastStructures.h [code]
Common/vtkRectilinearGrid.h [code]
Common/vtkReferenceCount.h [code]
Common/vtkRungeKutta2.h [code]
Common/vtkRungeKutta4.h [code]
Common/vtkScalars.h [code]
Common/vtkScalarsToColors.h [code]
Common/vtkSetGet.h [code]
Common/vtkShortArray.h [code]
Common/vtkSource.h [code]
Common/vtkStructuredData.h [code]
Common/vtkStructuredGrid.h [code]
Common/vtkStructuredPoints.h [code]
Common/vtkSystemIncludes.h [code]
Common/vtkTclUtil.h [code]
Common/vtkTCoords.h [code]
Common/vtkTensor.h [code]
Common/vtkTensors.h [code]
Common/vtkTetra.h [code]
Common/vtkTimerLog.h [code]
Common/vtkTimeStamp.h [code]
Common/vtkTransform.h [code]
Common/vtkTransformCollection.h [code]
Common/vtkTriangle.h [code]
Common/vtkTriangleStrip.h [code]
Common/vtkUnsignedCharArray.h [code]
Common/vtkUnsignedIntArray.h [code]
Common/vtkUnsignedLongArray.h [code]
Common/vtkUnsignedShortArray.h [code]
Common/vtkUnstructuredGrid.h [code]
Common/vtkVectors.h [code]
Common/vtkVersion.h [code]
Common/vtkVertex.h [code]
Common/vtkViewport.h [code]
Common/vtkVoidArray.h [code]
Common/vtkVoxel.h [code]
Common/vtkWarpTransform.h [code]
Common/vtkWedge.h [code]
Common/vtkWin32Header.h [code]
Common/vtkWin32OutputWindow.h [code]
Common/vtkWindow.h [code]
Common/vtkWindowLevelLookupTable.h [code]
Common/vtkXMLFileOutputWindow.h [code]
Filtering/vtkCardinalSpline.h [code]
Filtering/vtkCastToConcrete.h [code]
Filtering/vtkCellLocator.h [code]
Filtering/vtkColorTransferFunction.h [code]
Filtering/vtkCone.h [code]
Filtering/vtkCylinder.h [code]
Filtering/vtkDataObjectSource.h [code]
Filtering/vtkDataSetSource.h [code]
Filtering/vtkDataSetToDataSetFilter.h [code]
Filtering/vtkDataSetToPolyDataFilter.h [code]
Filtering/vtkDataSetToStructuredGridFilter.h [code]
Filtering/vtkDataSetToStructuredPointsFilter.h [code]
Filtering/vtkDataSetToUnstructuredGridFilter.h [code]
Filtering/vtkImageInPlaceFilter.h [code]
Filtering/vtkImageMultipleInputFilter.h [code]
Filtering/vtkImageMultipleInputOutputFilter.h [code]
Filtering/vtkImageSource.h [code]
Filtering/vtkImageToImageFilter.h [code]
Filtering/vtkImageToStructuredPoints.h [code]
Filtering/vtkImageTwoInputFilter.h [code]
Filtering/vtkImplicitBoolean.h [code]
Filtering/vtkImplicitDataSet.h [code]
Filtering/vtkImplicitSelectionLoop.h [code]
Filtering/vtkImplicitVolume.h [code]
Filtering/vtkImplicitWindowFunction.h [code]
Filtering/vtkKochanekSpline.h [code]
Filtering/vtkMergePoints.h [code]
Filtering/vtkMergePoints2D.h [code]
Filtering/vtkPiecewiseFunction.h [code]
Filtering/vtkPointSetSource.h [code]
Filtering/vtkPointSetToPointSetFilter.h [code]
Filtering/vtkPolyDataCollection.h [code]
Filtering/vtkPolyDataSource.h [code]
Filtering/vtkPolyDataToPolyDataFilter.h [code]
Filtering/vtkRectilinearGridSource.h [code]
Filtering/vtkRectilinearGridToPolyDataFilter.h [code]
Filtering/vtkScalarTree.h [code]
Filtering/vtkSimpleImageToImageFilter.h [code]
Filtering/vtkSphere.h [code]
Filtering/vtkSpline.h [code]
Filtering/vtkStructuredGridSource.h [code]
Filtering/vtkStructuredGridToPolyDataFilter.h [code]
Filtering/vtkStructuredGridToStructuredGridFilter.h [code]
Filtering/vtkStructuredPointsCollection.h [code]
Filtering/vtkStructuredPointsSource.h [code]
Filtering/vtkStructuredPointsToPolyDataFilter.h [code]
Filtering/vtkStructuredPointsToStructuredPointsFilter.h [code]
Filtering/vtkStructuredPointsToUnstructuredGridFilter.h [code]
Filtering/vtkSuperquadric.h [code]
Filtering/vtkUnstructuredGridSource.h [code]
Filtering/vtkUnstructuredGridToPolyDataFilter.h [code]
Filtering/vtkUnstructuredGridToUnstructuredGridFilter.h [code]
Graphics/vtkAppendFilter.h [code]
Graphics/vtkAppendPolyData.h [code]
Graphics/vtkApproximatingSubdivisionFilter.h [code]
Graphics/vtkArrayCalculator.h [code]
Graphics/vtkArrowSource.h [code]
Graphics/vtkAssignAttribute.h [code]
Graphics/vtkAttributeDataToFieldDataFilter.h [code]
Graphics/vtkAxes.h [code]
Graphics/vtkBlankStructuredGrid.h [code]
Graphics/vtkBlankStructuredGridWithImage.h [code]
Graphics/vtkBrownianPoints.h [code]
Graphics/vtkButterflySubdivisionFilter.h [code]
Graphics/vtkCellCenters.h [code]
Graphics/vtkCellDataToPointData.h [code]
Graphics/vtkCellDerivatives.h [code]
Graphics/vtkCleanPolyData.h [code]
Graphics/vtkClipDataSet.h [code]
Graphics/vtkClipPolyData.h [code]
Graphics/vtkClipVolume.h [code]
Graphics/vtkConeSource.h [code]
Graphics/vtkConnectivityFilter.h [code]
Graphics/vtkContourFilter.h [code]
Graphics/vtkContourGrid.h [code]
Graphics/vtkCubeSource.h [code]
Graphics/vtkCursor3D.h [code]
Graphics/vtkCutter.h [code]
Graphics/vtkCylinderSource.h [code]
Graphics/vtkDashedStreamLine.h [code]
Graphics/vtkDataObjectToDataSetFilter.h [code]
Graphics/vtkDataSetSurfaceFilter.h [code]
Graphics/vtkDataSetToDataObjectFilter.h [code]
Graphics/vtkDataSetTriangleFilter.h [code]
Graphics/vtkDecimatePro.h [code]
Graphics/vtkDelaunay2D.h [code]
Graphics/vtkDelaunay3D.h [code]
Graphics/vtkDicer.h [code]
Graphics/vtkDiskSource.h [code]
Graphics/vtkEdgePoints.h [code]
Graphics/vtkElevationFilter.h [code]
Graphics/vtkExtractEdges.h [code]
Graphics/vtkExtractGeometry.h [code]
Graphics/vtkExtractGrid.h [code]
Graphics/vtkExtractPolyDataGeometry.h [code]
Graphics/vtkExtractTensorComponents.h [code]
Graphics/vtkExtractUnstructuredGrid.h [code]
Graphics/vtkExtractVectorComponents.h [code]
Graphics/vtkFeatureEdges.h [code]
Graphics/vtkFieldDataToAttributeDataFilter.h [code]
Graphics/vtkGeometryFilter.h [code]
Graphics/vtkGlyph2D.h [code]
Graphics/vtkGlyph3D.h [code]
Graphics/vtkGlyphSource2D.h [code]
Graphics/vtkGraphLayoutFilter.h [code]
Graphics/vtkHedgeHog.h [code]
Graphics/vtkHull.h [code]
Graphics/vtkHyperStreamline.h [code]
Graphics/vtkIdFilter.h [code]
Graphics/vtkImageDataGeometryFilter.h [code]
Graphics/vtkImplicitTextureCoords.h [code]
Graphics/vtkInterpolateDataSetAttributes.h [code]
Graphics/vtkInterpolatingSubdivisionFilter.h [code]
Graphics/vtkLinearExtrusionFilter.h [code]
Graphics/vtkLinearSubdivisionFilter.h [code]
Graphics/vtkLineSource.h [code]
Graphics/vtkLinkEdgels.h [code]
Graphics/vtkLoopSubdivisionFilter.h [code]
Graphics/vtkMaskPoints.h [code]
Graphics/vtkMaskPolyData.h [code]
Graphics/vtkMassProperties.h [code]
Graphics/vtkMergeDataObjectFilter.h [code]
Graphics/vtkMergeFields.h [code]
Graphics/vtkMergeFilter.h [code]
Graphics/vtkOBBDicer.h [code]
Graphics/vtkOBBTree.h [code]
Graphics/vtkOutlineCornerFilter.h [code]
Graphics/vtkOutlineCornerSource.h [code]
Graphics/vtkOutlineFilter.h [code]
Graphics/vtkOutlineSource.h [code]
Graphics/vtkPlaneSource.h [code]
Graphics/vtkPointDataToCellData.h [code]
Graphics/vtkPointSource.h [code]
Graphics/vtkPolyDataConnectivityFilter.h [code]
Graphics/vtkPolyDataNormals.h [code]
Graphics/vtkPolyDataStreamer.h [code]
Graphics/vtkProbeFilter.h [code]
Graphics/vtkProgrammableAttributeDataFilter.h [code]
Graphics/vtkProgrammableDataObjectSource.h [code]
Graphics/vtkProgrammableFilter.h [code]
Graphics/vtkProgrammableGlyphFilter.h [code]
Graphics/vtkProgrammableSource.h [code]
Graphics/vtkProjectedTexture.h [code]
Graphics/vtkQuadricClustering.h [code]
Graphics/vtkQuadricDecimation.h [code]
Graphics/vtkQuantizePolyDataPoints.h [code]
Graphics/vtkRearrangeFields.h [code]
Graphics/vtkRectilinearGridGeometryFilter.h [code]
Graphics/vtkRecursiveDividingCubes.h [code]
Graphics/vtkReverseSense.h [code]
Graphics/vtkRibbonFilter.h [code]
Graphics/vtkRotationalExtrusionFilter.h [code]
Graphics/vtkRuledSurfaceFilter.h [code]
Graphics/vtkSelectPolyData.h [code]
Graphics/vtkShrinkFilter.h [code]
Graphics/vtkShrinkPolyData.h [code]
Graphics/vtkSimpleElevationFilter.h [code]
Graphics/vtkSmoothPolyDataFilter.h [code]
Graphics/vtkSpatialRepresentationFilter.h [code]
Graphics/vtkSpherePuzzle.h [code]
Graphics/vtkSpherePuzzleArrows.h [code]
Graphics/vtkSphereSource.h [code]
Graphics/vtkSplitField.h [code]
Graphics/vtkStreamer.h [code]
Graphics/vtkStreamLine.h [code]
Graphics/vtkStreamPoints.h [code]
Graphics/vtkStripper.h [code]
Graphics/vtkStructuredGridGeometryFilter.h [code]
Graphics/vtkStructuredGridOutlineFilter.h [code]
Graphics/vtkStructuredPointsGeometryFilter.h [code]
Graphics/vtkSubdivideTetra.h [code]
Graphics/vtkSubPixelPositionEdgels.h [code]
Graphics/vtkSuperquadricSource.h [code]
Graphics/vtkTensorGlyph.h [code]
Graphics/vtkTextSource.h [code]
Graphics/vtkTexturedSphereSource.h [code]
Graphics/vtkTextureMapToCylinder.h [code]
Graphics/vtkTextureMapToPlane.h [code]
Graphics/vtkTextureMapToSphere.h [code]
Graphics/vtkThreshold.h [code]
Graphics/vtkThresholdPoints.h [code]
Graphics/vtkThresholdTextureCoords.h [code]
Graphics/vtkTransformFilter.h [code]
Graphics/vtkTransformPolyDataFilter.h [code]
Graphics/vtkTransformTextureCoords.h [code]
Graphics/vtkTriangleFilter.h [code]
Graphics/vtkTriangularTCoords.h [code]
Graphics/vtkTubeFilter.h [code]
Graphics/vtkVectorDot.h [code]
Graphics/vtkVectorNorm.h [code]
Graphics/vtkVoxelContoursToSurfaceFilter.h [code]
Graphics/vtkWarpLens.h [code]
Graphics/vtkWarpScalar.h [code]
Graphics/vtkWarpTo.h [code]
Graphics/vtkWarpVector.h [code]
Graphics/vtkWindowedSincPolyDataFilter.h [code]
Hybrid/vtk3DSImporter.h [code]
Hybrid/vtkArcPlotter.h [code]
Hybrid/vtkCaptionActor2D.h [code]
Hybrid/vtkCubeAxesActor2D.h [code]
Hybrid/vtkDepthSortPolyData.h [code]
Hybrid/vtkEarthSource.h [code]
Hybrid/vtkGLUTesselatorTriangleFilter.h [code]
Hybrid/vtkGridTransform.h [code]
Hybrid/vtkImageToPolyDataFilter.h [code]
Hybrid/vtkImplicitModeller.h [code]
Hybrid/vtkIterativeClosestPointTransform.h [code]
Hybrid/vtkLandmarkTransform.h [code]
Hybrid/vtkLegendBoxActor.h [code]
Hybrid/vtkMILVideoSource.h [code]
Hybrid/vtkPolyDataToImageStencil.h [code]
Hybrid/vtkRenderLargeImage.h [code]
Hybrid/vtkRIBExporter.h [code]
Hybrid/vtkRIBLight.h [code]
Hybrid/vtkRIBProperty.h [code]
Hybrid/vtkThinPlateSplineTransform.h [code]
Hybrid/vtkTransformToGrid.h [code]
Hybrid/vtkVectorText.h [code]
Hybrid/vtkVideoSource.h [code]
Hybrid/vtkVRML.h [code]
Hybrid/vtkVRMLImporter.h [code]
Hybrid/vtkWeightedTransformFilter.h [code]
Hybrid/vtkWin32VideoSource.h [code]
Hybrid/vtkXYPlotActor.h [code]
Imaging/vtkBooleanTexture.h [code]
Imaging/vtkExtractVOI.h [code]
Imaging/vtkGaussianSplatter.h [code]
Imaging/vtkImageAccumulate.h [code]
Imaging/vtkImageAnisotropicDiffusion2D.h [code]
Imaging/vtkImageAnisotropicDiffusion3D.h [code]
Imaging/vtkImageAppend.h [code]
Imaging/vtkImageAppendComponents.h [code]
Imaging/vtkImageBlend.h [code]
Imaging/vtkImageButterworthHighPass.h [code]
Imaging/vtkImageButterworthLowPass.h [code]
Imaging/vtkImageCacheFilter.h [code]
Imaging/vtkImageCanvasSource2D.h [code]
Imaging/vtkImageCast.h [code]
Imaging/vtkImageChangeInformation.h [code]
Imaging/vtkImageCheckerboard.h [code]
Imaging/vtkImageCityBlockDistance.h [code]
Imaging/vtkImageClip.h [code]
Imaging/vtkImageConnector.h [code]
Imaging/vtkImageConstantPad.h [code]
Imaging/vtkImageContinuousDilate3D.h [code]
Imaging/vtkImageContinuousErode3D.h [code]
Imaging/vtkImageConvolve.h [code]
Imaging/vtkImageCorrelation.h [code]
Imaging/vtkImageCursor3D.h [code]
Imaging/vtkImageDataStreamer.h [code]
Imaging/vtkImageDecomposeFilter.h [code]
Imaging/vtkImageDifference.h [code]
Imaging/vtkImageDilateErode3D.h [code]
Imaging/vtkImageDivergence.h [code]
Imaging/vtkImageDotProduct.h [code]
Imaging/vtkImageEllipsoidSource.h [code]
Imaging/vtkImageEuclideanDistance.h [code]
Imaging/vtkImageEuclideanToPolar.h [code]
Imaging/vtkImageExport.h [code]
Imaging/vtkImageExtractComponents.h [code]
Imaging/vtkImageFFT.h [code]
Imaging/vtkImageFlip.h [code]
Imaging/vtkImageFourierCenter.h [code]
Imaging/vtkImageFourierFilter.h [code]
Imaging/vtkImageGaussianSmooth.h [code]
Imaging/vtkImageGaussianSource.h [code]
Imaging/vtkImageGradient.h [code]
Imaging/vtkImageGradientMagnitude.h [code]
Imaging/vtkImageGridSource.h [code]
Imaging/vtkImageHSVToRGB.h [code]
Imaging/vtkImageHybridMedian2D.h [code]
Imaging/vtkImageIdealHighPass.h [code]
Imaging/vtkImageIdealLowPass.h [code]
Imaging/vtkImageImport.h [code]
Imaging/vtkImageIslandRemoval2D.h [code]
Imaging/vtkImageIterateFilter.h [code]
Imaging/vtkImageLaplacian.h [code]
Imaging/vtkImageLogarithmicScale.h [code]
Imaging/vtkImageLogic.h [code]
Imaging/vtkImageLuminance.h [code]
Imaging/vtkImageMagnify.h [code]
Imaging/vtkImageMagnitude.h [code]
Imaging/vtkImageMandelbrotSource.h [code]
Imaging/vtkImageMapToColors.h [code]
Imaging/vtkImageMapToRGBA.h [code]
Imaging/vtkImageMapToWindowLevelColors.h [code]
Imaging/vtkImageMask.h [code]
Imaging/vtkImageMaskBits.h [code]
Imaging/vtkImageMathematics.h [code]
Imaging/vtkImageMedian3D.h [code]
Imaging/vtkImageMirrorPad.h [code]
Imaging/vtkImageNoiseSource.h [code]
Imaging/vtkImageNonMaximumSuppression.h [code]
Imaging/vtkImageNormalize.h [code]
Imaging/vtkImageOpenClose3D.h [code]
Imaging/vtkImagePadFilter.h [code]
Imaging/vtkImagePermute.h [code]
Imaging/vtkImageQuantizeRGBToIndex.h [code]
Imaging/vtkImageRange3D.h [code]
Imaging/vtkImageResample.h [code]
Imaging/vtkImageReslice.h [code]
Imaging/vtkImageRFFT.h [code]
Imaging/vtkImageRGBToHSV.h [code]
Imaging/vtkImageSeedConnectivity.h [code]
Imaging/vtkImageSeparableConvolution.h [code]
Imaging/vtkImageShiftScale.h [code]
Imaging/vtkImageShrink3D.h [code]
Imaging/vtkImageSinusoidSource.h [code]
Imaging/vtkImageSkeleton2D.h [code]
Imaging/vtkImageSobel2D.h [code]
Imaging/vtkImageSobel3D.h [code]
Imaging/vtkImageSpatialFilter.h [code]
Imaging/vtkImageStencil.h [code]
Imaging/vtkImageStencilData.h [code]
Imaging/vtkImageStencilSource.h [code]
Imaging/vtkImageThreshold.h [code]
Imaging/vtkImageToImageStencil.h [code]
Imaging/vtkImageTranslateExtent.h [code]
Imaging/vtkImageVariance3D.h [code]
Imaging/vtkImageWrapPad.h [code]
Imaging/vtkImplicitFunctionToImageStencil.h [code]
Imaging/vtkPointLoad.h [code]
Imaging/vtkSampleFunction.h [code]
Imaging/vtkShepardMethod.h [code]
Imaging/vtkSimpleImageFilterExample.h [code]
Imaging/vtkSurfaceReconstructionFilter.h [code]
Imaging/vtkTriangularTexture.h [code]
Imaging/vtkVoxelModeller.h [code]
Imaging/vtkWindowToImageFilter.h [code]
IO/vtk3DS.h [code]
IO/vtkBMPReader.h [code]
IO/vtkBMPWriter.h [code]
IO/vtkBYUReader.h [code]
IO/vtkBYUWriter.h [code]
IO/vtkCGMWriter.h [code]
IO/vtkDataObjectReader.h [code]
IO/vtkDataObjectWriter.h [code]
IO/vtkDataReader.h [code]
IO/vtkDataSetReader.h [code]
IO/vtkDataSetWriter.h [code]
IO/vtkDataWriter.h [code]
IO/vtkDEMReader.h [code]
IO/vtkEnSight6BinaryReader.h [code]
IO/vtkEnSight6Reader.h [code]
IO/vtkEnSightGoldBinaryReader.h [code]
IO/vtkEnSightGoldReader.h [code]
IO/vtkEnSightReader.h [code]
IO/vtkGenericEnSightReader.h [code]
IO/vtkGESignaReader.h [code]
IO/vtkImageReader.h [code]
IO/vtkImageReader2.h [code]
IO/vtkImageWriter.h [code]
IO/vtkIVWriter.h [code]
IO/vtkJPEGReader.h [code]
IO/vtkJPEGWriter.h [code]
IO/vtkMCubesReader.h [code]
IO/vtkMCubesWriter.h [code]
IO/vtkOBJReader.h [code]
IO/vtkParticleReader.h [code]
IO/vtkPLOT3DReader.h [code]
IO/vtkPLY.h [code]
IO/vtkPLYReader.h [code]
IO/vtkPLYWriter.h [code]
IO/vtkPNGReader.h [code]
IO/vtkPNGWriter.h [code]
IO/vtkPNMReader.h [code]
IO/vtkPNMWriter.h [code]
IO/vtkPolyDataReader.h [code]
IO/vtkPolyDataWriter.h [code]
IO/vtkPostScriptWriter.h [code]
IO/vtkRectilinearGridReader.h [code]
IO/vtkRectilinearGridWriter.h [code]
IO/vtkSLCReader.h [code]
IO/vtkSTLReader.h [code]
IO/vtkSTLWriter.h [code]
IO/vtkStructuredGridReader.h [code]
IO/vtkStructuredGridWriter.h [code]
IO/vtkStructuredPointsReader.h [code]
IO/vtkStructuredPointsWriter.h [code]
IO/vtkTIFFReader.h [code]
IO/vtkTIFFWriter.h [code]
IO/vtkUGFacetReader.h [code]
IO/vtkUnstructuredGridReader.h [code]
IO/vtkUnstructuredGridWriter.h [code]
IO/vtkVolume16Reader.h [code]
IO/vtkVolumeReader.h [code]
IO/vtkWriter.h [code]
Parallel/vtkBranchExtentTranslator.h [code]
Parallel/vtkClipPlane.h [code]
Parallel/vtkCommunicator.h [code]
Parallel/vtkCompositeManager.h [code]
Parallel/vtkCutMaterial.h [code]
Parallel/vtkCutPlane.h [code]
Parallel/vtkExtractPolyDataPiece.h [code]
Parallel/vtkExtractUnstructuredGridPiece.h [code]
Parallel/vtkImageBlockReader.h [code]
Parallel/vtkImageBlockWriter.h [code]
Parallel/vtkInputPort.h [code]
Parallel/vtkMemoryLimitImageDataStreamer.h [code]
Parallel/vtkMPICommunicator.h [code]
Parallel/vtkMPIController.h [code]
Parallel/vtkMPIEventLog.h [code]
Parallel/vtkMPIGroup.h [code]
Parallel/vtkMultiProcessController.h [code]
Parallel/vtkMultiProcessLog.h [code]
Parallel/vtkOutputPort.h [code]
Parallel/vtkParallelFactory.h [code]
Parallel/vtkPDataSetReader.h [code]
Parallel/vtkPDataSetWriter.h [code]
Parallel/vtkPieceScalars.h [code]
Parallel/vtkPImageWriter.h [code]
Parallel/vtkPipelineSize.h [code]
Parallel/vtkPLinearExtrusionFilter.h [code]
Parallel/vtkPOPReader.h [code]
Parallel/vtkPPolyDataNormals.h [code]
Parallel/vtkPSphereSource.h [code]
Parallel/vtkPVGeometryFilter.h [code]
Parallel/vtkRTAnalyticSource.h [code]
Parallel/vtkSharedMemoryCommunicator.h [code]
Parallel/vtkSocketCommunicator.h [code]
Parallel/vtkSocketController.h [code]
Parallel/vtkThreadedController.h [code]
Parallel/vtkThreadSafeLog.h [code]
Parallel/vtkTransmitPolyDataPiece.h [code]
Parallel/vtkTransmitUnstructuredGridPiece.h [code]
Parallel/vtkTreeComposite.h [code]
Patented/vtkDecimate.h [code]
Patented/vtkDividingCubes.h [code]
Patented/vtkGridSynchronizedTemplates3D.h [code]
Patented/vtkImageMarchingCubes.h [code]
Patented/vtkKitwareContourFilter.h [code]
Patented/vtkKitwareObjectFactory.h [code]
Patented/vtkMarchingContourFilter.h [code]
Patented/vtkMarchingCubes.h [code]
Patented/vtkMarchingSquares.h [code]
Patented/vtkSliceCubes.h [code]
Patented/vtkSweptSurface.h [code]
Patented/vtkSynchronizedTemplates2D.h [code]
Patented/vtkSynchronizedTemplates3D.h [code]
Rendering/vtkAbstractMapper3D.h [code]
Rendering/vtkAbstractPicker.h [code]
Rendering/vtkAbstractPropPicker.h [code]
Rendering/vtkActor.h [code]
Rendering/vtkActorCollection.h [code]
Rendering/vtkAssembly.h [code]
Rendering/vtkAxisActor2D.h [code]
Rendering/vtkCamera.h [code]
Rendering/vtkCellPicker.h [code]
Rendering/vtkCuller.h [code]
Rendering/vtkCullerCollection.h [code]
Rendering/vtkDataSetMapper.h [code]
Rendering/vtkDirectionEncoder.h [code]
Rendering/vtkEncodedGradientEstimator.h [code]
Rendering/vtkEncodedGradientShader.h [code]
Rendering/vtkExporter.h [code]
Rendering/vtkFiniteDifferenceGradientEstimator.h [code]
Rendering/vtkFollower.h [code]
Rendering/vtkFrustumCoverageCuller.h [code]
Rendering/vtkgluPickMatrix.h [code]
Rendering/vtkGraphicsFactory.h [code]
Rendering/vtkImageActor.h [code]
Rendering/vtkImageMapper.h [code]
Rendering/vtkImager.h [code]
Rendering/vtkImagerCollection.h [code]
Rendering/vtkImageViewer.h [code]
Rendering/vtkImageViewer2.h [code]
Rendering/vtkImageWindow.h [code]
Rendering/vtkImagingFactory.h [code]
Rendering/vtkImporter.h [code]
Rendering/vtkInteractorStyle.h [code]
Rendering/vtkInteractorStyleFlight.h [code]
Rendering/vtkInteractorStyleImage.h [code]
Rendering/vtkInteractorStyleJoystickActor.h [code]
Rendering/vtkInteractorStyleJoystickCamera.h [code]
Rendering/vtkInteractorStyleSwitch.h [code]
Rendering/vtkInteractorStyleTrackball.h [code]
Rendering/vtkInteractorStyleTrackballActor.h [code]
Rendering/vtkInteractorStyleTrackballCamera.h [code]
Rendering/vtkInteractorStyleUnicam.h [code]
Rendering/vtkInteractorStyleUser.h [code]
Rendering/vtkIVExporter.h [code]
Rendering/vtkLabeledDataMapper.h [code]
Rendering/vtkLight.h [code]
Rendering/vtkLightCollection.h [code]
Rendering/vtkLightKit.h [code]
Rendering/vtkLODActor.h [code]
Rendering/vtkLODProp3D.h [code]
Rendering/vtkMapper.h [code]
Rendering/vtkMapperCollection.h [code]
Rendering/vtkMesaActor.h [code]
Rendering/vtkMesaCamera.h [code]
Rendering/vtkMesaImageActor.h [code]
Rendering/vtkMesaImageMapper.h [code]
Rendering/vtkMesaImager.h [code]
Rendering/vtkMesaImageWindow.h [code]
Rendering/vtkMesaLight.h [code]
Rendering/vtkMesaPolyDataMapper.h [code]
Rendering/vtkMesaPolyDataMapper2D.h [code]
Rendering/vtkMesaProperty.h [code]
Rendering/vtkMesaRenderer.h [code]
Rendering/vtkMesaRenderWindow.h [code]
Rendering/vtkMesaTexture.h [code]
Rendering/vtkMesaVolumeRayCastMapper.h [code]
Rendering/vtkMesaVolumeTextureMapper2D.h [code]
Rendering/vtkOBJExporter.h [code]
Rendering/vtkOOGLExporter.h [code]
Rendering/vtkOpenGLActor.h [code]
Rendering/vtkOpenGLCamera.h [code]
Rendering/vtkOpenGLImageActor.h [code]
Rendering/vtkOpenGLImageMapper.h [code]
Rendering/vtkOpenGLImager.h [code]
Rendering/vtkOpenGLImageWindow.h [code]
Rendering/vtkOpenGLLight.h [code]
Rendering/vtkOpenGLPolyDataMapper.h [code]
Rendering/vtkOpenGLPolyDataMapper2D.h [code]
Rendering/vtkOpenGLProperty.h [code]
Rendering/vtkOpenGLRenderer.h [code]
Rendering/vtkOpenGLRenderWindow.h [code]
Rendering/vtkOpenGLStateCache.h [code]
Rendering/vtkOpenGLTexture.h [code]
Rendering/vtkOpenGLVolumeProVG500Mapper.h [code]
Rendering/vtkOpenGLVolumeProVP1000Mapper.h [code]
Rendering/vtkOpenGLVolumeRayCastMapper.h [code]
Rendering/vtkOpenGLVolumeTextureMapper2D.h [code]
Rendering/vtkParallelCoordinatesActor.h [code]
Rendering/vtkPicker.h [code]
Rendering/vtkPointPicker.h [code]
Rendering/vtkPolyDataMapper.h [code]
Rendering/vtkPolyDataMapper2D.h [code]
Rendering/vtkProp3D.h [code]
Rendering/vtkProp3DCollection.h [code]
Rendering/vtkProperty.h [code]
Rendering/vtkPropPicker.h [code]
Rendering/vtkQuartzGLView.h [code]
Rendering/vtkQuartzImageMapper.h [code]
Rendering/vtkQuartzImageWindow.h [code]
Rendering/vtkQuartzRenderWindow.h [code]
Rendering/vtkQuartzRenderWindowInteractor.h [code]
Rendering/vtkQuartzTextMapper.h [code]
Rendering/vtkQuartzWindow.h [code]
Rendering/vtkRayCaster.h [code]
Rendering/vtkRecursiveSphereDirectionEncoder.h [code]
Rendering/vtkRender.h [code]
Rendering/vtkRenderer.h [code]
Rendering/vtkRendererCollection.h [code]
Rendering/vtkRendererSource.h [code]
Rendering/vtkRenderWindow.h [code]
Rendering/vtkRenderWindowCollection.h [code]
Rendering/vtkRenderWindowInteractor.h [code]
Rendering/vtkScalarBarActor.h [code]
Rendering/vtkScaledTextActor.h [code]
Rendering/vtkSelectVisiblePoints.h [code]
Rendering/vtkTextMapper.h [code]
Rendering/vtkTexture.h [code]
Rendering/vtkTkImageViewerWidget.h [code]
Rendering/vtkTkImageWindowWidget.h [code]
Rendering/vtkTkRenderWidget.h [code]
Rendering/vtkVolume.h [code]
Rendering/vtkVolumeCollection.h [code]
Rendering/vtkVolumeMapper.h [code]
Rendering/vtkVolumeProMapper.h [code]
Rendering/vtkVolumeProperty.h [code]
Rendering/vtkVolumeProVG500Mapper.h [code]
Rendering/vtkVolumeProVP1000Mapper.h [code]
Rendering/vtkVolumeRayCastCompositeFunction.h [code]
Rendering/vtkVolumeRayCastFunction.h [code]
Rendering/vtkVolumeRayCastIsosurfaceFunction.h [code]
Rendering/vtkVolumeRayCastMapper.h [code]
Rendering/vtkVolumeRayCastMIPFunction.h [code]
Rendering/vtkVolumeRayCastStructures.h [code]
Rendering/vtkVolumeTextureMapper.h [code]
Rendering/vtkVolumeTextureMapper2D.h [code]
Rendering/vtkVRMLExporter.h [code]
Rendering/vtkWin32ImageMapper.h [code]
Rendering/vtkWin32ImageWindow.h [code]
Rendering/vtkWin32OpenGLImageWindow.h [code]
Rendering/vtkWin32OpenGLRenderWindow.h [code]
Rendering/vtkWin32OpenGLTextMapper.h [code]
Rendering/vtkWin32PolyDataMapper2D.h [code]
Rendering/vtkWin32RenderWindowInteractor.h [code]
Rendering/vtkWin32TextMapper.h [code]
Rendering/vtkWorldPointPicker.h [code]
Rendering/vtkXImageMapper.h [code]
Rendering/vtkXImageWindow.h [code]
Rendering/vtkXMesaRenderWindow.h [code]
Rendering/vtkXMesaTextMapper.h [code]
Rendering/vtkXOpenGLRenderWindow.h [code]
Rendering/vtkXOpenGLTextMapper.h [code]
Rendering/vtkXPolyDataMapper2D.h [code]
Rendering/vtkXRenderWindow.h [code]
Rendering/vtkXRenderWindowInteractor.h [code]
Rendering/vtkXRenderWindowTclInteractor.h [code]
Rendering/vtkXTextMapper.h [code]
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAbstractMapper.h Source File

Common/vtkAbstractMapper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAbstractMapper.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkAbstractMapper_h
00056 #define __vtkAbstractMapper_h
00057
00058 #include "vtkProcessObject.h"
00059 #include "vtkPlaneCollection.h"
00060 #include "vtkPlane.h"
00061 #include "vtkPlanes.h"
00062 #include "vtkTimerLog.h"
00063
00064 #define VTK_SCALAR_MODE_DEFAULT 0
00065 #define VTK_SCALAR_MODE_USE_POINT_DATA 1
00066 #define VTK_SCALAR_MODE_USE_CELL_DATA 2
00067 #define VTK_SCALAR_MODE_USE_POINT_FIELD_DATA 3
00068 #define VTK_SCALAR_MODE_USE_CELL_FIELD_DATA 4
00069
00070 #define VTK_GET_ARRAY_BY_ID 0
00071 #define VTK_GET_ARRAY_BY_NAME 1
00072
00073 class vtkWindow;
00074 class vtkDataSet;
00075
00076 class VTK_COMMON_EXPORT vtkAbstractMapper : public vtkProcessObject
00077 {
00078 public:
00079   vtkTypeMacro(vtkAbstractMapper,vtkProcessObject);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081
00083   virtual unsigned long GetMTime();
00084
00088   virtual void ReleaseGraphicsResources(vtkWindow *) {};
00089
00091
00092   vtkGetMacro( TimeToDraw, float );
00094
00096
00098   void AddClippingPlane(vtkPlane *plane);
00099   void RemoveClippingPlane(vtkPlane *plane);
00100   void RemoveAllClippingPlanes();
00102
00104
00105   vtkSetObjectMacro(ClippingPlanes,vtkPlaneCollection);
00106   vtkGetObjectMacro(ClippingPlanes,vtkPlaneCollection);
00108
00111   void SetClippingPlanes(vtkPlanes *planes);
00112
00114   void ShallowCopy(vtkAbstractMapper *m);
00115
00117
00122   static vtkDataArray *GetScalars(vtkDataSet *input, int scalarMode,
00123                                   int arrayAccessMode, int arrayId,
00124                                   const char *arrayName, int& component);
00126 protected:
00127   vtkAbstractMapper();
00128   ~vtkAbstractMapper();
00129
00130   vtkTimerLog *Timer;
00131   float TimeToDraw;
00132   vtkWindow *LastWindow;   // Window used for the previous render
00133   vtkPlaneCollection *ClippingPlanes;
00134
00135 private:
00136   vtkAbstractMapper(const vtkAbstractMapper&);  // Not implemented.
00137   void operator=(const vtkAbstractMapper&);  // Not implemented.
00138 };
00139
00140 #endif
00141
00142
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAbstractTransform.h Source File

Common/vtkAbstractTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAbstractTransform.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00067 #ifndef __vtkAbstractTransform_h
00068 #define __vtkAbstractTransform_h
00069
00070 #include "vtkObject.h"
00071 #include "vtkMatrix4x4.h"
00072 #include "vtkPoints.h"
00073
00074 class vtkSimpleCriticalSection;
00075
00076
00077 class VTK_COMMON_EXPORT vtkAbstractTransform : public vtkObject
00078 {
00079 public:
00080
00081   vtkTypeMacro(vtkAbstractTransform,vtkObject);
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083
00085
00087   void TransformPoint(const float in[3], float out[3]) {
00088     this->Update(); this->InternalTransformPoint(in,out); };
00090
00092
00094   void TransformPoint(const double in[3], double out[3]) {
00095     this->Update(); this->InternalTransformPoint(in,out); };
00097
00099
00101   double *TransformPoint(double x, double y, double z) {
00102     return this->TransformDoublePoint(x,y,z); }
00103   double *TransformPoint(const double point[3]) {
00104     return this->TransformPoint(point[0],point[1],point[2]); };
00106
00108
00110   float *TransformFloatPoint(float x, float y, float z) {
00111       this->InternalFloatPoint[0] = x;
00112       this->InternalFloatPoint[1] = y;
00113       this->InternalFloatPoint[2] = z;
00114       this->TransformPoint(this->InternalFloatPoint,this->InternalFloatPoint);
00115       return this->InternalFloatPoint; };
00116   float *TransformFloatPoint(const float point[3]) {
00117     return this->TransformFloatPoint(point[0],point[1],point[2]); };
00119
00121
00123   double *TransformDoublePoint(double x, double y, double z) {
00124     this->InternalDoublePoint[0] = x;
00125     this->InternalDoublePoint[1] = y;
00126     this->InternalDoublePoint[2] = z;
00127     this->TransformPoint(this->InternalDoublePoint,this->InternalDoublePoint);
00128     return this->InternalDoublePoint; };
00129   double *TransformDoublePoint(const double point[3]) {
00130     return this->TransformDoublePoint(point[0],point[1],point[2]); };
00132
00134
00137   void TransformNormalAtPoint(const float point[3], const float in[3],
00138                               float out[3]);
00139   void TransformNormalAtPoint(const double point[3], const double in[3],
00140                               double out[3]);
00142
00143   double *TransformNormalAtPoint(const double point[3],
00144                                  const double normal[3]) {
00145     this->TransformNormalAtPoint(point,normal,this->InternalDoublePoint);
00146     return this->InternalDoublePoint; };
00147
00149
00152   double *TransformDoubleNormalAtPoint(const double point[3],
00153                                        const double normal[3]) {
00154     this->TransformNormalAtPoint(point,normal,this->InternalDoublePoint);
00155     return this->InternalDoublePoint; };
00157
00159
00162   float *TransformFloatNormalAtPoint(const float point[3],
00163                                      const float normal[3]) {
00164     this->TransformNormalAtPoint(point,normal,this->InternalFloatPoint);
00165     return this->InternalFloatPoint; };
00167
00169
00172   void TransformVectorAtPoint(const float point[3], const float in[3],
00173                               float out[3]);
00174   void TransformVectorAtPoint(const double point[3], const double in[3],
00175                               double out[3]);
00177
00178   double *TransformVectorAtPoint(const double point[3],
00179                                  const double vector[3]) {
00180     this->TransformVectorAtPoint(point,vector,this->InternalDoublePoint);
00181     return this->InternalDoublePoint; };
00182
00184
00187   double *TransformDoubleVectorAtPoint(const double point[3],
00188                                        const double vector[3]) {
00189     this->TransformVectorAtPoint(point,vector,this->InternalDoublePoint);
00190     return this->InternalDoublePoint; };
00192
00194
00197   float *TransformFloatVectorAtPoint(const float point[3],
00198                                      const float vector[3]) {
00199     this->TransformVectorAtPoint(point,vector,this->InternalFloatPoint);
00200     return this->InternalFloatPoint; };
00202
00205   virtual void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00206
00208
00210   virtual void TransformPointsNormalsVectors(vtkPoints *inPts,
00211                                              vtkPoints *outPts,
00212                                              vtkDataArray *inNms,
00213                                              vtkDataArray *outNms,
00214                                              vtkDataArray *inVrs,
00215                                              vtkDataArray *outVrs);
00217
00223   vtkAbstractTransform *GetInverse();
00224
00228   void SetInverse(vtkAbstractTransform *transform);
00229
00231   virtual void Inverse() = 0;
00232
00234   void DeepCopy(vtkAbstractTransform *);
00235
00239   void Update();
00240
00242
00244   virtual void InternalTransformPoint(const float in[3], float out[3]) = 0;
00245   virtual void InternalTransformPoint(const double in[3], double out[3]) = 0;
00247
00249
00253   virtual void InternalTransformDerivative(const float in[3], float out[3],
00254                                            float derivative[3][3]) = 0;
00255   virtual void InternalTransformDerivative(const double in[3], double out[3],
00256                                            double derivative[3][3]) = 0;
00258
00260   virtual vtkAbstractTransform *MakeTransform() = 0;
00261
00268   virtual int CircuitCheck(vtkAbstractTransform *transform);
00269
00271   unsigned long GetMTime();
00272
00275   void UnRegister(vtkObject *O);
00276
00278
00280   void Identity() {
00281     vtkWarningMacro("vtkAbstractTransform::Identity() is deprecated"); };
00283
00284 protected:
00285   vtkAbstractTransform();
00286   ~vtkAbstractTransform();
00287
00289   virtual void InternalUpdate() {};
00290
00292   virtual void InternalDeepCopy(vtkAbstractTransform *) {};
00293
00294   float InternalFloatPoint[3];
00295   double InternalDoublePoint[3];
00296
00297 private:
00298
00299 //BTX
00300   // We need to record the time of the last update, and we also need
00301   // to do mutex locking so updates don't collide.  These are private
00302   // because Update() is not virtual.
00303   // If DependsOnInverse is set, then this transform object will
00304   // check its inverse on every update, and update itself accordingly
00305   // if necessary.
00306 //ETX
00307   vtkTimeStamp UpdateTime;
00308   vtkSimpleCriticalSection *UpdateMutex;
00309   vtkSimpleCriticalSection *InverseMutex;
00310   int DependsOnInverse;
00311
00312 //BTX
00313   // MyInverse is a transform which is the inverse of this one.
00314 //ETX
00315   vtkAbstractTransform *MyInverse;
00316
00317   int InUnRegister;
00318
00319 private:
00320   vtkAbstractTransform(const vtkAbstractTransform&);  // Not implemented.
00321   void operator=(const vtkAbstractTransform&);  // Not implemented.
00322 };
00323
00324 //BTX
00325 //-------------------------------------------------------------------------
00326 // A simple data structure to hold both a transform and its inverse.
00327 // One of ForwardTransform or InverseTransform might be NULL,
00328 // and must be acquired by calling GetInverse() on the other.
00329 class vtkTransformPair
00330 {
00331 public:
00332   vtkAbstractTransform *ForwardTransform;
00333   vtkAbstractTransform *InverseTransform;
00334
00335   void SwapForwardInverse() {
00336     vtkAbstractTransform *tmp = this->ForwardTransform;
00337     this->ForwardTransform = this->InverseTransform;
00338     this->InverseTransform = tmp; };
00339 };
00340
00341 // A helper class (not derived from vtkObject) to store a series of
00342 // transformations in a pipelined concatenation.
00343 class VTK_COMMON_EXPORT vtkTransformConcatenation
00344 {
00345 public:
00346   static vtkTransformConcatenation *New() {
00347     return new vtkTransformConcatenation(); };
00348   void Delete() { delete this; };
00349
00350   // add a transform to the list according to Pre/PostMultiply semantics
00351   void Concatenate(vtkAbstractTransform *transform);
00352
00353   // concatenate with a matrix according to Pre/PostMultiply semantics
00354   void Concatenate(const double elements[16]);
00355
00356   // set the PreMultiply flag
00357   void SetPreMultiplyFlag(int flag) { this->PreMultiplyFlag = flag; };
00358   int GetPreMultiplyFlag() { return this->PreMultiplyFlag; };
00359
00360   // the three basic linear transformations
00361   void Translate(double x, double y, double z);
00362   void Rotate(double angle, double x, double y, double z);
00363   void Scale(double x, double y, double z);
00364
00365   // invert the concatenation
00366   void Inverse();
00367
00368   // get the inverse flag
00369   int GetInverseFlag() { return this->InverseFlag; };
00370
00371   // identity simply clears the transform list
00372   void Identity();
00373
00374   // copy the list
00375   void DeepCopy(vtkTransformConcatenation *transform);
00376
00377   // the number of stored transforms
00378   int GetNumberOfTransforms() { return this->NumberOfTransforms; };
00379
00380   // the number of transforms that were pre-concatenated (note that
00381   // whenever Iverse() is called, the pre-concatenated and
00382   // post-concatenated transforms are switched)
00383   int GetNumberOfPreTransforms() { return this->NumberOfPreTransforms; };
00384
00385   // the number of transforms that were post-concatenated.
00386   int GetNumberOfPostTransforms() {
00387     return this->NumberOfTransforms-this->NumberOfPreTransforms; };
00388
00389   // get one of the transforms
00390   vtkAbstractTransform *GetTransform(int i);
00391
00392   // get maximum MTime of all transforms
00393   unsigned long GetMaxMTime();
00394
00395   void PrintSelf(ostream& os, vtkIndent indent);
00396
00397 protected:
00398   vtkTransformConcatenation();
00399   ~vtkTransformConcatenation();
00400
00401   int InverseFlag;
00402   int PreMultiplyFlag;
00403
00404   vtkMatrix4x4 *PreMatrix;
00405   vtkMatrix4x4 *PostMatrix;
00406   vtkAbstractTransform *PreMatrixTransform;
00407   vtkAbstractTransform *PostMatrixTransform;
00408
00409   int NumberOfTransforms;
00410   int NumberOfPreTransforms;
00411   int MaxNumberOfTransforms;
00412   vtkTransformPair *TransformList;
00413 };
00414
00415 // A helper class (not derived from vtkObject) to store a stack of
00416 // concatenations.
00417 class VTK_COMMON_EXPORT vtkTransformConcatenationStack
00418 {
00419 public:
00420   static vtkTransformConcatenationStack *New() {
00421     return new vtkTransformConcatenationStack(); };
00422   void Delete() { delete this; };
00423
00424   // pop will pop delete 'concat', then pop the
00425   // top item on the stack onto 'concat'.
00426   void Pop(vtkTransformConcatenation **concat);
00427
00428   // push will move 'concat' onto the stack, and
00429   // make 'concat' a copy of its previous self
00430   void Push(vtkTransformConcatenation **concat);
00431
00432   void DeepCopy(vtkTransformConcatenationStack *stack);
00433
00434 protected:
00435   vtkTransformConcatenationStack();
00436   ~vtkTransformConcatenationStack();
00437
00438   int StackSize;
00439   vtkTransformConcatenation **Stack;
00440   vtkTransformConcatenation **StackBottom;
00441 };
00442
00443 //ETX
00444
00445 #endif
00446
00447
00448
00449
00450
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkActor2D.h Source File

Common/vtkActor2D.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkActor2D.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00063 #ifndef __vtkActor2D_h
00064 #define __vtkActor2D_h
00065
00066 #include "vtkProp.h"
00067 #include "vtkCoordinate.h"
00068 #include "vtkProperty2D.h"
00069 class vtkMapper2D;
00070
00071 class VTK_COMMON_EXPORT vtkActor2D : public vtkProp
00072 {
00073 public:
00074   void PrintSelf(ostream& os, vtkIndent indent);
00075   vtkTypeMacro(vtkActor2D,vtkProp);
00076
00079   static vtkActor2D* New();
00080
00082
00083   int RenderOverlay(vtkViewport *viewport);
00084   int RenderOpaqueGeometry(vtkViewport *viewport);
00085   int RenderTranslucentGeometry(vtkViewport *viewport);
00087
00089
00090   void SetMapper(vtkMapper2D *mapper);
00091   vtkGetObjectMacro(Mapper, vtkMapper2D);
00093
00095
00096   vtkSetMacro(LayerNumber, int);
00097   vtkGetMacro(LayerNumber, int);
00099
00102   vtkProperty2D* GetProperty();
00103
00105
00106   vtkSetObjectMacro(Property, vtkProperty2D);
00108
00110
00113   vtkViewportCoordinateMacro(Position);
00115
00117   void SetDisplayPosition(int,int);
00118
00120
00124   vtkViewportCoordinateMacro(Position2);
00126
00128
00131   void SetWidth(float w);
00132   float GetWidth();
00133   void SetHeight(float h);
00134   float GetHeight();
00136
00138   unsigned long GetMTime();
00139
00143   virtual void GetActors2D(vtkPropCollection *pc);
00144
00147   void ShallowCopy(vtkProp *prop);
00148
00152   virtual void ReleaseGraphicsResources(vtkWindow *);
00153
00154 protected:
00155   vtkActor2D();
00156   ~vtkActor2D();
00157
00158   vtkMapper2D *Mapper;
00159   int LayerNumber;
00160   vtkProperty2D *Property;
00161   vtkCoordinate *PositionCoordinate;
00162   vtkCoordinate *Position2Coordinate;
00163 private:
00164   vtkActor2D(const vtkActor2D&);  // Not implemented.
00165   void operator=(const vtkActor2D&);  // Not implemented.
00166 };
00167
00168 #endif
00169
00170
00171
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkActor2DCollection.h Source File

Common/vtkActor2DCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkActor2DCollection.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00055 #ifndef __vtkActor2DCollection_h
00056 #define __vtkActor2DCollection_h
00057
00058 #include "vtkPropCollection.h"
00059 #include "vtkActor2D.h"
00060 class vtkViewport;
00061
00062 class VTK_COMMON_EXPORT vtkActor2DCollection : public vtkPropCollection
00063 {
00064  public:
00067   static vtkActor2DCollection *New();
00068
00069   vtkTypeMacro(vtkActor2DCollection,vtkPropCollection);
00070
00073   void Sort();
00074
00077   void AddItem(vtkActor2D *a);
00078
00080
00081   int IsItemPresent(vtkActor2D *a);
00082   vtkActor2D *GetNextActor2D();
00083   vtkActor2D *GetLastActor2D();
00085
00087
00090  vtkActor2D *GetNextItem();
00091  vtkActor2D *GetLastItem();
00093
00094
00096   void RenderOverlay(vtkViewport* viewport);
00097
00098
00099 protected:
00100   vtkActor2DCollection() {};
00101   ~vtkActor2DCollection();
00102
00103   virtual void DeleteElement(vtkCollectionElement *);
00104
00105 private:
00106   // hide the standard AddItem from the user and the compiler.
00107   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00108   void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
00109   int IsItemPresent(vtkObject *o) { return this->vtkCollection::IsItemPresent(o); };
00110
00111 private:
00112   vtkActor2DCollection(const vtkActor2DCollection&);  // Not implemented.
00113   void operator=(const vtkActor2DCollection&);  // Not implemented.
00114 };
00115
00116 inline int vtkActor2DCollection::IsItemPresent(vtkActor2D *a)
00117 {
00118   return this->vtkCollection::IsItemPresent((vtkObject *)a);
00119 }
00120
00121 inline vtkActor2D *vtkActor2DCollection::GetNextActor2D()
00122 {
00123   return static_cast<vtkActor2D *>(this->GetNextItemAsObject());
00124 }
00125
00126 inline vtkActor2D *vtkActor2DCollection::GetLastActor2D()
00127 {
00128   if ( this->Bottom == NULL )
00129     {
00130     return NULL;
00131     }
00132   else
00133     {
00134     return static_cast<vtkActor2D *>(this->Bottom->Item);
00135     }
00136 }
00137
00138 inline vtkActor2D *vtkActor2DCollection::GetNextItem()
00139 {
00140   return this->GetNextActor2D();
00141 }
00142
00143 inline vtkActor2D *vtkActor2DCollection::GetLastItem()
00144 {
00145   return this->GetLastActor2D();
00146 }
00147
00148 #endif
00149
00150
00151
00152
00153
Generated on Thu Dec 20 01:04:16 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAssemblyNode.h Source File

Common/vtkAssemblyNode.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAssemblyNode.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00073 #ifndef __vtkAssemblyNode_h
00074 #define __vtkAssemblyNode_h
00075
00076 #include "vtkObject.h"
00077 #include "vtkProp.h"
00078 #include "vtkMatrix4x4.h"
00079
00080 class VTK_COMMON_EXPORT vtkAssemblyNode : public vtkObject
00081 {
00082 public:
00084   static vtkAssemblyNode *New();
00085
00086   vtkTypeMacro(vtkAssemblyNode,vtkObject);
00087   void PrintSelf(ostream& os, vtkIndent indent);
00088
00090
00091   void SetProp(vtkProp *prop);
00092   vtkGetObjectMacro(Prop, vtkProp);
00094
00096
00101   void SetMatrix(vtkMatrix4x4 *matrix);
00102   vtkGetObjectMacro(Matrix, vtkMatrix4x4);
00104
00107   virtual unsigned long GetMTime();
00108
00109 protected:
00110   vtkAssemblyNode();
00111   ~vtkAssemblyNode();
00112   vtkAssemblyNode(const vtkAssemblyNode&);
00113 private:
00114   vtkProp *Prop; //reference to vtkProp
00115   vtkMatrix4x4 *Matrix; //associated matrix
00116
00117 private:
00118   void operator=(const vtkAssemblyNode&);  // Not implemented.
00119   // Not implemented.
00120 };
00121
00122 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAssemblyPath.h Source File

Common/vtkAssemblyPath.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAssemblyPath.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkAssemblyPath_h
00058 #define __vtkAssemblyPath_h
00059
00060 #include "vtkCollection.h"
00061
00062 class vtkAssemblyNode;
00063 class vtkMatrix4x4;
00064 class vtkTransform;
00065 class vtkProp;
00066
00067 class VTK_COMMON_EXPORT vtkAssemblyPath : public vtkCollection
00068 {
00069 public:
00070   vtkTypeMacro(vtkAssemblyPath,vtkCollection);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072
00074   static vtkAssemblyPath *New();
00075
00079   void AddNode(vtkProp *p, vtkMatrix4x4 *m);
00080
00086   vtkAssemblyNode *GetNextNode();
00087
00091   vtkAssemblyNode *GetFirstNode();
00092
00095   vtkAssemblyNode *GetLastNode();
00096
00098   void DeleteLastNode();
00099
00101   void ShallowCopy(vtkAssemblyPath *path);
00102
00105   virtual unsigned long GetMTime();
00106
00107 protected:
00108   vtkAssemblyPath();
00109   ~vtkAssemblyPath();
00110
00111   void AddNode(vtkAssemblyNode *n); //Internal method adds assembly node
00112   vtkTransform *Transform; //Used to perform matrix concatentation
00113   vtkProp *TransformedProp; //A transformed prop used to do the rendering
00114
00115 private:
00116   // hide the standard AddItem from the user and the compiler.
00117   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00118
00119 private:
00120   vtkAssemblyPath(const vtkAssemblyPath&);  // Not implemented.
00121   void operator=(const vtkAssemblyPath&);  // Not implemented.
00122 };
00123
00124 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAssemblyPaths.h Source File

Common/vtkAssemblyPaths.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAssemblyPaths.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkAssemblyPaths_h
00055 #define __vtkAssemblyPaths_h
00056
00057 #include "vtkCollection.h"
00058 #include "vtkAssemblyPath.h"
00059
00060 class vtkProp;
00061
00062 class VTK_COMMON_EXPORT vtkAssemblyPaths : public vtkCollection
00063 {
00064 public:
00065   static vtkAssemblyPaths *New();
00066   vtkTypeMacro(vtkAssemblyPaths,vtkCollection);
00067
00069   void AddItem(vtkAssemblyPath *p);
00070
00072   void RemoveItem(vtkAssemblyPath *p);
00073
00076   int IsItemPresent(vtkAssemblyPath *p);
00077
00079   vtkAssemblyPath *GetNextItem();
00080
00083   virtual unsigned long GetMTime();
00084
00085 protected:
00086   vtkAssemblyPaths() {};
00087   ~vtkAssemblyPaths() {};
00088
00089 private:
00090   // hide the standard AddItem from the user and the compiler.
00091   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00092   void RemoveItem(vtkObject *o) { this->vtkCollection::RemoveItem(o); };
00093   void RemoveItem(int i) { this->vtkCollection::RemoveItem(i); };
00094   int  IsItemPresent(vtkObject *o)
00095     { return this->vtkCollection::IsItemPresent(o);};
00096 private:
00097   vtkAssemblyPaths(const vtkAssemblyPaths&);  // Not implemented.
00098   void operator=(const vtkAssemblyPaths&);  // Not implemented.
00099 };
00100
00101 inline void vtkAssemblyPaths::AddItem(vtkAssemblyPath *p)
00102 {
00103   this->vtkCollection::AddItem((vtkObject *)p);
00104 }
00105
00106 inline void vtkAssemblyPaths::RemoveItem(vtkAssemblyPath *p)
00107 {
00108   this->vtkCollection::RemoveItem((vtkObject *)p);
00109 }
00110
00111 inline int vtkAssemblyPaths::IsItemPresent(vtkAssemblyPath *p)
00112 {
00113   return this->vtkCollection::IsItemPresent((vtkObject *)p);
00114 }
00115
00116 inline vtkAssemblyPath *vtkAssemblyPaths::GetNextItem()
00117 {
00118   return (vtkAssemblyPath *)(this->GetNextItemAsObject());
00119 }
00120
00121 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkAttributeData.h Source File

Common/vtkAttributeData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkAttributeData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkAttributeData_h
00057 #define __vtkAttributeData_h
00058
00059 #include "vtkDataArray.h"
00060
00061 class VTK_COMMON_EXPORT vtkAttributeData : public vtkObject
00062 {
00063 public:
00064   vtkTypeMacro(vtkAttributeData,vtkObject);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00068   virtual int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00069
00071   virtual void Initialize();
00072
00074   virtual vtkAttributeData *MakeObject() = 0;
00075
00077
00083   virtual void SetData(vtkDataArray *);
00084   vtkDataArray *GetData() {return this->Data;};
00086
00089   virtual int GetDataType();
00090
00092
00093   virtual void SetDataType(int dataType);
00094   void SetDataTypeToBit() {this->SetDataType(VTK_BIT);};
00095   void SetDataTypeToChar() {this->SetDataType(VTK_CHAR);};
00096   void SetDataTypeToUnsignedChar() {this->SetDataType(VTK_UNSIGNED_CHAR);};
00097   void SetDataTypeToShort() {this->SetDataType(VTK_SHORT);};
00098   void SetDataTypeToUnsignedShort() {this->SetDataType(VTK_UNSIGNED_SHORT);};
00099   void SetDataTypeToInt() {this->SetDataType(VTK_INT);};
00100   void SetDataTypeToUnsignedInt() {this->SetDataType(VTK_UNSIGNED_INT);};
00101   void SetDataTypeToLong() {this->SetDataType(VTK_LONG);};
00102   void SetDataTypeToUnsignedLong() {this->SetDataType(VTK_UNSIGNED_LONG);};
00103   void SetDataTypeToFloat() {this->SetDataType(VTK_FLOAT);};
00104   void SetDataTypeToDouble() {this->SetDataType(VTK_DOUBLE);};
00106
00109   void *GetVoidPointer(const int id) {return this->Data->GetVoidPointer(id);};
00110
00112   virtual void Squeeze() {this->Data->Squeeze();};
00113
00115   virtual void Reset() {this->Data->Reset();};
00116
00118
00121   virtual void DeepCopy(vtkAttributeData *ad);
00122   virtual void ShallowCopy(vtkAttributeData *ad);
00124
00131   unsigned long GetActualMemorySize();
00132
00133 protected:
00134   // Construct object with an initial data array of type dataType (by default
00135   // dataType is VTK_FLOAT.
00136   vtkAttributeData();
00137   vtkAttributeData(int dataType);
00138   ~vtkAttributeData();
00139
00140   vtkDataArray *Data;  // Array which represents data
00141
00142 private:
00143   vtkAttributeData(const vtkAttributeData&);  // Not implemented.
00144   void operator=(const vtkAttributeData&);  // Not implemented.
00145 };
00146
00147
00148 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkBitArray.h Source File

Common/vtkBitArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBitArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkBitArray_h
00053 #define __vtkBitArray_h
00054
00055 #include "vtkDataArray.h"
00056
00057 class VTK_COMMON_EXPORT vtkBitArray : public vtkDataArray
00058 {
00059 public:
00060   static vtkBitArray *New();
00061   vtkTypeMacro(vtkBitArray,vtkDataArray);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063
00066   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00067
00069   void Initialize();
00070
00071   // satisfy vtkDataArray API
00072   vtkDataArray *MakeObject();
00073   int GetDataType() {return VTK_BIT;};
00074
00076   void SetNumberOfTuples(const vtkIdType number);
00077
00080   float *GetTuple(const vtkIdType i);
00081
00083
00084   void GetTuple(const vtkIdType i, float * tuple);
00085   void GetTuple(const vtkIdType i, double * tuple);
00087
00089
00090   void SetTuple(const vtkIdType i, const float * tuple);
00091   void SetTuple(const vtkIdType i, const double * tuple);
00093
00095
00097   void InsertTuple(const vtkIdType i, const float * tuple);
00098   void InsertTuple(const vtkIdType i, const double * tuple);
00100
00102
00104   vtkIdType InsertNextTuple(const float * tuple);
00105   vtkIdType InsertNextTuple(const double * tuple);
00107
00112   void SetComponent(const vtkIdType i, const int j, const float c);
00113
00115   void Squeeze();
00116
00118   virtual void Resize(vtkIdType numTuples);
00119
00121   int GetValue(const vtkIdType id);
00122
00128   void SetNumberOfValues(const vtkIdType number);
00129
00132   void SetValue(const vtkIdType id, const int value);
00133
00135
00136   void InsertValue(const vtkIdType id, const int i);
00137   vtkIdType InsertNextValue(const int i);
00139
00143   virtual void InsertComponent(const vtkIdType i, const int j, const float c);
00144
00146   unsigned char *GetPointer(const vtkIdType id) {return this->Array + id/8;}
00147
00149
00152   unsigned char *WritePointer(const vtkIdType id, const vtkIdType number);
00153   void *GetVoidPointer(const vtkIdType id)
00154     {return (void *)this->GetPointer(id);};
00156
00158   void DeepCopy(vtkDataArray *da);
00159
00161
00167   void SetArray(unsigned char* array, vtkIdType size, int save);
00168   void SetVoidArray(void *array, vtkIdType size, int save)
00169     {this->SetArray((unsigned char *)array, size, save);};
00171
00172
00173 protected:
00174   vtkBitArray(vtkIdType numComp=1);
00175   ~vtkBitArray();
00176
00177   unsigned char *Array;   // pointer to data
00178   unsigned char *ResizeAndExtend(const vtkIdType sz);
00179     // function to resize data
00180
00181   int TupleSize; //used for data conversion
00182   float *Tuple;
00183
00184   int SaveUserArray;
00185
00186 private:
00187   // hide superclass' DeepCopy() from the user and the compiler
00188   void DeepCopy(vtkDataArray &da) {this->vtkDataArray::DeepCopy(&da);}
00189
00190 private:
00191   vtkBitArray(const vtkBitArray&);  // Not implemented.
00192   void operator=(const vtkBitArray&);  // Not implemented.
00193 };
00194
00195 inline unsigned char *vtkBitArray::WritePointer(const vtkIdType id,
00196                                                 const vtkIdType number)
00197 {
00198   vtkIdType newSize=id+number;
00199   if ( newSize > this->Size )
00200     {
00201     this->ResizeAndExtend(newSize);
00202     }
00203   if ( (--newSize) > this->MaxId )
00204     {
00205     this->MaxId = newSize;
00206     }
00207   return this->Array + id/8;
00208 }
00209
00210 inline void vtkBitArray::SetNumberOfValues(const vtkIdType number)
00211 {
00212   this->Allocate(number);
00213   this->MaxId = number - 1;
00214 }
00215
00216 inline void vtkBitArray::SetValue(const vtkIdType id, const int value)
00217 {
00218   if (value)
00219     {
00220     this->Array[id/8] |= (0x80 >> id%8);
00221     }
00222   else
00223     {
00224     this->Array[id/8] &= (~(0x80 >> id%8));
00225     }
00226 }
00227
00228 inline void vtkBitArray::InsertValue(const vtkIdType id, const int i)
00229 {
00230   if ( id >= this->Size )
00231     {
00232     this->ResizeAndExtend(id+1);
00233     }
00234   if (i)
00235     {
00236     this->Array[id/8] |= (0x80 >> id%8);
00237     }
00238   else
00239     {
00240     this->Array[id/8] &= (~(0x80 >> id%8));
00241     }
00242   if ( id > this->MaxId )
00243     {
00244     this->MaxId = id;
00245     }
00246 }
00247
00248 inline vtkIdType vtkBitArray::InsertNextValue(const int i)
00249 {
00250   this->InsertValue (++this->MaxId,i); return this->MaxId;
00251 }
00252
00253 inline void vtkBitArray::Squeeze() {this->ResizeAndExtend (this->MaxId+1);}
00254
00255 #endif
00256
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkByteSwap.h Source File

Common/vtkByteSwap.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkByteSwap.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009
00010 All rights reserved.
00011
00012 Redistribution and use in source and binary forms, with or without
00013 modification, are permitted provided that the following conditions are met:
00014
00015  * Redistributions of source code must retain the above copyright notice,
00016    this list of conditions and the following disclaimer.
00017
00018  * Redistributions in binary form must reproduce the above copyright notice,
00019    this list of conditions and the following disclaimer in the documentation
00020    and/or other materials provided with the distribution.
00021
00022  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00023    of any contributors may be used to endorse or promote products derived
00024    from this software without specific prior written permission.
00025
00026  * Modified source versions must be plainly marked as such, and must not be
00027    misrepresented as being the original software.
00028
00029 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00030 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00031 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00032 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00033 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00034 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00035 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00036 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00037 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00038 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039
00040 =========================================================================*/
00055 #ifndef __vtkByteSwap_h
00056 #define __vtkByteSwap_h
00057
00058 #include "vtkObject.h"
00059
00060 class VTK_COMMON_EXPORT vtkByteSwap : public vtkObject
00061 {
00062 public:
00063   static vtkByteSwap *New();
00064   vtkTypeMacro(vtkByteSwap,vtkObject);
00065
00067
00068   static void Swap2LE(short *s);
00069   static void Swap2LE(unsigned short *s);
00071
00073
00074   static void Swap4LE(char *c);
00075   static void Swap4LE(float *p) { vtkByteSwap::Swap4LE((char *)p);};
00076   static void Swap4LE(int *i)   { vtkByteSwap::Swap4LE((char *)i);};
00077   static void Swap4LE(unsigned long *i) { vtkByteSwap::Swap4LE((char *)i);};
00078   static void Swap4LE(long *i) { vtkByteSwap::Swap4LE((char *)i);};
00080
00082
00084   static void Swap8LE(char *c);
00085   static void Swap8LE(double *d) { vtkByteSwap::Swap8LE((char *)d);};
00087
00089
00091   static void Swap2LERange(char *c,int num);
00092   static void Swap2LERange(short *i,int num)
00093   { vtkByteSwap::Swap2LERange((char *)i,num);};
00095
00097
00099   static void Swap4LERange(char *c,int num);
00100   static void Swap4LERange(unsigned char *c,int num)
00101   { vtkByteSwap::Swap4LERange((char *)c,num);};
00102   static void Swap4LERange(float *p,int num)
00103   { vtkByteSwap::Swap4LERange((char *)p,num);};
00104   static void Swap4LERange(int *i,int num)
00105   { vtkByteSwap::Swap4LERange((char *)i,num);};
00106   static void Swap4LERange(unsigned long *i,int num)
00107   { vtkByteSwap::Swap4LERange((char *)i,num);};
00109
00111
00113   static void Swap8LERange(char *c, int num);
00114   static void Swap8LERange(double *d, int num)
00115   { vtkByteSwap::Swap8LERange((char *)d, num);};
00117
00119
00120   static void Swap2BE(short *s);
00121   static void Swap2BE(unsigned short *s);
00123
00125
00127   static void Swap4BE(char *c);
00128   static void Swap4BE(float *p) { vtkByteSwap::Swap4BE((char *)p);};
00129   static void Swap4BE(int *i)   { vtkByteSwap::Swap4BE((char *)i);};
00130   static void Swap4BE(unsigned long *i) { vtkByteSwap::Swap4BE((char *)i);};
00132
00134
00136   static void Swap8BE(char *c);
00137   static void Swap8BE(double *d) { vtkByteSwap::Swap8BE((char *)d);};
00139
00141
00143   static void Swap2BERange(char *c,int num);
00144   static void Swap2BERange(short *i,int num)
00145   { vtkByteSwap::Swap2BERange((char *)i,num);};
00147
00149
00151   static void Swap4BERange(char *c,int num);
00152   static void Swap4BERange(float *p,int num)
00153   { vtkByteSwap::Swap4BERange((char *)p,num); };
00154   static void Swap4BERange(int *i,int num)
00155   { vtkByteSwap::Swap4BERange((char *)i,num); };
00156   static void Swap4BERange(unsigned long *i,int num)
00157   { vtkByteSwap::Swap4BERange((char *)i,num); };
00159
00160 #ifdef VTK_USE_64BIT_IDS
00161   static void Swap4BERange(vtkIdType *i,int num)
00162   { vtkByteSwap::Swap4BERange((char *)i,num); };
00163 #endif
00164
00166
00168   static void Swap8BERange(char *c,int num);
00169   static void Swap8BERange(double *d,int num)
00170   { vtkByteSwap::Swap8BERange((char *)d,num); };
00172
00174
00177   static void SwapWrite2BERange(char *c,int num,FILE *fp);
00178   static void SwapWrite2BERange(short *i,int num, FILE *fp)
00179   {vtkByteSwap::SwapWrite2BERange((char *)i,num,fp);};
00181
00183
00186   static void SwapWrite4BERange(char *c,int num,FILE *fp);
00187   static void SwapWrite4BERange(float *p,int num, FILE *fp)
00188   { vtkByteSwap::SwapWrite4BERange((char *)p,num,fp);};
00189   static void SwapWrite4BERange(int *i,int num,FILE *fp)
00190   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00191   static void SwapWrite4BERange(unsigned long *i,int num, FILE *fp)
00192   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00193 #ifdef VTK_USE_64BIT_IDS
00194   static void SwapWrite4BERange(vtkIdType *i,int num, FILE *fp)
00195   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00197 #endif
00198
00199
00202   static void SwapWrite8BERange(char *c,int num,FILE *fp);
00203   static void SwapWrite8BERange(double *d,int num, FILE *fp)
00204   { vtkByteSwap::SwapWrite8BERange((char *)d,num,fp);};
00206
00208
00211   static void SwapWrite2BERange(char *c,int num, ostream *fp);
00212   static void SwapWrite2BERange(short *i,int num, ostream *fp)
00213   {vtkByteSwap::SwapWrite2BERange((char *)i,num,fp);};
00215
00217
00220   static void SwapWrite4BERange(char *c,int num, ostream *fp);
00221   static void SwapWrite4BERange(float *p,int num, ostream *fp)
00222   { vtkByteSwap::SwapWrite4BERange((char *)p,num,fp);};
00223   static void SwapWrite4BERange(int *i,int num, ostream *fp)
00224   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00225   static void SwapWrite4BERange(unsigned long *i,int num, ostream *fp)
00226   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00227 #ifdef VTK_USE_64BIT_IDS
00228   static void SwapWrite4BERange(vtkIdType *i,int num, ostream *fp)
00229   { vtkByteSwap::SwapWrite4BERange((char *)i,num,fp);};
00231 #endif
00232
00233
00236   static void SwapWrite8BERange(char *c,int num, ostream *fp);
00237   static void SwapWrite8BERange(double *d,int num, ostream *fp)
00238   { vtkByteSwap::SwapWrite8BERange((char *)d,num,fp);};
00240
00243   static void SwapVoidRange(void *buffer, int numWords, int wordSize);
00244
00245
00246 protected:
00247   vtkByteSwap() {};
00248   ~vtkByteSwap() {};
00249
00250 private:
00252   static void Swap2Bytes(char* &data);
00253
00254   static void Swap4Bytes(char* &data);
00255
00256   static void Swap8Bytes(char* &data);
00257
00258 private:
00259   vtkByteSwap(const vtkByteSwap&);  // Not implemented.
00260   void operator=(const vtkByteSwap&);  // Not implemented.
00261 };
00262
00263
00264 inline void
00265 vtkByteSwap::Swap2Bytes(char* &data)
00266 {
00267   char one_byte;
00268   one_byte = data[0]; data[0] = data[1]; data[1] = one_byte;
00269 }
00270
00271 inline void
00272 vtkByteSwap::Swap4Bytes(char* &data)
00273 {
00274   char one_byte;
00275   one_byte = data[0]; data[0] = data[3]; data[3] = one_byte;
00276   one_byte = data[1]; data[1] = data[2]; data[2] = one_byte;
00277 }
00278
00279 inline void
00280 vtkByteSwap::Swap8Bytes(char* &data)
00281 {
00282   char one_byte;
00283   one_byte = data[0]; data[0] = data[7]; data[7] = one_byte;
00284   one_byte = data[1]; data[1] = data[6]; data[6] = one_byte;
00285   one_byte = data[2]; data[2] = data[5]; data[5] = one_byte;
00286   one_byte = data[3]; data[3] = data[4]; data[4] = one_byte;
00287 }
00288
00289 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCallbackCommand.h Source File

Common/vtkCallbackCommand.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCallbackCommand.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00046 #ifndef __vtkCallbackCommand_h
00047 #define __vtkCallbackCommand_h
00048
00049 #include "vtkCommand.h"
00050
00051 // a good command to use for generic function callbacks
00052 // the function should have the format
00053 // void func(vtkObject *,void *clientdata, void *calldata)
00054 class VTK_COMMON_EXPORT vtkCallbackCommand : public vtkCommand
00055 {
00056 public:
00057   static vtkCallbackCommand *New()
00058     {return new vtkCallbackCommand;};
00059
00060   void SetClientData(void *cd)
00061     {this->ClientData = cd;};
00062   void SetCallback(void (*f)(vtkObject *, unsigned long, void *, void *))
00063     {this->Callback = f;};
00064   void SetClientDataDeleteCallback(void (*f)(void *))
00065     {this->ClientDataDeleteCallback = f;};
00066
00067   void Execute(vtkObject *caller, unsigned long event, void *callData);
00068
00069   void *ClientData;
00070   void (*Callback)(vtkObject *, unsigned long, void *, void *);
00071   void (*ClientDataDeleteCallback)(void *);
00072 protected:
00073   vtkCallbackCommand();
00074   ~vtkCallbackCommand();
00075 };
00076
00077
00078
00079 #endif /* __vtkCallbackCommand_h */
00080
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCell3D.h Source File

Common/vtkCell3D.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCell3D.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkCell3D_h
00055 #define __vtkCell3D_h
00056
00057 #include "vtkCell.h"
00058
00059 class vtkOrderedTriangulator;
00060
00061 class VTK_COMMON_EXPORT vtkCell3D : public vtkCell
00062 {
00063 public:
00064   vtkTypeMacro(vtkCell3D,vtkCell);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00072   virtual void GetEdgePoints(int edgeId, int* &pts) = 0;
00073
00079   virtual void GetFacePoints(int faceId, int* &pts) = 0;
00080
00082
00093   virtual void Clip(float value, vtkDataArray *cellScalars,
00094                     vtkPointLocator *locator, vtkCellArray *connectivity,
00095                     vtkPointData *inPd, vtkPointData *outPd,
00096                     vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00097                     int insideOut);
00099
00101   virtual int GetCellDimension() {return 3;}
00102
00103 protected:
00104   vtkCell3D():Triangulator(NULL) {}
00105   ~vtkCell3D();
00106
00107   vtkOrderedTriangulator *Triangulator;
00108
00109 private:
00110   vtkCell3D(const vtkCell3D&);  // Not implemented.
00111   void operator=(const vtkCell3D&);  // Not implemented.
00112 };
00113
00114 #endif
00115
00116
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCell.h Source File

Common/vtkCell.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCell.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00067 #ifndef __vtkCell_h
00068 #define __vtkCell_h
00069
00070 #define VTK_CELL_SIZE 512
00071 #define VTK_TOL 1.e-05 // Tolerance for geometric calculation
00072
00073 #include "vtkObject.h"
00074 #include "vtkPoints.h"
00075 #include "vtkIdList.h"
00076
00077 // Include vtkCellType to include the defined cell types
00078 #include "vtkCellType.h"
00079
00080 class vtkCellArray;
00081 class vtkPointLocator;
00082 class vtkPointData;
00083 class vtkCellData;
00084
00085 class VTK_COMMON_EXPORT vtkCell : public vtkObject
00086 {
00087 public:
00088   vtkTypeMacro(vtkCell,vtkObject);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090
00093   void Initialize(int npts, vtkIdType *pts, vtkPoints *p);
00094
00097   virtual vtkCell *MakeObject() = 0;
00098
00102   virtual void ShallowCopy(vtkCell *c);
00103
00106   virtual void DeepCopy(vtkCell *c);
00107
00109   virtual int GetCellType() = 0;
00110
00112   virtual int GetCellDimension() = 0;
00113
00115   virtual int GetInterpolationOrder() {return 1;};
00116
00118   vtkPoints *GetPoints() {return this->Points;};
00119
00121   int GetNumberOfPoints() {return this->PointIds->GetNumberOfIds();};
00122
00124   virtual int GetNumberOfEdges() = 0;
00125
00127   virtual int GetNumberOfFaces() = 0;
00128
00130   vtkIdList *GetPointIds() {return this->PointIds;};
00131
00133   vtkIdType GetPointId(int ptId) {return this->PointIds->GetId(ptId);};
00134
00136   virtual vtkCell *GetEdge(int edgeId) = 0;
00137
00139   virtual vtkCell *GetFace(int faceId) = 0;
00140
00146   virtual int CellBoundary(int subId, float pcoords[3], vtkIdList *pts) = 0;
00147
00149
00163   virtual int EvaluatePosition(float x[3], float* closestPoint,
00164                                int& subId, float pcoords[3],
00165                                float& dist2, float *weights) = 0;
00167
00169
00172   virtual void EvaluateLocation(int& subId, float pcoords[3],
00173                                 float x[3], float *weights) = 0;
00175
00177
00188   virtual void Contour(float value, vtkDataArray *cellScalars,
00189                        vtkPointLocator *locator, vtkCellArray *verts,
00190                        vtkCellArray *lines, vtkCellArray *polys,
00191                        vtkPointData *inPd, vtkPointData *outPd,
00192                        vtkCellData *inCd, vtkIdType cellId,
00193                        vtkCellData *outCd) = 0;
00195
00197
00208   virtual void Clip(float value, vtkDataArray *cellScalars,
00209                     vtkPointLocator *locator, vtkCellArray *connectivity,
00210                     vtkPointData *inPd, vtkPointData *outPd,
00211                     vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00212                     int insideOut) = 0;
00214
00216
00219   virtual int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00220                                 float x[3], float pcoords[3], int& subId) = 0;
00222
00230   virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) = 0;
00231
00233
00245   virtual void Derivatives(int subId, float pcoords[3], float *values,
00246                            int dim, float *derivs) = 0;
00248
00249
00252   void GetBounds(float bounds[6]);
00253
00254
00257   float *GetBounds();
00258
00259
00261   float GetLength2();
00262
00263
00269   virtual int GetParametricCenter(float pcoords[3]);
00270
00271
00273
00280   static char HitBBox(float bounds[6], float origin[3], float dir[3],
00281                       float coord[3], float& t);
00283
00284
00285   // left public for quick computational access
00286   vtkPoints *Points;
00287   vtkIdList *PointIds;
00288
00289 protected:
00290   vtkCell();
00291   ~vtkCell();
00292
00293   float Bounds[6];
00294 private:
00295   vtkCell(const vtkCell&);  // Not implemented.
00296   void operator=(const vtkCell&);  // Not implemented.
00297 };
00298
00299 #endif
00300
00301
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCellArray.h Source File

Common/vtkCellArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00068 #ifndef __vtkCellArray_h
00069 #define __vtkCellArray_h
00070
00071 #include "vtkIdTypeArray.h"
00072 #include "vtkCell.h"
00073
00074 class VTK_COMMON_EXPORT vtkCellArray : public vtkObject
00075 {
00076 public:
00077   vtkTypeMacro(vtkCellArray,vtkObject);
00078
00080   static vtkCellArray *New();
00081
00083
00084   int Allocate(const vtkIdType sz, const int ext=1000)
00085     {return this->Ia->Allocate(sz,ext);}
00087
00089
00090   void Initialize()
00091     {this->Ia->Initialize();}
00093
00095
00096   vtkIdType GetNumberOfCells()
00097     {return this->NumberOfCells;}
00099
00101
00107   vtkIdType EstimateSize(vtkIdType numCells, int maxPtsPerCell)
00108     {return numCells*(1+maxPtsPerCell);}
00110
00114   void InitTraversal() {this->TraversalLocation=0;};
00115
00119   int GetNextCell(vtkIdType& npts, vtkIdType* &pts);
00120
00122
00123   vtkIdType GetSize()
00124     {return this->Ia->GetSize();}
00126
00128
00131   vtkIdType GetNumberOfConnectivityEntries()
00132     {return this->Ia->GetMaxId()+1;}
00134
00137   void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType* &pts);
00138
00140   vtkIdType InsertNextCell(vtkCell *cell);
00141
00144   vtkIdType InsertNextCell(vtkIdType npts, vtkIdType* pts);
00145
00148   vtkIdType InsertNextCell(vtkIdList *pts);
00149
00154   vtkIdType InsertNextCell(int npts);
00155
00158   void InsertCellPoint(vtkIdType id);
00159
00162   void UpdateCellCount(int npts);
00163
00165
00167   vtkIdType GetInsertLocation(int npts)
00168     {return (this->InsertLocation - npts - 1);};
00170
00172
00173   vtkIdType GetTraversalLocation()
00174     {return this->TraversalLocation;}
00175   void SetTraversalLocation(vtkIdType loc)
00176     {this->TraversalLocation = loc;}
00178
00180
00182   vtkIdType GetTraversalLocation(vtkIdType npts)
00183     {return(this->TraversalLocation-npts-1);}
00185
00188   void ReverseCell(vtkIdType loc);
00189
00191   void ReplaceCell(vtkIdType loc, int npts, vtkIdType *pts);
00192
00195   int GetMaxCellSize();
00196
00198
00199   vtkIdType *GetPointer()
00200     {return this->Ia->GetPointer(0);}
00202
00206   vtkIdType *WritePointer(const vtkIdType ncells, const vtkIdType size);
00207
00215   void SetCells(vtkIdType ncells, vtkIdTypeArray *cells);
00216
00218   void DeepCopy(vtkCellArray *ca);
00219
00221
00222   vtkDataArray *GetData()
00223     {return this->Ia;}
00225
00227   void Reset();
00228
00230
00231   void Squeeze()
00232     {this->Ia->Squeeze();}
00234
00241   unsigned long GetActualMemorySize();
00242
00243 protected:
00244   vtkCellArray();
00245   ~vtkCellArray();
00246
00247   vtkIdType NumberOfCells;
00248   vtkIdType InsertLocation;     //keep track of current insertion point
00249   vtkIdType TraversalLocation;   //keep track of traversal position
00250   vtkIdTypeArray *Ia;
00251 private:
00252   vtkCellArray(const vtkCellArray&);  // Not implemented.
00253   void operator=(const vtkCellArray&);  // Not implemented.
00254 };
00255
00256
00257 inline vtkIdType vtkCellArray::InsertNextCell(vtkIdType npts, vtkIdType* pts)
00258 {
00259   vtkIdType i = this->Ia->GetMaxId() + 1;
00260   vtkIdType *ptr = this->Ia->WritePointer(i, npts+1);
00261
00262   for ( *ptr++ = npts, i = 0; i < npts; i++)
00263     {
00264     *ptr++ = *pts++;
00265     }
00266
00267   this->NumberOfCells++;
00268   this->InsertLocation += npts + 1;
00269
00270   return this->NumberOfCells - 1;
00271 }
00272
00273 inline vtkIdType vtkCellArray::InsertNextCell(vtkIdList *pts)
00274 {
00275   vtkIdType npts = pts->GetNumberOfIds();
00276   vtkIdType i = this->Ia->GetMaxId() + 1;
00277   vtkIdType *ptr = this->Ia->WritePointer(i,npts+1);
00278
00279   for ( *ptr++ = npts, i = 0; i < npts; i++)
00280     {
00281     *ptr++ = pts->GetId(i);
00282     }
00283
00284   this->NumberOfCells++;
00285   this->InsertLocation += npts + 1;
00286
00287   return this->NumberOfCells - 1;
00288 }
00289
00290 inline vtkIdType vtkCellArray::InsertNextCell(int npts)
00291 {
00292   this->InsertLocation = this->Ia->InsertNextValue(npts) + 1;
00293   this->NumberOfCells++;
00294
00295   return this->NumberOfCells - 1;
00296 }
00297
00298 inline void vtkCellArray::InsertCellPoint(vtkIdType id)
00299 {
00300   this->Ia->InsertValue(this->InsertLocation++, id);
00301 }
00302
00303 inline void vtkCellArray::UpdateCellCount(int npts)
00304 {
00305   this->Ia->SetValue(this->InsertLocation-npts-1, npts);
00306 }
00307
00308 inline vtkIdType vtkCellArray::InsertNextCell(vtkCell *cell)
00309 {
00310   int npts = cell->GetNumberOfPoints();
00311   vtkIdType i = this->Ia->GetMaxId() + 1;
00312   vtkIdType *ptr = this->Ia->WritePointer(i,npts+1);
00313
00314   for ( *ptr++ = npts, i = 0; i < npts; i++)
00315     {
00316     *ptr++ = cell->PointIds->GetId(i);
00317     }
00318
00319   this->NumberOfCells++;
00320   this->InsertLocation += npts + 1;
00321
00322   return this->NumberOfCells - 1;
00323 }
00324
00325
00326 inline void vtkCellArray::Reset()
00327 {
00328   this->NumberOfCells = 0;
00329   this->InsertLocation = 0;
00330   this->TraversalLocation = 0;
00331   this->Ia->Reset();
00332 }
00333
00334
00335 inline int vtkCellArray::GetNextCell(vtkIdType& npts, vtkIdType* &pts)
00336 {
00337   if ( this->Ia->GetMaxId() >= 0 &&
00338   this->TraversalLocation <= this->Ia->GetMaxId() )
00339     {
00340     npts = this->Ia->GetValue(this->TraversalLocation++);
00341     pts = this->Ia->GetPointer(this->TraversalLocation);
00342     this->TraversalLocation += npts;
00343     return 1;
00344     }
00345   else
00346     {
00347     return 0;
00348     }
00349 }
00350
00351 inline void vtkCellArray::GetCell(vtkIdType loc, vtkIdType &npts,
00352                                   vtkIdType* &pts)
00353 {
00354   npts=this->Ia->GetValue(loc++);
00355   pts=this->Ia->GetPointer(loc);
00356 }
00357
00358
00359 inline void vtkCellArray::ReverseCell(vtkIdType loc)
00360 {
00361   int i;
00362   vtkIdType tmp;
00363   vtkIdType npts=this->Ia->GetValue(loc);
00364   vtkIdType *pts=this->Ia->GetPointer(loc+1);
00365   for (i=0; i < (npts/2); i++)
00366     {
00367     tmp = pts[i];
00368     pts[i] = pts[npts-i-1];
00369     pts[npts-i-1] = tmp;
00370     }
00371 }
00372
00373 inline void vtkCellArray::ReplaceCell(vtkIdType loc, int npts, vtkIdType *pts)
00374 {
00375   vtkIdType *oldPts=this->Ia->GetPointer(loc+1);
00376   for (int i=0; i < npts; i++)
00377     {
00378     oldPts[i] = pts[i];
00379     }
00380 }
00381
00382 inline vtkIdType *vtkCellArray::WritePointer(const vtkIdType ncells,
00383                                              const vtkIdType size)
00384 {
00385   this->NumberOfCells = ncells;
00386   this->InsertLocation = 0;
00387   this->TraversalLocation = 0;
00388   return this->Ia->WritePointer(0,size);
00389 }
00390
00391 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCellData.h Source File

Common/vtkCellData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkCellData_h
00057 #define __vtkCellData_h
00058
00059 #include "vtkDataSetAttributes.h"
00060
00061 class VTK_COMMON_EXPORT vtkCellData : public vtkDataSetAttributes
00062 {
00063 public:
00064   static vtkCellData *New();
00065
00066   vtkTypeMacro(vtkCellData,vtkDataSetAttributes);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00069 protected:
00070   vtkCellData() {}; //make sure constructor and desctructor are protected
00071   ~vtkCellData() {};
00072
00073 private:
00074   vtkCellData(const vtkCellData&);  // Not implemented.
00075   void operator=(const vtkCellData&);  // Not implemented.
00076 };
00077
00078 #endif
00079
00080
00081
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCellLinks.h Source File

Common/vtkCellLinks.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellLinks.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkCellLinks_h
00056 #define __vtkCellLinks_h
00057
00058 #include "vtkObject.h"
00059 class vtkDataSet;
00060 class vtkCellArray;
00061
00062 struct _vtkLink_s {
00063     unsigned short ncells;
00064     vtkIdType *cells;
00065 };
00066
00067 class VTK_COMMON_EXPORT vtkCellLinks : public vtkObject
00068 {
00069 public:
00070   static vtkCellLinks *New();
00071   vtkTypeMacro(vtkCellLinks,vtkObject);
00072
00075   void Allocate(vtkIdType numLinks, vtkIdType ext=1000);
00076
00078   _vtkLink_s &GetLink(vtkIdType ptId) {return this->Array[ptId];};
00079
00081   unsigned short GetNcells(vtkIdType ptId) { return this->Array[ptId].ncells;};
00082
00084   void BuildLinks(vtkDataSet *data);
00085
00087   void BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity);
00088
00090   vtkIdType *GetCells(vtkIdType ptId) {return this->Array[ptId].cells;};
00091
00094   vtkIdType InsertNextPoint(int numLinks);
00095
00099   void InsertNextCellReference(vtkIdType ptId, vtkIdType cellId);
00100
00102   void DeletePoint(vtkIdType ptId);
00103
00107   void RemoveCellReference(vtkIdType cellId, vtkIdType ptId);
00108
00112   void AddCellReference(vtkIdType cellId, vtkIdType ptId);
00113
00116   void ResizeCellList(vtkIdType ptId, int size);
00117
00119   void Squeeze();
00120
00122   void Reset();
00123
00130   unsigned long GetActualMemorySize();
00131
00134   void DeepCopy(vtkCellLinks *src);
00135
00136 protected:
00137   vtkCellLinks():Array(NULL),Size(0),MaxId(-1),Extend(1000) {};
00138   ~vtkCellLinks();
00139
00141   void IncrementLinkCount(vtkIdType ptId) { this->Array[ptId].ncells++;};
00142
00143   void AllocateLinks(vtkIdType n);
00144
00146
00147   void InsertCellReference(vtkIdType ptId, unsigned short pos,
00148                            vtkIdType cellId);
00150
00151   _vtkLink_s *Array;   // pointer to data
00152   vtkIdType Size;       // allocated size of data
00153   vtkIdType MaxId;     // maximum index inserted thus far
00154   vtkIdType Extend;     // grow array by this point
00155   _vtkLink_s *Resize(vtkIdType sz);  // function to resize data
00156 private:
00157   vtkCellLinks(const vtkCellLinks&);  // Not implemented.
00158   void operator=(const vtkCellLinks&);  // Not implemented.
00159 };
00160
00161
00162 inline void vtkCellLinks::InsertCellReference(vtkIdType ptId,
00163                                               unsigned short pos,
00164                                               vtkIdType cellId)
00165 {
00166   this->Array[ptId].cells[pos] = cellId;
00167 }
00168
00169 inline void vtkCellLinks::DeletePoint(vtkIdType ptId)
00170 {
00171   this->Array[ptId].ncells = 0;
00172   delete [] this->Array[ptId].cells;
00173   this->Array[ptId].cells = NULL;
00174 }
00175
00176 inline void vtkCellLinks::InsertNextCellReference(vtkIdType ptId,
00177                                                   vtkIdType cellId)
00178 {
00179   this->Array[ptId].cells[this->Array[ptId].ncells++] = cellId;
00180 }
00181
00182 inline void vtkCellLinks::RemoveCellReference(vtkIdType cellId, vtkIdType ptId)
00183 {
00184   vtkIdType *cells=this->Array[ptId].cells;
00185   int ncells=this->Array[ptId].ncells;
00186
00187   for (int i=0; i < ncells; i++)
00188     {
00189     if (cells[i] == cellId)
00190       {
00191       for (int j=i; j < (ncells-1); j++)
00192         {
00193         cells[j] = cells[j+1];
00194         }
00195       this->Array[ptId].ncells--;
00196       break;
00197       }
00198     }
00199 }
00200
00201 inline void vtkCellLinks::AddCellReference(vtkIdType cellId, vtkIdType ptId)
00202 {
00203   this->Array[ptId].cells[this->Array[ptId].ncells++] = cellId;
00204 }
00205
00206 inline void vtkCellLinks::ResizeCellList(vtkIdType ptId, int size)
00207 {
00208   int newSize;
00209   vtkIdType *cells;
00210
00211   newSize = this->Array[ptId].ncells + size;
00212   cells = new vtkIdType[newSize];
00213   memcpy(cells, this->Array[ptId].cells,
00214          this->Array[ptId].ncells*sizeof(vtkIdType));
00215   delete [] this->Array[ptId].cells;
00216   this->Array[ptId].cells = cells;
00217 }
00218
00219 #endif
00220
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCellType.h Source File

Common/vtkCellType.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCellType.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00053 #ifndef __vtkCellType_h
00054 #define __vtkCellType_h
00055
00056 // To add a new cell type, define a new integer type flag here, then
00057 // create a subclass of vtkCell to implement the proper behavior. You
00058 // may have to modify the following methods: vtkDataSet (and subclasses)
00059 // GetCell() and vtkGenericCell::SetCellType(). Also, to do the job right,
00060 // you'll also have to modify the readers/writers and regression tests
00061 // (example scripts) to reflect the new cell addition.
00062
00063 #define VTK_EMPTY_CELL 0
00064 #define VTK_VERTEX 1
00065 #define VTK_POLY_VERTEX 2
00066 #define VTK_LINE 3
00067 #define VTK_POLY_LINE 4
00068 #define VTK_TRIANGLE 5
00069 #define VTK_TRIANGLE_STRIP 6
00070 #define VTK_POLYGON 7
00071 #define VTK_PIXEL 8
00072 #define VTK_QUAD 9
00073 #define VTK_TETRA 10
00074 #define VTK_VOXEL 11
00075 #define VTK_HEXAHEDRON 12
00076 #define VTK_WEDGE 13
00077 #define VTK_PYRAMID 14
00078
00079 #define VTK_PARAMETRIC_CURVE 51
00080 #define VTK_PARAMETRIC_SURFACE 52
00081
00082 #endif
00083
00084
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCellTypes.h Source File

Common/vtkCellTypes.h

00001 /*=========================================================================
00002   Program:   Visualization Toolkit
00003   Module:    $RCSfile: vtkCellTypes.h,v $
00004   Language:  C++
00005
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00065 #ifndef __vtkCellTypes_h
00066 #define __vtkCellTypes_h
00067
00068 #include "vtkObject.h"
00069 #include "vtkCellType.h"
00070 #include "vtkIntArray.h"
00071 #include "vtkUnsignedCharArray.h"
00072
00073
00074 class VTK_COMMON_EXPORT vtkCellTypes : public vtkObject
00075 {
00076 public:
00077   static vtkCellTypes *New();
00078   vtkTypeMacro(vtkCellTypes,vtkObject);
00079
00081   int Allocate(int sz=512, int ext=1000);
00082
00084   void InsertCell(int id, unsigned char type, int loc);
00085
00087   int InsertNextCell(unsigned char type, int loc);
00088
00090   void SetCellTypes(int ncells, vtkUnsignedCharArray *cellTypes, vtkIntArray *cellLocations);
00091
00093   int GetCellLocation(int cellId) { return this->LocationArray->GetValue(cellId);};
00094
00096   void DeleteCell(int cellId) { this->TypeArray->SetValue(cellId, VTK_EMPTY_CELL);};
00097
00099   int GetNumberOfTypes() { return (this->MaxId + 1);};
00100
00102   int IsType(unsigned char type);
00103
00106   int InsertNextType(unsigned char type){return this->InsertNextCell(type,-1);};
00107
00109   unsigned char GetCellType(int cellId) { return this->TypeArray->GetValue(cellId);};
00110
00112   void Squeeze();
00113
00115   void Reset();
00116
00123   unsigned long GetActualMemorySize();
00124
00127   void DeepCopy(vtkCellTypes *src);
00128
00129 protected:
00130   vtkCellTypes();
00131   ~vtkCellTypes();
00132
00133   vtkUnsignedCharArray *TypeArray; // pointer to types array
00134   vtkIntArray *LocationArray;   // pointer to array of offsets
00135   int Size;            // allocated size of data
00136   int MaxId;           // maximum index inserted thus far
00137   int Extend;          // grow array by this point
00138 private:
00139   vtkCellTypes(const vtkCellTypes&);  // Not implemented.
00140   void operator=(const vtkCellTypes&);    // Not implemented.
00141 };
00142
00143
00144
00145 inline int vtkCellTypes::IsType(unsigned char type)
00146 {
00147   int numTypes=this->GetNumberOfTypes();
00148
00149   for (int i=0; i<numTypes; i++)
00150     {
00151     if ( type == this->GetCellType(i))
00152       {
00153       return 1;
00154       }
00155     }
00156   return 0;
00157 }
00158
00159
00160 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCharArray.h Source File

Common/vtkCharArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCharArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkCharArray_h
00055 #define __vtkCharArray_h
00056
00057 #include "vtkDataArray.h"
00058
00059 class VTK_COMMON_EXPORT vtkCharArray : public vtkDataArray
00060 {
00061 public:
00062   static vtkCharArray *New();
00063
00064   vtkTypeMacro(vtkCharArray,vtkDataArray);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00069   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00070
00072   void Initialize();
00073
00075   vtkDataArray *MakeObject();
00076
00078   int GetDataType() {return VTK_CHAR;};
00079
00082   void SetNumberOfTuples(const vtkIdType number);
00083
00086   float *GetTuple(const vtkIdType i);
00087
00089
00090   void GetTuple(const vtkIdType i, float * tuple);
00091   void GetTuple(const vtkIdType i, double * tuple);
00093
00095
00096   void SetTuple(const vtkIdType i, const float * tuple);
00097   void SetTuple(const vtkIdType i, const double * tuple);
00099
00101
00103   void InsertTuple(const vtkIdType i, const float * tuple);
00104   void InsertTuple(const vtkIdType i, const double * tuple);
00106
00108
00110   vtkIdType InsertNextTuple(const float * tuple);
00111   vtkIdType InsertNextTuple(const double * tuple);
00113
00115   void Squeeze() {this->ResizeAndExtend (this->MaxId+1);}
00116
00118   virtual void Resize(vtkIdType numTuples);
00119
00123   float GetComponent(const vtkIdType i, const int j);
00124
00129   void SetComponent(const vtkIdType i, const int j, const float c);
00130
00134   void InsertComponent(const vtkIdType i, const int j, const float c);
00135
00137   char GetValue(const vtkIdType id) {return this->Array[id];};
00138
00140
00142   void SetValue(const vtkIdType id, const char value)
00143     { this->Array[id] = value;}
00145
00149   void SetNumberOfValues(const vtkIdType number);
00150
00154   char *WritePointer(const vtkIdType id, const vtkIdType number);
00155
00157   void InsertValue(const vtkIdType id, const char c);
00158
00161   vtkIdType InsertNextValue(const char c);
00162
00164
00166   void *GetVoidPointer(const vtkIdType id)
00167     {return (void *)this->GetPointer(id);};
00168   char *GetPointer(const vtkIdType id) {return this->Array + id;}
00170
00172   void DeepCopy(vtkDataArray *ia);
00173
00175
00181   void SetArray(char* array, vtkIdType size, int save);
00182   void SetVoidArray(void *array, vtkIdType size, int save)
00183     {this->SetArray((char*)array, size, save);};
00185
00186 protected:
00187   vtkCharArray(vtkIdType numComp=1);
00188   ~vtkCharArray();
00189
00190   char *Array;    // pointer to data
00191   char *ResizeAndExtend(const vtkIdType sz);  // function to resize data
00192
00193   int TupleSize; //used for data conversion
00194   float *Tuple;
00195
00196   int SaveUserArray;
00197 private:
00198   vtkCharArray(const vtkCharArray&);  // Not implemented.
00199   void operator=(const vtkCharArray&);  // Not implemented.
00200 };
00201
00202
00203 // Specify the number of values for this object to hold. Does an
00204 // allocation as well as setting the MaxId ivar. Used in conjunction with
00205 // SetValue() method for fast insertion.
00206 inline void vtkCharArray::SetNumberOfValues(const vtkIdType number)
00207 {
00208   this->Allocate(number);
00209   this->MaxId = number - 1;
00210 }
00211
00212
00213 // Get the address of a particular data index. Make sure data is allocated
00214 // for the number of items requested. Set MaxId according to the number of
00215 // data values requested.
00216 inline char *vtkCharArray::WritePointer(const vtkIdType id,
00217                                         const vtkIdType number)
00218 {
00219   vtkIdType newSize=id+number;
00220   if ( newSize > this->Size )
00221     {
00222     this->ResizeAndExtend(newSize);
00223     }
00224   if ( (--newSize) > this->MaxId )
00225     {
00226     this->MaxId = newSize;
00227     }
00228   return this->Array + id;
00229 }
00230
00231 inline void vtkCharArray::InsertValue(const vtkIdType id, const char c)
00232 {
00233   if ( id >= this->Size )
00234     {
00235     this->ResizeAndExtend(id+1);
00236     }
00237   this->Array[id] = c;
00238   if ( id > this->MaxId )
00239     {
00240     this->MaxId = id;
00241     }
00242 }
00243
00244 inline vtkIdType vtkCharArray::InsertNextValue(const char c)
00245 {
00246   this->InsertValue (++this->MaxId,c);
00247   return this->MaxId;
00248 }
00249
00250
00251 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCollection.h Source File

Common/vtkCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00058 #ifndef __vtkCollection_h
00059 #define __vtkCollection_h
00060
00061 #include "vtkObject.h"
00062
00063 //BTX - begin tcl exclude
00064 class vtkCollectionElement //;prevents pick-up by man page generator
00065 {
00066  public:
00067   vtkCollectionElement():Item(NULL),Next(NULL) {};
00068   vtkObject *Item;
00069   vtkCollectionElement *Next;
00070 };
00071 //ETX end tcl exclude
00072
00073 class VTK_COMMON_EXPORT vtkCollection : public vtkObject
00074 {
00075 public:
00076   vtkTypeMacro(vtkCollection,vtkObject);
00077   void PrintSelf(ostream& os, vtkIndent indent);
00078
00080   static vtkCollection *New();
00081
00083   void AddItem(vtkObject *);
00084
00086   void ReplaceItem(int i, vtkObject *);
00087
00093   void RemoveItem(int i);
00094
00098   void RemoveItem(vtkObject *);
00099
00101   void RemoveAllItems();
00102
00105   int  IsItemPresent(vtkObject *);
00106
00108   int  GetNumberOfItems();
00109
00112   void InitTraversal() { this->Current = this->Top;};
00113
00116   vtkObject *GetNextItemAsObject();
00117
00120   vtkObject *GetItemAsObject(int i);
00121
00122 protected:
00123   vtkCollection();
00124   ~vtkCollection();
00125
00126   virtual void DeleteElement(vtkCollectionElement *);
00127   int NumberOfItems;
00128   vtkCollectionElement *Top;
00129   vtkCollectionElement *Bottom;
00130   vtkCollectionElement *Current;
00131
00132 private:
00133   vtkCollection(const vtkCollection&);
00134   void operator=(const vtkCollection&);
00135 };
00136
00137
00138 inline vtkObject *vtkCollection::GetNextItemAsObject()
00139 {
00140   vtkCollectionElement *elem=this->Current;
00141
00142   if ( elem != NULL )
00143     {
00144     this->Current = elem->Next;
00145     return elem->Item;
00146     }
00147   else
00148     {
00149     return NULL;
00150     }
00151 }
00152
00153 #endif
00154
00155
00156
00157
00158
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCommand.h Source File

Common/vtkCommand.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCommand.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00051 #ifndef __vtkCommand_h
00052 #define __vtkCommand_h
00053
00054 #include "vtkWin32Header.h"
00055
00056 class vtkObject;
00057
00058 // The superclass that all commands should be subclasses of
00059 class VTK_COMMON_EXPORT vtkCommand
00060 {
00061 public:
00062   void Delete() {
00063     this->UnRegister(); }
00064
00066
00067   void Register();
00068   void Register(vtkObject *) {
00069     this->Register(); }
00071
00073
00076   void UnRegister();
00077   void UnRegister(vtkObject *) {
00078     this->UnRegister(); }
00080
00081   virtual void Execute(vtkObject *caller, unsigned long, void *callData) = 0;
00082   static const char *GetStringFromEventId(unsigned long event);
00083   static unsigned long GetEventIdFromString(const char *event);
00084
00085 //BTX
00086   // all the currently defined events
00087   // developers can use -- vtkCommand::UserEvent + int to
00088   // specify their own events.
00089   // if this list is adjusted, be sure to adjust vtkCommandEventStrings
00090   // in vtkCommand.cxx to match.
00091   enum EventIds {
00092     NoEvent = 0,
00093     AnyEvent,
00094     DeleteEvent,
00095     StartEvent,
00096     EndEvent,
00097     ProgressEvent,
00098     PickEvent,
00099     StartPickEvent,
00100     EndPickEvent,
00101     AbortCheckEvent,
00102     ExitEvent,
00103     LeftButtonPressEvent,
00104     LeftButtonReleaseEvent,
00105     MiddleButtonPressEvent,
00106     MiddleButtonReleaseEvent,
00107     RightButtonPressEvent,
00108     RightButtonReleaseEvent,
00109     EnterEvent,
00110     LeaveEvent,
00111     KeyPressEvent,
00112     KeyReleaseEvent,
00113     CharEvent,
00114     ConfigureEvent,
00115     TimerEvent,
00116     MouseMoveEvent,
00117     ResetCameraEvent,
00118     ResetCameraClippingRangeEvent,
00119     ModifiedEvent,
00120     WindowLevelEvent,
00121     NextDataEvent,
00122     PushDataStartEvent,
00123     EndOfDataEvent,
00124     UserEvent = 1000
00125   };
00126 //ETX
00127 protected:
00128   int ReferenceCount;      // Number of uses of this object by other objects
00129   vtkCommand() { this->ReferenceCount = 1;};
00130   virtual ~vtkCommand() {};
00131 };
00132
00133 #endif /* __vtkCommand_h */
00134
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkContourValues.h Source File

Common/vtkContourValues.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkContourValues.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkContourValues_h
00055 #define __vtkContourValues_h
00056
00057 #include "vtkObject.h"
00058 #include "vtkIntArray.h"
00059
00060 class vtkFloatArray;
00061
00062 class VTK_COMMON_EXPORT vtkContourValues : public vtkObject
00063 {
00064 public:
00066   static vtkContourValues *New();
00067
00068   vtkTypeMacro(vtkContourValues,vtkObject);
00069   void PrintSelf(ostream& os, vtkIndent indent);
00070
00072   void SetValue(int i, float value);
00073
00076   float GetValue(int i);
00077
00080   float *GetValues();
00081
00084   void GetValues(float *contourValues);
00085
00089   void SetNumberOfContours(const int number);
00090
00092   int GetNumberOfContours();
00093
00096   void GenerateValues(int numContours, float range[2]);
00097
00100   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00101
00102
00103 protected:
00104   vtkContourValues();
00105   ~vtkContourValues();
00106
00107   vtkFloatArray *Contours;
00108
00109 private:
00110   vtkContourValues(const vtkContourValues&);  // Not implemented.
00111   void operator=(const vtkContourValues&);  // Not implemented.
00112 };
00113
00114 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCoordinate.h Source File

Common/vtkCoordinate.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCoordinate.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00083 #ifndef __vtkCoordinate_h
00084 #define __vtkCoordinate_h
00085
00086 #include "vtkObject.h"
00087 class vtkViewport;
00088
00089 #define VTK_DISPLAY             0
00090 #define VTK_NORMALIZED_DISPLAY  1
00091 #define VTK_VIEWPORT            2
00092 #define VTK_NORMALIZED_VIEWPORT 3
00093 #define VTK_VIEW                4
00094 #define VTK_WORLD               5
00095 #define VTK_USERDEFINED         6
00096
00097 class VTK_COMMON_EXPORT vtkCoordinate : public vtkObject
00098 {
00099 public:
00100   vtkTypeMacro(vtkCoordinate,vtkObject);
00101   void PrintSelf(ostream& os, vtkIndent indent);
00102
00105   static vtkCoordinate* New();
00106
00108
00111   vtkSetMacro(CoordinateSystem, int);
00112   vtkGetMacro(CoordinateSystem, int);
00113   void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00114   void SetCoordinateSystemToNormalizedDisplay()
00115         {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00116   void SetCoordinateSystemToViewport()
00117         {this->SetCoordinateSystem(VTK_VIEWPORT);}
00118   void SetCoordinateSystemToNormalizedViewport()
00119         {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00120   void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00121   void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00123
00124   const char *GetCoordinateSystemAsString ();
00125
00127
00129   vtkSetVector3Macro(Value,float);
00130   vtkGetVector3Macro(Value,float);
00131   void SetValue(float a, float b) { this->SetValue(a,b,0.0);}
00133
00135
00138   vtkSetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00139   vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00141
00143
00145   void SetViewport(vtkViewport *viewport);
00146   vtkGetObjectMacro(Viewport,vtkViewport);
00148
00150
00151   float *GetComputedWorldValue(vtkViewport *);
00152   int *GetComputedViewportValue(vtkViewport *);
00153   int *GetComputedDisplayValue(vtkViewport *);
00154   int *GetComputedLocalDisplayValue(vtkViewport *);
00156
00157   float *GetComputedFloatViewportValue(vtkViewport *);
00158   float *GetComputedFloatDisplayValue(vtkViewport *);
00159
00164   float *GetComputedValue(vtkViewport *);
00165
00167
00171   virtual float *GetComputedUserDefinedValue(vtkViewport *)
00172     { return this->Value; }
00174
00175 protected:
00176   vtkCoordinate();
00177   ~vtkCoordinate();
00178
00179   float Value[3];
00180   int   CoordinateSystem;
00181   vtkCoordinate *ReferenceCoordinate;
00182   vtkViewport *Viewport;
00183   float ComputedWorldValue[3];
00184   int   ComputedDisplayValue[2];
00185   int   ComputedViewportValue[2];
00186   int   Computing;
00187
00188   float ComputedFloatDisplayValue[2];
00189   float ComputedFloatViewportValue[2];
00190   float ComputedUserDefinedValue[3];
00191
00192 private:
00193   vtkCoordinate(const vtkCoordinate&);  // Not implemented.
00194   void operator=(const vtkCoordinate&);  // Not implemented.
00195 };
00196
00197 #endif
00198
00199
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkCriticalSection.h Source File

Common/vtkCriticalSection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCriticalSection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00063 #ifndef __vtkCriticalSection_h
00064 #define __vtkCriticalSection_h
00065
00066 #include "vtkObject.h"
00067
00068 //BTX
00069
00070 #ifdef VTK_USE_SPROC
00071 #include <abi_mutex.h>
00072 typedef abilock_t vtkCritSecType;
00073 #endif
00074
00075 #ifdef VTK_USE_PTHREADS
00076 #include <pthread.h>
00077 typedef pthread_mutex_t vtkCritSecType;
00078 #endif
00079
00080 #ifdef VTK_USE_WIN32_THREADS
00081 #include <winbase.h>
00082 typedef CRITICAL_SECTION vtkCritSecType;
00083 #endif
00084
00085 #ifndef VTK_USE_SPROC
00086 #ifndef VTK_USE_PTHREADS
00087 #ifndef VTK_USE_WIN32_THREADS
00088 typedef int vtkCritSecType;
00089 #endif
00090 #endif
00091 #endif
00092
00093 // Critical Section object that is not a vtkObject.
00094 class VTK_COMMON_EXPORT vtkSimpleCriticalSection
00095 {
00096 public:
00097   vtkSimpleCriticalSection()
00098     {
00099       this->Init();
00100     }
00101
00102   vtkSimpleCriticalSection(int isLocked)
00103     {
00104       this->Init();
00105       if(isLocked)
00106         {
00107         this->Lock();
00108         }
00109     }
00110
00111   void Init();
00112
00113   virtual ~vtkSimpleCriticalSection();
00114
00115   static vtkSimpleCriticalSection *New();
00116
00117   // What's the point of these (here and in MutexLock)? This class
00118   // is not part of the hierarchy!! -CRV
00119   virtual const char *GetClassName() {return "vtkSimpleCriticalSection";};
00120   virtual int IsA(const char *name);
00121   static vtkSimpleCriticalSection *SafeDownCast(vtkSimpleCriticalSection *o);
00122
00123   void Delete() {delete this;}
00124
00126   void Lock( void );
00127
00129   void Unlock( void );
00130
00131 protected:
00132   vtkCritSecType   CritSec;
00133 };
00134
00135 //ETX
00136
00137 class VTK_COMMON_EXPORT vtkCriticalSection : public vtkObject
00138 {
00139 public:
00140   static vtkCriticalSection *New();
00141
00142   vtkTypeMacro(vtkCriticalSection,vtkObject);
00143   void PrintSelf(ostream& os, vtkIndent indent);
00144
00146   void Lock( void );
00147
00149   void Unlock( void );
00150
00151 protected:
00152   vtkSimpleCriticalSection   SimpleCriticalSection;
00153   vtkCriticalSection() {};
00154 private:
00155   vtkCriticalSection(const vtkCriticalSection&);  // Not implemented.
00156   void operator=(const vtkCriticalSection&);  // Not implemented.
00157 };
00158
00159
00160 inline void vtkCriticalSection::Lock( void )
00161 {
00162   this->SimpleCriticalSection.Lock();
00163 }
00164
00165 inline void vtkCriticalSection::Unlock( void )
00166 {
00167   this->SimpleCriticalSection.Unlock();
00168 }
00169
00170 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataArray.h Source File

Common/vtkDataArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00075 #ifndef __vtkDataArray_h
00076 #define __vtkDataArray_h
00077
00078 #include "vtkObject.h"
00079 #include "vtkLargeInteger.h"
00080
00081 class vtkFloatArray;
00082 class vtkLookupTable;
00083 class vtkIdList;
00084
00085 class VTK_COMMON_EXPORT vtkDataArray : public vtkObject
00086 {
00087 public:
00088   vtkTypeMacro(vtkDataArray,vtkObject);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090
00092
00094   virtual int Allocate(const vtkIdType sz, const vtkIdType ext=1000) = 0;
00095   virtual void Initialize() = 0;
00097
00101   virtual vtkDataArray *MakeObject() = 0;
00102
00105   virtual int GetDataType() = 0;
00106
00108
00110   vtkSetClampMacro(NumberOfComponents,int,1,VTK_LARGE_INTEGER);
00111   int GetNumberOfComponents() {return this->NumberOfComponents;};
00113
00116   virtual void SetNumberOfTuples(const vtkIdType number) = 0;
00117
00119
00120   vtkIdType GetNumberOfTuples()
00121     {return (this->MaxId + 1)/this->NumberOfComponents;}
00123
00128   virtual float *GetTuple(const vtkIdType i) = 0;
00129
00131
00134   virtual void GetTuple(const vtkIdType i, float * tuple) = 0;
00135   virtual void GetTuple(const vtkIdType i, double * tuple);
00137
00139
00142   float GetTuple1(const vtkIdType i);
00143   float* GetTuple2(const vtkIdType i);
00144   float* GetTuple3(const vtkIdType i);
00145   float* GetTuple4(const vtkIdType i);
00146   float* GetTuple9(const vtkIdType i);
00148
00152   void GetTuples(vtkIdList *ptIds, vtkDataArray *output);
00153
00157   void GetTuples(vtkIdType p1, vtkIdType p2, vtkDataArray *output);
00158
00160
00163   virtual void SetTuple(const vtkIdType i, const float * tuple) = 0;
00164   virtual void SetTuple(const vtkIdType i, const double * tuple);
00166
00168
00171   void SetTuple1(const vtkIdType i, float value);
00172   void SetTuple2(const vtkIdType i, float val0, float val1);
00173   void SetTuple3(const vtkIdType i, float val0, float val1, float val2);
00174   void SetTuple4(const vtkIdType i, float val0, float val1, float val2,
00175                  float val3);
00176   void SetTuple9(const vtkIdType i, float val0, float val1, float val2,
00177                  float val3, float val4, float val5, float val6,
00178                  float val7, float val8);
00180
00182
00184   virtual void InsertTuple(const vtkIdType i, const float * tuple) = 0;
00185   virtual void InsertTuple(const vtkIdType i, const double * tuple);
00187
00189
00192   void InsertTuple1(const vtkIdType i, float value);
00193   void InsertTuple2(const vtkIdType i, float val0, float val1);
00194   void InsertTuple3(const vtkIdType i, float val0, float val1, float val2);
00195   void InsertTuple4(const vtkIdType i, float val0, float val1, float val2,
00196                     float val3);
00197   void InsertTuple9(const vtkIdType i, float val0, float val1, float val2,
00198                     float val3, float val4, float val5, float val6,
00199                     float val7, float val8);
00201
00203
00206   virtual vtkIdType InsertNextTuple(const float * tuple) = 0;
00207   virtual vtkIdType InsertNextTuple(const double * tuple);
00209
00211
00214   void InsertNextTuple1(float value);
00215   void InsertNextTuple2(float val0, float val1);
00216   void InsertNextTuple3(float val0, float val1, float val2);
00217   void InsertNextTuple4(float val0, float val1, float val2,
00218                         float val3);
00219   void InsertNextTuple9(float val0, float val1, float val2,
00220                         float val3, float val4, float val5, float val6,
00221                         float val7, float val8);
00223
00227   virtual float GetComponent(const vtkIdType i, const int j);
00228
00233   virtual void SetComponent(const vtkIdType i, const int j, const float c);
00234
00238   virtual void InsertComponent(const vtkIdType i, const int j, const float c);
00239
00241
00247   virtual void GetData(vtkIdType tupleMin, vtkIdType tupleMax, int compMin,
00248                        int compMax, vtkFloatArray* data);
00250
00253   virtual void DeepCopy(vtkDataArray *da);
00254
00259   virtual void FillComponent(const int j, const float c);
00260
00262
00268   virtual void CopyComponent(const int j, vtkDataArray *from,
00269                              const int fromComponent);
00271
00274   virtual void *GetVoidPointer(const vtkIdType id) = 0;
00275
00277   virtual void Squeeze() = 0;
00278
00280   virtual void Resize(vtkIdType numTuples) = 0;
00281
00283
00284   void Reset()
00285     {this->MaxId = -1;}
00287
00289
00290   vtkIdType GetSize()
00291     {return this->Size;}
00293
00295
00296   vtkIdType GetMaxId()
00297     {return this->MaxId;}
00299
00301
00307   virtual void SetVoidArray(void *vtkNotUsed(array),
00308                             vtkIdType vtkNotUsed(size),
00309                             int vtkNotUsed(save)) {};
00311
00318   unsigned long GetActualMemorySize();
00319
00322   void CreateDefaultLookupTable();
00323
00325
00326   void SetLookupTable(vtkLookupTable *lut);
00327   vtkGetObjectMacro(LookupTable,vtkLookupTable);
00329
00331
00332   void SetName(const char* name);
00333   const char* GetName();
00335
00337
00339   void GetRange(float range[2], int comp)
00340     {
00341       this->ComputeRange(comp);
00342       memcpy(range, this->Range, 2*sizeof(float));
00343     }
00344   float* GetRange(int comp)
00345     {
00346       this->ComputeRange(comp);
00347       return this->Range;
00348     }
00350
00351   virtual void ComputeRange(int comp);
00353
00355   float* GetRange()
00356     {
00357       this->ComputeRange(0);
00358       return this->Range;
00359     }
00360   void GetRange(float range[2])
00361     {
00362       this->GetRange(range,0);
00363     }
00365
00367
00370   void GetDataTypeRange(double range[2]);
00371   double GetDataTypeMin();
00372   double GetDataTypeMax();
00374
00377   virtual float GetMaxNorm();
00378
00384   static vtkDataArray* CreateDataArray(int dataType);
00385
00386 protected:
00387   // Construct object with default tuple dimension (number of components) of 1.
00388   vtkDataArray(vtkIdType numComp=1);
00389   ~vtkDataArray();
00390
00391   vtkLookupTable *LookupTable;
00392
00393   vtkIdType Size;      // allocated size of data
00394   vtkIdType MaxId;     // maximum index inserted thus far
00395   int NumberOfComponents; // the number of components per tuple
00396
00397   char* Name;
00398
00399 private:
00400   float Range[2];
00401   int ComponentForLastRange;
00402   vtkTimeStamp ComputeTimeForLastRange;
00403
00404   float* GetTupleN(const vtkIdType i, int n);
00405
00406 private:
00407   vtkDataArray(const vtkDataArray&);  // Not implemented.
00408   void operator=(const vtkDataArray&);  // Not implemented.
00409 };
00410
00411 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataObject.h Source File

Common/vtkDataObject.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataObject.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00062 #ifndef __vtkDataObject_h
00063 #define __vtkDataObject_h
00064
00065 #include "vtkObject.h"
00066 #include "vtkFieldData.h"
00067
00068 class vtkProcessObject;
00069 class vtkSource;
00070 class vtkExtentTranslator;
00071
00072 #define VTK_PIECES_EXTENT   0
00073 #define VTK_3D_EXTENT       1
00074
00075 class VTK_COMMON_EXPORT vtkDataObject : public vtkObject
00076 {
00077 public:
00078   static vtkDataObject *New();
00079
00080   vtkTypeMacro(vtkDataObject,vtkObject);
00081   void PrintSelf(ostream& os, vtkIndent indent);
00082
00084   virtual vtkDataObject *MakeObject() {return vtkDataObject::New();}
00085
00087
00088   vtkGetObjectMacro(Source,vtkSource);
00089   void SetSource(vtkSource *s);
00091
00094   unsigned long int GetMTime();
00095
00096   // Rescription:
00097   // Restore data object to initial state,
00098   virtual void Initialize();
00099
00104   void ReleaseData();
00105
00108   int ShouldIReleaseData();
00109
00111
00112   vtkGetMacro(DataReleased,int);
00114
00116
00118   vtkSetMacro(ReleaseDataFlag,int);
00119   vtkGetMacro(ReleaseDataFlag,int);
00120   vtkBooleanMacro(ReleaseDataFlag,int);
00122
00124
00126   static void SetGlobalReleaseDataFlag(int val);
00127   void GlobalReleaseDataFlagOn() {this->SetGlobalReleaseDataFlag(1);};
00128   void GlobalReleaseDataFlagOff() {this->SetGlobalReleaseDataFlag(0);};
00129   static int GetGlobalReleaseDataFlag();
00131
00133
00134   vtkSetObjectMacro(FieldData,vtkFieldData);
00135   vtkGetObjectMacro(FieldData,vtkFieldData);
00137
00138   // Handle the source/data loop.
00139   void UnRegister(vtkObject *o);
00140
00144   virtual int GetNetReferenceCount() {return this->ReferenceCount;};
00145
00151   virtual void Update();
00152
00158   virtual void UpdateInformation();
00159
00164   virtual void PropagateUpdateExtent();
00165
00171   virtual void TriggerAsynchronousUpdate();
00172
00179   virtual void UpdateData();
00180
00186   virtual unsigned long GetEstimatedMemorySize();
00187
00189
00192   virtual void SetUpdateExtent(int vtkNotUsed(piece),int vtkNotUsed(numPieces),
00193                                int vtkNotUsed(ghostLevel))
00194     {vtkErrorMacro("Subclass did not implement 'SetUpdateExtent'");}
00195   void SetUpdateExtent(int piece, int numPieces)
00196     {this->SetUpdateExtent(piece, numPieces, 0);}
00198
00200
00207   virtual void SetUpdateExtent(int x1, int x2, int y1, int y2, int z1, int z2);
00208   virtual void SetUpdateExtent( int ext[6] );
00209   vtkGetVector6Macro( UpdateExtent, int );
00211
00216   virtual int GetDataObjectType() {return VTK_DATA_OBJECT;}
00217
00220   unsigned long GetUpdateTime();
00221
00226   void SetUpdateExtentToWholeExtent();
00227
00228   void SetPipelineMTime(unsigned long time) {this->PipelineMTime = time; }
00229   vtkGetMacro(PipelineMTime, unsigned long);
00230
00236   virtual unsigned long GetActualMemorySize();
00237
00239   void CopyInformation( vtkDataObject *data );
00240
00242
00243   virtual void CopyTypeSpecificInformation( vtkDataObject *data )
00244     {this->CopyInformation( data );};
00246
00248
00250   void SetUpdatePiece(int piece);
00251   void SetUpdateNumberOfPieces(int num);
00252   vtkGetMacro( UpdatePiece, int );
00253   vtkGetMacro( UpdateNumberOfPieces, int );
00255
00257
00259   void SetUpdateGhostLevel(int level);
00260   vtkGetMacro(UpdateGhostLevel, int);
00262
00264
00269   void SetRequestExactExtent(int v);
00270   vtkGetMacro(RequestExactExtent, int);
00271   vtkBooleanMacro(RequestExactExtent, int);
00273
00275
00278   vtkSetVector6Macro( WholeExtent, int );
00279   vtkGetVector6Macro( WholeExtent, int );
00281
00283
00287   vtkSetMacro( MaximumNumberOfPieces, int );
00288   vtkGetMacro( MaximumNumberOfPieces, int );
00290
00294   void DataHasBeenGenerated();
00295
00299   virtual void PrepareForNewData() {this->Initialize();};
00300
00302
00304   virtual void ShallowCopy(vtkDataObject *src);
00305   virtual void DeepCopy(vtkDataObject *src);
00307
00309
00312   vtkSetMacro(Locality, float);
00313   vtkGetMacro(Locality, float);
00315
00317
00318   void SetExtentTranslator(vtkExtentTranslator *translator);
00319   vtkExtentTranslator *GetExtentTranslator();
00321
00323
00324   vtkGetMacro(NumberOfConsumers,int);
00326
00328
00329   void AddConsumer(vtkProcessObject *c);
00330   void RemoveConsumer(vtkProcessObject *c);
00331   vtkProcessObject *GetConsumer(int i);
00332   int IsConsumer(vtkProcessObject *c);
00334
00335
00336 protected:
00337
00338   vtkDataObject();
00339   ~vtkDataObject();
00340
00341   // General field data associated with data object
00342   vtkFieldData  *FieldData;
00343
00344   // Who generated this data as output?
00345   vtkSource     *Source;
00346
00347   // Keep track of data release during network execution
00348   int DataReleased;
00349
00350   // how many consumers does this object have
00351   int NumberOfConsumers;
00352   vtkProcessObject **Consumers;
00353
00355   int UpdateExtentIsOutsideOfTheExtent();
00356
00361   int UpdateExtentIsEmpty();
00362
00370   virtual int VerifyUpdateExtent();
00371
00372   // The ExtentType will be left as VTK_PIECES_EXTENT for data objects
00373   // such as vtkPolyData and vtkUnstructuredGrid. The ExtentType will be
00374   // changed to VTK_3D_EXTENT for data objects with 3D structure such as
00375   // vtkImageData (and its subclass vtkStructuredPoints), vtkRectilinearGrid,
00376   // and vtkStructuredGrid. The default is the have an extent in pieces,
00377   // with only one piece (no streaming possible).
00378   virtual int GetExtentType() { return VTK_PIECES_EXTENT; };
00379
00380   // If the ExtentType is VTK_3D_EXTENT, then these three extent variables
00381   // represent the whole extent, the extent currently in memory, and the
00382   // requested update extent. The extent is given as 3 min/max pairs.
00383   int WholeExtent[6];
00384   int Extent[6];
00385   int UpdateExtent[6];
00386   // First update, the update extent will be set to the whole extent.
00387   unsigned char UpdateExtentInitialized;
00388   // An object to translate from unstructured pieces to structured extents.
00389   vtkExtentTranslator *ExtentTranslator;
00390
00391   // Unstructured request stuff
00392   int NumberOfPieces;
00393   int Piece;
00394   int MaximumNumberOfPieces;
00395   int UpdateNumberOfPieces;
00396   int UpdatePiece;
00397
00398   // This request flag indicates whether the requester can handle
00399   // more data than requested.  Right now it is used in vtkImageData.
00400   // Image filters can return more data than requested.  The the
00401   // consumer cannot handle this (i.e. DataSetToDataSetFitler)
00402   // this image will crop itself.  This functionality used to be in
00403   // ImageToStructuredPoints.
00404   int RequestExactExtent;
00405
00406   // This method crops the data object (if necesary) so that the extent
00407   // matches the update extent.
00408   virtual void Crop();
00409
00410   int GhostLevel;
00411   int UpdateGhostLevel;
00412
00413   // Data will release after use by a filter if this flag is set
00414   int ReleaseDataFlag;
00415
00416   // When was this data last generated?
00417   vtkTimeStamp UpdateTime;
00418
00419   // The Maximum MTime of all upstream filters and data objects.
00420   // This does not include the MTime of this data object.
00421   unsigned long PipelineMTime;
00422
00423   // Was the update extent propagated down the pipeline
00424   int LastUpdateExtentWasOutsideOfTheExtent;
00425
00426   // A value indicating whether we have a port upstream and how
00427   // many filters removed it is.
00428   // 0.0 : no ports.
00429   // 1.0 : my source is a port.
00430   // 0.5 : the next upstream filter is a port ...
00431   float Locality;
00432
00433 private:
00434   // Helper method for the ShallowCopy and DeepCopy methods.
00435   void InternalDataObjectCopy(vtkDataObject *src);
00436 private:
00437   vtkDataObject(const vtkDataObject&);  // Not implemented.
00438   void operator=(const vtkDataObject&);  // Not implemented.
00439 };
00440
00441 #endif
00442
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataObjectCollection.h Source File

Common/vtkDataObjectCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataObjectCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00050 #ifndef __vtkDataObjectCollection_h
00051 #define __vtkDataObjectCollection_h
00052
00053 #include "vtkCollection.h"
00054 #include "vtkDataObject.h"
00055
00056 class VTK_COMMON_EXPORT vtkDataObjectCollection : public vtkCollection
00057 {
00058 public:
00059   static vtkDataObjectCollection *New();
00060   vtkTypeMacro(vtkDataObjectCollection,vtkCollection);
00061
00063
00064   void AddItem(vtkDataObject *ds) {
00065     this->vtkCollection::AddItem((vtkObject *)ds);};
00067
00069
00070   vtkDataObject *GetNextItem() {
00071     return static_cast<vtkDataObject *>(this->GetNextItemAsObject());};
00073
00075
00076   vtkDataObject *GetItem(int i) {
00077     return static_cast<vtkDataObject *>(this->GetItemAsObject(i));};
00079
00080 protected:
00081   vtkDataObjectCollection() {};
00082   ~vtkDataObjectCollection() {};
00083
00084
00085 private:
00086   // hide the standard AddItem from the user and the compiler.
00087   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00088
00089 private:
00090   vtkDataObjectCollection(const vtkDataObjectCollection&);  // Not implemented.
00091   void operator=(const vtkDataObjectCollection&);  // Not implemented.
00092 };
00093
00094
00095 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataSet.h Source File

Common/vtkDataSet.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataSet.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00070 #ifndef __vtkDataSet_h
00071 #define __vtkDataSet_h
00072
00073 #include "vtkDataObject.h"
00074 #include "vtkCellData.h"
00075 #include "vtkPointData.h"
00076 #include "vtkGenericCell.h"
00077 #include "vtkCellTypes.h"
00078
00079 class VTK_COMMON_EXPORT vtkDataSet : public vtkDataObject
00080 {
00081 public:
00082   vtkTypeMacro(vtkDataSet,vtkDataObject);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084
00088   virtual void CopyStructure(vtkDataSet *ds) = 0;
00089
00092   virtual vtkIdType GetNumberOfPoints() = 0;
00093
00096   virtual vtkIdType GetNumberOfCells() = 0;
00097
00100   virtual float *GetPoint(vtkIdType ptId) = 0;
00101
00105   virtual void GetPoint(vtkIdType id, float x[3]);
00106
00109   virtual vtkCell *GetCell(vtkIdType cellId) = 0;
00110
00115   virtual void GetCell(vtkIdType cellId, vtkGenericCell *cell) = 0;
00116
00125   virtual void GetCellBounds(vtkIdType cellId, float bounds[6]);
00126
00130   virtual int GetCellType(vtkIdType cellId) = 0;
00131
00139   virtual void GetCellTypes(vtkCellTypes *types);
00140
00144   virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) = 0;
00145
00149   virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) = 0;
00150
00152
00156   virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00157                                 vtkIdList *cellIds);
00159
00161
00165   vtkIdType FindPoint(float x, float y, float z)
00166     {
00167     float xyz[3];
00168     xyz[0] = x; xyz[1] = y; xyz[2] = z;
00169     return this->FindPoint (xyz);
00170     }
00171   virtual vtkIdType FindPoint(float x[3]) = 0;
00173
00175
00183   virtual vtkIdType FindCell(float x[3], vtkCell *cell, vtkIdType cellId,
00184                              float tol2, int& subId, float pcoords[3],
00185                              float *weights) = 0;
00187
00189
00194   virtual vtkIdType FindCell(float x[3], vtkCell *cell,
00195                              vtkGenericCell *gencell, vtkIdType cellId,
00196                              float tol2, int& subId, float pcoords[3],
00197                              float *weights) = 0;
00199
00201
00207   virtual vtkCell *FindAndGetCell(float x[3], vtkCell *cell, vtkIdType cellId,
00208                                   float tol2, int& subId, float pcoords[3],
00209                                   float *weights);
00211
00214   unsigned long int GetMTime();
00215
00218   vtkCellData *GetCellData() {return this->CellData;};
00219
00222   vtkPointData *GetPointData() {return this->PointData;};
00223
00226   virtual void Squeeze();
00227
00230   virtual void ComputeBounds();
00231
00234   float *GetBounds();
00235
00239   void GetBounds(float bounds[6]);
00240
00242   float *GetCenter();
00243
00246   void GetCenter(float center[3]);
00247
00251   float GetLength();
00252
00254   void Initialize();
00255
00262   virtual void GetScalarRange(float range[2]);
00263
00266   float *GetScalarRange();
00267
00271   virtual int GetMaxCellSize() = 0;
00272
00278   unsigned long GetActualMemorySize();
00279
00281
00282   int GetDataObjectType()
00283     {return VTK_DATA_SET;}
00285
00287
00288   void ShallowCopy(vtkDataObject *src);
00289   void DeepCopy(vtkDataObject *src);
00291
00292 //BTX
00293   enum FieldDataType
00294   {
00295     DATA_OBJECT_FIELD=0,
00296     POINT_DATA_FIELD=1,
00297     CELL_DATA_FIELD=2
00298   };
00299 //ETX
00300
00307   int CheckAttributes();
00308
00309 protected:
00310   // Constructor with default bounds (0,1, 0,1, 0,1).
00311   vtkDataSet();
00312   ~vtkDataSet();
00313
00314   vtkCellData *CellData;   // Scalars, vectors, etc. associated w/ each cell
00315   vtkPointData *PointData;   // Scalars, vectors, etc. associated w/ each point
00316   vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
00317   float Bounds[6];  // (xmin,xmax, ymin,ymax, zmin,zmax) geometric bounds
00318   float ScalarRange[2];
00319   float Center[3];
00320
00321 private:
00322   void InternalDataSetCopy(vtkDataSet *src);
00323 private:
00324   vtkDataSet(const vtkDataSet&);  // Not implemented.
00325   void operator=(const vtkDataSet&);    // Not implemented.
00326 };
00327
00328 inline void vtkDataSet::GetPoint(vtkIdType id, float x[3])
00329 {
00330   float *pt = this->GetPoint(id);
00331   x[0] = pt[0]; x[1] = pt[1]; x[2] = pt[2];
00332 }
00333
00334 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataSetAttributes.h Source File

Common/vtkDataSetAttributes.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataSetAttributes.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkDataSetAttributes_h
00058 #define __vtkDataSetAttributes_h
00059
00060 #include "vtkObject.h"
00061 #include "vtkFieldData.h"
00062
00063 class VTK_COMMON_EXPORT vtkDataSetAttributes : public vtkFieldData
00064 {
00065 public:
00067   static vtkDataSetAttributes *New();
00068
00069   vtkTypeMacro(vtkDataSetAttributes,vtkFieldData);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071
00074   virtual void Initialize();
00075
00078   virtual void Update() {}
00079
00086   virtual void PassData(vtkFieldData* fd);
00087
00089
00096   void CopyAllocate(vtkDataSetAttributes* pd, vtkIdType sze=0,
00097                     vtkIdType ext=1000);
00099
00107   void CopyData(vtkDataSetAttributes *fromPd, vtkIdType fromId, vtkIdType toId);
00108
00110
00113   void InterpolateAllocate(vtkDataSetAttributes* pd, vtkIdType sze=0,
00114                            vtkIdType ext=1000);
00116
00118
00120   void InterpolatePoint(vtkDataSetAttributes *fromPd, vtkIdType toId,
00121                         vtkIdList *ids, float *weights);
00123
00125
00129   void InterpolateEdge(vtkDataSetAttributes *fromPd, vtkIdType toId,
00130                        vtkIdType p1, vtkIdType p2, float t);
00132
00134
00141   void InterpolateTime(vtkDataSetAttributes *from1,
00142                        vtkDataSetAttributes *from2,
00143                        vtkIdType id, float t);
00145
00148   virtual void DeepCopy(vtkFieldData *pd);
00149
00151   virtual void ShallowCopy(vtkFieldData *pd);
00152
00154
00155   int SetScalars(vtkDataArray* da);
00156   int SetActiveScalars(const char* name);
00157   vtkDataArray* GetScalars();
00159
00161
00162   int SetVectors(vtkDataArray* da);
00163   int SetActiveVectors(const char* name);
00164   vtkDataArray* GetVectors();
00166
00168
00169   int SetNormals(vtkDataArray* da);
00170   int SetActiveNormals(const char* name);
00171   vtkDataArray* GetNormals();
00173
00175
00176   int SetTCoords(vtkDataArray* da);
00177   int SetActiveTCoords(const char* name);
00178   vtkDataArray* GetTCoords();
00180
00182
00183   int SetTensors(vtkDataArray* da);
00184   int SetActiveTensors(const char* name);
00185   vtkDataArray* GetTensors();
00187
00189
00192   vtkDataArray* GetScalars(const char* name);
00193   vtkDataArray* GetVectors(const char* name);
00194   vtkDataArray* GetNormals(const char* name);
00195   vtkDataArray* GetTCoords(const char* name);
00196   vtkDataArray* GetTensors(const char* name);
00198
00205   int SetActiveAttribute(const char* name, int attributeType);
00206
00208   int SetActiveAttribute(int index, int attributeType);
00209
00211   void SetCopyAttribute (int index, int value);
00212
00214
00220   void SetCopyScalars(int i);
00221   int GetCopyScalars();
00222   vtkBooleanMacro(CopyScalars, int);
00224
00226
00232   void SetCopyVectors(int i);
00233   int GetCopyVectors();
00234   vtkBooleanMacro(CopyVectors, int);
00236
00238
00244   void SetCopyNormals(int i);
00245   int GetCopyNormals();
00246   vtkBooleanMacro(CopyNormals, int);
00248
00250
00256   void SetCopyTCoords(int i);
00257   int GetCopyTCoords();
00258   vtkBooleanMacro(CopyTCoords, int);
00260
00262
00268   void SetCopyTensors(int i);
00269   int GetCopyTensors();
00270   vtkBooleanMacro(CopyTensors, int);
00272
00279   virtual void CopyAllOn();
00280
00287   virtual void CopyAllOff();
00288
00290
00294   void CopyTuple(vtkDataArray *fromData, vtkDataArray *toData,
00295                  vtkIdType fromId, vtkIdType toId);
00297
00300   void GetAttributeIndices(int* indexArray);
00301
00306   int IsArrayAnAttribute(int idx);
00307
00310   vtkDataArray* GetAttribute(int attributeType);
00311
00313   virtual void RemoveArray(const char *name);
00314
00317   static const char* GetAttributeTypeAsString(int attributeType);
00318
00319 //BTX
00320   // Always keep NUM_ATTRIBUTES as the last entry
00321   enum AttributeTypes
00322   {
00323     SCALARS=0,
00324     VECTORS=1,
00325     NORMALS=2,
00326     TCOORDS=3,
00327     TENSORS=4,
00328     NUM_ATTRIBUTES
00329   };
00330
00331   enum AttributeLimitTypes
00332   {
00333     MAX,
00334     EXACT,
00335     NOLIMIT
00336   };
00337
00338   class FieldList;
00339
00341
00343   void CopyAllocate(vtkDataSetAttributes::FieldList& list, vtkIdType sze=0,
00344                     vtkIdType ext=1000);
00346
00348
00352   void CopyData(vtkDataSetAttributes::FieldList& list,
00353                 vtkDataSetAttributes* dsa, int idx, vtkIdType fromId,
00354                 vtkIdType toId);
00356
00357   friend class vtkDataSetAttributes::FieldList;
00358 //ETX
00359
00360 protected:
00361   vtkDataSetAttributes();
00362   ~vtkDataSetAttributes();
00363
00364   // special methods to support managing data
00365   void InterpolateTuple(vtkDataArray *fromData, vtkDataArray *toData,
00366                         vtkIdType toId, vtkIdList *ptIds, float *weights);
00367   void InterpolateTuple(vtkDataArray *fromData, vtkDataArray *toData,
00368                         vtkIdType toId, vtkIdType id1, vtkIdType id2, float t);
00369   void InterpolateTuple(vtkDataArray *fromData1, vtkDataArray *fromData2,
00370                         vtkDataArray *toData, vtkIdType id, float t);
00371
00373   virtual void InitializeFields();
00374
00375   int AttributeIndices[NUM_ATTRIBUTES]; //index to attribute array in field data
00376   int CopyAttributeFlags[NUM_ATTRIBUTES]; //copy flag for attribute data
00377
00378 //BTX
00379   vtkFieldData::BasicIterator RequiredArrays;
00380 //ETX
00381
00382   int* TargetIndices;
00383
00384   virtual void RemoveArray(int index);
00385
00386   static int NumberOfAttributeComponents[NUM_ATTRIBUTES];
00387   static int AttributeLimits[NUM_ATTRIBUTES];
00388   static char AttributeNames[NUM_ATTRIBUTES][10];
00389
00390 private:
00391   int SetAttribute(vtkDataArray* da, int attributeType);
00392   static int CheckNumberOfComponents(vtkDataArray* da, int attributeType);
00393
00394 //BTX
00395   vtkFieldData::BasicIterator  ComputeRequiredArrays(vtkDataSetAttributes* pd);
00396
00397 private:
00398   vtkDataSetAttributes(const vtkDataSetAttributes&);  // Not implemented.
00399   void operator=(const vtkDataSetAttributes&);  // Not implemented.
00400
00401 public:
00402   // This public class is used to perform set operations, other misc.
00403   // operations on fields. For example, vtkAppendFilter uses it to
00404   // determine which attributes the input datasets share in common.
00405   class VTK_COMMON_EXPORT FieldList
00406   {
00407   public:
00408     FieldList(int numInputs);
00409     ~FieldList();
00410
00411     void InitializeFieldList(vtkDataSetAttributes* dsa);
00412     void IntersectFieldList(vtkDataSetAttributes* dsa);
00413
00414     //Determine whether data is available
00415     int IsAttributePresent(int attrType); //true/false attributes specified
00416     int IsFieldPresent(const char *name); //return idx into field arrays
00417
00418     friend class vtkDataSetAttributes;
00419
00420   protected:
00421     FieldList(const FieldList&) {} //prevent these methods from being used
00422     void operator=(const FieldList&) {}
00423
00424   private:
00425     void SetField(int index, vtkDataArray *da);
00426     void RemoveField(const char *name);
00427     void ClearFields();
00428
00429     //These keep track of what is common across datasets
00430     char** Fields; //the names of the fields (first five are named attributes)
00431     int *FieldTypes; //the types of the fields (first five are named
00432                      //attributes)
00433     int *FieldComponents; //the number of components in each  fields
00434                           // (first five are named attributes)
00435     int *FieldIndices; //output data array index
00436                        // (first five are named attributes)
00437     vtkLookupTable **LUT; //luts associated with each array
00438     vtkIdType NumberOfTuples; //a running total of values
00439     int NumberOfFields; //the number of fields
00440
00441     //For every vtkDataSetAttributes that are processed, keep track of the
00442     //indices into various things. The indices are organized so that the
00443     //first NUM_ATTRIBUTES refer to attributes, the next refer to the
00444     //non-attribute fields, for a total of NUM_ATTRIBUTES + NumberOfFields.
00445     //CurrentInput is the current input being processed.
00446     int **DSAIndices;
00447     int NumberOfDSAIndices;
00448     int CurrentInput;
00449   };
00450
00451 //ETX
00452 };
00453
00454 #endif
00455
00456
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDataSetCollection.h Source File

Common/vtkDataSetCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataSetCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00050 #ifndef __vtkDataSetCollection_h
00051 #define __vtkDataSetCollection_h
00052
00053 #include "vtkCollection.h"
00054 #include "vtkDataSet.h"
00055
00056 class VTK_COMMON_EXPORT vtkDataSetCollection : public vtkCollection
00057 {
00058 public:
00059   static vtkDataSetCollection *New();
00060   vtkTypeMacro(vtkDataSetCollection,vtkCollection);
00061
00063
00064   void AddItem(vtkDataSet *ds) {
00065     this->vtkCollection::AddItem((vtkObject *)ds);};
00067
00069
00070   vtkDataSet *GetNextItem() {
00071     return static_cast<vtkDataSet *>(this->GetNextItemAsObject());};
00073
00075
00076   vtkDataSet *GetItem(int i) {
00077     return static_cast<vtkDataSet *>(this->GetItemAsObject(i));};
00079
00080 protected:
00081   vtkDataSetCollection() {};
00082   ~vtkDataSetCollection() {};
00083
00084
00085 private:
00086   // hide the standard AddItem from the user and the compiler.
00087   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00088
00089 private:
00090   vtkDataSetCollection(const vtkDataSetCollection&);  // Not implemented.
00091   void operator=(const vtkDataSetCollection&);  // Not implemented.
00092 };
00093
00094
00095 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDebugLeaks.h Source File

Common/vtkDebugLeaks.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDebugLeaks.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00059 #ifndef __vtkDebugLeaks_h
00060 #define __vtkDebugLeaks_h
00061
00062 #include "vtkObject.h"
00063 #include "vtkToolkits.h"
00064
00065 class vtkDebugLeaksHashTable;
00066
00067 class VTK_COMMON_EXPORT vtkDebugLeaks : public vtkObject
00068 {
00069 public:
00070   static vtkDebugLeaks *New();
00071   vtkTypeMacro(vtkDebugLeaks,vtkObject);
00072
00074   static void ConstructClass(const char* classname);
00075
00077   static void DestructClass(const char* classname);
00078
00080   static void PrintCurrentLeaks();
00081
00083   static void DeleteTable();
00084
00086
00087   static void PromptUserOn();
00088   static void PromptUserOff();
00090
00091 protected:
00092   vtkDebugLeaks(){};
00093   virtual ~vtkDebugLeaks(){};
00094
00095   static int PromptUser;
00096
00097 private:
00098   static vtkDebugLeaksHashTable* MemoryTable;
00099 private:
00100   vtkDebugLeaks(const vtkDebugLeaks&);  // Not implemented.
00101   void operator=(const vtkDebugLeaks&);  // Not implemented.
00102 };
00103
00104 #endif // __vtkDebugLeaks_h
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDirectory.h Source File

Common/vtkDirectory.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDirectory.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkDirectory_h
00056 #define __vtkDirectory_h
00057
00058 #include "vtkObject.h"
00059 #include "vtkDebugLeaks.h"
00060
00061 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject
00062 {
00063 public:
00065
00066   vtkTypeMacro(vtkDirectory,vtkObject);
00068
00070
00071   static vtkDirectory *New() {
00072 #ifdef VTK_DEBUG_LEAKS
00073     vtkDebugLeaks::ConstructClass("vtkDirectory");
00075 #endif
00076     return new vtkDirectory;};
00077
00079   virtual void PrintSelf(ostream& os, vtkIndent indent);
00080
00082
00085   int Open(const char* dir);
00086   // Description:
00087   // Return the number of files in the current directory.
00088   int GetNumberOfFiles() { return this->NumberOfFiles; }
00089   // Description:
00090   // Return the file at the given index, the indexing is 0 based
00091   const char* GetFile(int index);
00093 protected:
00094   vtkDirectory();
00095   ~vtkDirectory() ;
00096 private:
00097   char* Path;           // Path to Open'ed directory
00098   char** Files;                 // Array of Files
00099   int NumberOfFiles;            // Number if files in open directory
00100
00101 private:
00102   vtkDirectory(const vtkDirectory&);  // Not implemented.
00103   void operator=(const vtkDirectory&);  // Not implemented.
00104 };
00105
00106 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDoubleArray.h Source File

Common/vtkDoubleArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDoubleArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkDoubleArray_h
00058 #define __vtkDoubleArray_h
00059
00060 #include "vtkDataArray.h"
00061
00062 class VTK_COMMON_EXPORT vtkDoubleArray : public vtkDataArray
00063 {
00064 public:
00065   static vtkDoubleArray *New();
00066
00067   vtkTypeMacro(vtkDoubleArray,vtkDataArray);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069
00072   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00073
00075   void Initialize();
00076
00078   vtkDataArray *MakeObject();
00079
00081   int GetDataType() {return VTK_DOUBLE;};
00082
00084   void SetNumberOfTuples(const vtkIdType number);
00085
00088   float *GetTuple(const vtkIdType i);
00089
00091
00092   void GetTuple(const vtkIdType i, float * tuple);
00093   void GetTuple(const vtkIdType i, double * tuple);
00095
00097
00098   void SetTuple(const vtkIdType i, const float * tuple);
00099   void SetTuple(const vtkIdType i, const double * tuple);
00101
00103
00105   void InsertTuple(const vtkIdType i, const float * tuple);
00106   void InsertTuple(const vtkIdType i, const double * tuple);
00108
00110
00112   vtkIdType InsertNextTuple(const float * tuple);
00113   vtkIdType InsertNextTuple(const double * tuple);
00115
00117   void Squeeze() {this->ResizeAndExtend (this->MaxId+1);};
00118
00120   virtual void Resize(vtkIdType numTuples);
00121
00123   double GetValue(const vtkIdType id) {return this->Array[id];}
00124
00126
00128   void SetValue(const vtkIdType id, const double value)
00129     { this->Array[id] = value;};
00131
00135   void SetNumberOfValues(const vtkIdType number);
00136
00138   void InsertValue(const vtkIdType id, const double f);
00139
00142   vtkIdType InsertNextValue(const double f);
00143
00147   virtual void InsertComponent(const vtkIdType i, const int j, const float c);
00148
00152   double *WritePointer(const vtkIdType id, const vtkIdType number);
00153
00155
00157   double *GetPointer(const vtkIdType id) {return this->Array + id;}
00158   void *GetVoidPointer(const vtkIdType id)
00159     {return (void *)this->GetPointer(id);};
00161
00163   void DeepCopy(vtkDataArray *da);
00164
00166
00172   void SetArray(double* array, vtkIdType size, int save);
00173   void SetVoidArray(void *array, vtkIdType size, int save)
00174     {this->SetArray((double*)array, size, save);};
00176
00177 protected:
00178   vtkDoubleArray(vtkIdType numComp=1);
00179   ~vtkDoubleArray();
00180
00181   double *Array;   // pointer to data
00182   double *ResizeAndExtend(const vtkIdType sz);  // function to resize data
00183
00184   int TupleSize; //used for data conversion
00185   float *Tuple;
00186
00187   int SaveUserArray;
00188 private:
00189   vtkDoubleArray(const vtkDoubleArray&);  // Not implemented.
00190   void operator=(const vtkDoubleArray&);  // Not implemented.
00191 };
00192
00193 inline void vtkDoubleArray::SetNumberOfValues(const vtkIdType number)
00194 {
00195   this->Allocate(number);
00196   this->MaxId = number - 1;
00197 }
00198
00199 inline double *vtkDoubleArray::WritePointer(const vtkIdType id,
00200                                             const vtkIdType number)
00201 {
00202   vtkIdType newSize=id+number;
00203   if ( newSize > this->Size )
00204     {
00205     this->ResizeAndExtend(newSize);
00206     }
00207   if ( (--newSize) > this->MaxId )
00208     {
00209     this->MaxId = newSize;
00210     }
00211   return this->Array + id;
00212 }
00213
00214 inline void vtkDoubleArray::InsertValue(const vtkIdType id, const double f)
00215 {
00216   if ( id >= this->Size )
00217     {
00218     this->ResizeAndExtend(id+1);
00219     }
00220   this->Array[id] = f;
00221   if ( id > this->MaxId )
00222     {
00223     this->MaxId = id;
00224     }
00225 }
00226
00227 inline vtkIdType vtkDoubleArray::InsertNextValue(const double f)
00228 {
00229   this->InsertValue (++this->MaxId,f);
00230   return this->MaxId;
00231 }
00232
00233
00234 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkDynamicLoader.h Source File

Common/vtkDynamicLoader.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDynamicLoader.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkDynamicLoader_h
00053 #define __vtkDynamicLoader_h
00054 #include "vtkConfigure.h"
00055
00056 //BTX
00057 // Ugly stuff for library handles
00058 // They are different on several different OS's
00059 #if defined(__hpux)
00060 # include <dl.h>
00061   typedef shl_t vtkLibHandle;
00062 #elif defined(_WIN32)
00063 # include "vtkWin32Header.h"
00064   typedef HMODULE vtkLibHandle;
00065 #else
00066   typedef void* vtkLibHandle;
00067 #endif
00068 //ETX
00069
00070 #include "vtkObject.h"
00071
00072
00073 class VTK_COMMON_EXPORT vtkDynamicLoader : public vtkObject
00074 {
00075 public:
00076   static vtkDynamicLoader *New() {return new vtkDynamicLoader;};
00077   vtkTypeMacro(vtkDynamicLoader,vtkObject);
00078
00079   //BTX
00082   static vtkLibHandle OpenLibrary(const char*);
00083
00085
00087   static int CloseLibrary(vtkLibHandle);
00088   //ETX
00090
00092   static void* GetSymbolAddress(vtkLibHandle, const char*);
00093
00095   static const char* LibPrefix();
00096
00098   static const char* LibExtension();
00099
00101   static const char* LastError();
00102
00103 protected:
00104   vtkDynamicLoader() {};
00105   ~vtkDynamicLoader() {};
00106
00107
00108 private:
00109   vtkDynamicLoader(const vtkDynamicLoader&);  // Not implemented.
00110   void operator=(const vtkDynamicLoader&);  // Not implemented.
00111 };
00112
00113 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkEdgeTable.h Source File

Common/vtkEdgeTable.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEdgeTable.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkEdgeTable_h
00053 #define __vtkEdgeTable_h
00054
00055 #include "vtkObject.h"
00056
00057 class vtkIdList;
00058 class vtkPoints;
00059
00060 class VTK_COMMON_EXPORT vtkEdgeTable : public vtkObject
00061 {
00062 public:
00064   static vtkEdgeTable *New();
00065
00066   vtkTypeMacro(vtkEdgeTable,vtkObject);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00070   void Initialize();
00071
00079   int InitEdgeInsertion(vtkIdType numPoints, int storeAttributes=0);
00080
00088   vtkIdType InsertEdge(vtkIdType p1, vtkIdType p2);
00089
00096   void InsertEdge(vtkIdType p1, vtkIdType p2, int attributeId);
00097
00103   int IsEdge(vtkIdType p1, vtkIdType p2);
00104
00108   int InitPointInsertion(vtkPoints *newPts, vtkIdType estSize);
00109
00111
00114   int InsertUniquePoint(vtkIdType p1, vtkIdType p2, float x[3],
00115                         vtkIdType &ptId);
00117
00119
00120   vtkGetMacro(NumberOfEdges, vtkIdType);
00122
00124   void InitTraversal();
00125
00130   int GetNextEdge(vtkIdType &p1, vtkIdType &p2);
00131
00134   void Reset();
00135
00136 protected:
00137   vtkEdgeTable();
00138   ~vtkEdgeTable();
00139
00140   vtkIdList **Table;
00141   vtkIdList **Attributes;
00142   int StoreAttributes;
00143   vtkIdType TableMaxId; //maximum point id inserted
00144   vtkIdType TableSize;  //allocated size of table
00145   int Position[2];
00146   int Extend;
00147   vtkIdType NumberOfEdges;
00148   vtkPoints *Points; //support point insertion
00149
00150   vtkIdList **Resize(vtkIdType size);
00151 private:
00152   vtkEdgeTable(const vtkEdgeTable&);  // Not implemented.
00153   void operator=(const vtkEdgeTable&);  // Not implemented.
00154 };
00155
00156 #endif
00157
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkEmptyCell.h Source File

Common/vtkEmptyCell.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEmptyCell.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00053 #ifndef __vtkEmptyCell_h
00054 #define __vtkEmptyCell_h
00055
00056 #include "vtkCell.h"
00057
00058 class VTK_COMMON_EXPORT vtkEmptyCell : public vtkCell
00059 {
00060 public:
00061   static vtkEmptyCell *New();
00062   vtkTypeMacro(vtkEmptyCell,vtkCell);
00063
00065
00066   vtkCell *MakeObject() {return vtkEmptyCell::New();};
00067   int GetCellType() {return VTK_EMPTY_CELL;};
00068   int GetCellDimension() {return 0;};
00069   int GetNumberOfEdges() {return 0;};
00070   int GetNumberOfFaces() {return 0;};
00071   vtkCell *GetEdge(int) {return 0;};
00072   vtkCell *GetFace(int) {return 0;};
00073   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00074   void Contour(float value, vtkDataArray *cellScalars,
00075                vtkPointLocator *locator, vtkCellArray *verts1,
00076                vtkCellArray *lines, vtkCellArray *verts2,
00077                vtkPointData *inPd, vtkPointData *outPd,
00078                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00079   void Clip(float value, vtkDataArray *cellScalars,
00080             vtkPointLocator *locator, vtkCellArray *pts,
00081             vtkPointData *inPd, vtkPointData *outPd,
00082             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00083             int insideOut);
00085
00086   int EvaluatePosition(float x[3], float* closestPoint,
00087                        int& subId, float pcoords[3],
00088                        float& dist2, float *weights);
00089   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00090                         float *weights);
00091   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00092                         float x[3], float pcoords[3], int& subId);
00093   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00094   void Derivatives(int subId, float pcoords[3], float *values,
00095                    int dim, float *derivs);
00096
00097 protected:
00098   vtkEmptyCell() {};
00099   ~vtkEmptyCell() {};
00100
00101
00102 private:
00103   vtkEmptyCell(const vtkEmptyCell&);  // Not implemented.
00104   void operator=(const vtkEmptyCell&);  // Not implemented.
00105 };
00106
00107 #endif
00108
00109
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkExtentTranslator.h Source File

Common/vtkExtentTranslator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkExtentTranslator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkExtentTranslator_h
00056 #define __vtkExtentTranslator_h
00057
00058 #include "vtkObject.h"
00059
00060
00061 class VTK_COMMON_EXPORT vtkExtentTranslator : public vtkObject
00062 {
00063 public:
00064   static vtkExtentTranslator *New();
00065
00066   vtkTypeMacro(vtkExtentTranslator,vtkObject);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00070
00072   vtkSetVector6Macro(WholeExtent, int);
00073   vtkGetVector6Macro(WholeExtent, int);
00074   vtkSetVector6Macro(Extent, int);
00075   vtkGetVector6Macro(Extent, int);
00076   vtkSetMacro(Piece,int);
00077   vtkGetMacro(Piece,int);
00078   vtkSetMacro(NumberOfPieces,int);
00079   vtkGetMacro(NumberOfPieces,int);
00080   vtkSetMacro(GhostLevel, int);
00081   vtkGetMacro(GhostLevel, int);
00083
00085
00090   virtual int PieceToExtent();
00091   virtual int PieceToExtentByPoints();
00092   virtual int PieceToExtentThreadSafe(int piece, int numPieces,
00093                                       int ghostLevel, int *wholeExtent,
00094                                       int *resultExtent, int splitMode,
00095                                       int byPoints);
00097
00098
00099
00101
00105   void SetSplitModeToBlock()
00106     {this->SplitMode = vtkExtentTranslator::BLOCK_MODE;}
00107   void SetSplitModeToXSlab()
00108     {this->SplitMode = vtkExtentTranslator::X_SLAB_MODE;}
00109  void SetSplitModeToYSlab()
00110     {this->SplitMode = vtkExtentTranslator::Y_SLAB_MODE;}
00111  void SetSplitModeToZSlab()
00112     {this->SplitMode = vtkExtentTranslator::Z_SLAB_MODE;}
00113   vtkGetMacro(SplitMode,int);
00115
00116 protected:
00117   vtkExtentTranslator();
00118   ~vtkExtentTranslator();
00119
00121
00123   int SplitExtent(int piece, int numPieces, int *extent, int splitMode);
00124   int SplitExtentByPoints(int piece, int numPieces, int *extent,
00125                           int splitMode);
00127
00128   int Piece;
00129   int NumberOfPieces;
00130   int GhostLevel;
00131   int Extent[6];
00132   int WholeExtent[6];
00133   int SplitMode;
00134
00135 //BTX
00136   // Don't change the numbers here - they are used in the code
00137   // to indicate array indices.
00138   enum Modes {
00139     X_SLAB_MODE=0,
00140     Y_SLAB_MODE=1,
00141     Z_SLAB_MODE=2,
00142     BLOCK_MODE= 3
00143   };
00144 //ETX
00145
00146 private:
00147   vtkExtentTranslator(const vtkExtentTranslator&);  // Not implemented.
00148   void operator=(const vtkExtentTranslator&);  // Not implemented.
00149 };
00150
00151 #endif
00152
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkFieldData.h Source File

Common/vtkFieldData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkFieldData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00073 #ifndef __vtkFieldData_h
00074 #define __vtkFieldData_h
00075
00076 #include "vtkDataArray.h"
00077 #include "vtkIdList.h"
00078
00079 class VTK_COMMON_EXPORT vtkFieldData : public vtkObject
00080 {
00081 public:
00082   static vtkFieldData *New();
00083
00084   vtkTypeMacro(vtkFieldData,vtkObject);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086
00089   virtual void Initialize();
00090
00092   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00093
00096   vtkFieldData *MakeObject();
00097
00104   void AllocateArrays(int num);
00105
00106 #ifndef VTK_REMOVE_LEGACY_CODE
00107   void SetNumberOfArrays(int num)
00108     {
00109       vtkWarningMacro("This method will be deprecated. Please use "
00110                       "AllocateArrays() instead.");
00111       this->AllocateArrays(num);
00112     }
00113 #endif
00114
00118   int GetNumberOfArrays();
00119
00122   int AddArray(vtkDataArray *array);
00123
00125
00126   virtual void RemoveArray(const char *name)
00127     {
00128       int i;
00129       this->GetArray(name, i);
00130       this->RemoveArray(i);
00131     }
00133
00136   vtkDataArray *GetArray(int i);
00137
00140   vtkDataArray *GetArray(const char *arrayName, int &index);
00141
00142   // Return the array with the name given. Returns NULL is array not found.
00143   vtkDataArray *GetArray(const char *arrayName);
00144
00146
00148   const char* GetArrayName(int i)
00149     {
00150       vtkDataArray* da;
00151       if ((da=this->GetArray(i)))
00152         {
00153         return da->GetName();
00154         }
00155       else
00156         {
00157         return 0;
00158         }
00159     }
00161
00164   virtual void PassData(vtkFieldData* fd);
00165
00167
00172   void CopyFieldOn(const char* name) { this->CopyFieldOnOff(name, 1); }
00173   void CopyFieldOff(const char* name) { this->CopyFieldOnOff(name, 0); }
00175
00181   virtual void CopyAllOn();
00182
00188   virtual void CopyAllOff();
00189
00191   virtual void DeepCopy(vtkFieldData *da);
00192
00194   virtual void ShallowCopy(vtkFieldData *da);
00195
00198   void Squeeze();
00199
00202   void Reset();
00203
00208   virtual unsigned long GetActualMemorySize();
00209
00211   unsigned long int GetMTime();
00212
00219   void GetField(vtkIdList *ptId, vtkFieldData *f);
00220
00229   int GetArrayContainingComponent(int i, int& arrayComp);
00230
00237   int GetNumberOfComponents();
00238
00246   vtkIdType GetNumberOfTuples();
00247
00253   void SetNumberOfTuples(const vtkIdType number);
00254
00261   float *GetTuple(const vtkIdType i);
00262
00269   void GetTuple(const vtkIdType i, float * tuple);
00270
00277   void SetTuple(const vtkIdType i, const float * tuple);
00278
00285   void InsertTuple(const vtkIdType i, const float * tuple);
00286
00293   vtkIdType InsertNextTuple(const float * tuple);
00294
00300   float GetComponent(const vtkIdType i, const int j);
00301
00309   void SetComponent(const vtkIdType i, const int j, const float c);
00310
00318   void InsertComponent(const vtkIdType i, const int j, const float c);
00319
00320 protected:
00321
00322   vtkFieldData();
00323   ~vtkFieldData();
00324
00325   int NumberOfArrays;
00326   int NumberOfActiveArrays;
00327   vtkDataArray **Data;
00328
00329   int TupleSize; //used for type conversion
00330   float *Tuple;
00331
00333   void SetArray(int i, vtkDataArray *array);
00334
00335   virtual void RemoveArray(int index);
00336
00338   virtual void InitializeFields();
00339
00340 //BTX
00341
00342   struct CopyFieldFlag
00343   {
00344     char* ArrayName;
00345     int IsCopied;
00346   };
00347
00348   CopyFieldFlag* CopyFieldFlags; //the names of fields not to be copied
00349   int NumberOfFieldFlags; //the number of fields not to be copied
00350   void CopyFieldOnOff(const char* name, int onOff);
00351   void ClearFieldFlags();
00352   int FindFlag(const char* field);
00353   int GetFlag(const char* field);
00354   void CopyFlags(const vtkFieldData* source);
00355   int DoCopyAllOn;
00356   int DoCopyAllOff;
00357
00358
00359 private:
00360   vtkFieldData(const vtkFieldData&);  // Not implemented.
00361   void operator=(const vtkFieldData&);  // Not implemented.
00362
00363 public:
00364
00365   class VTK_COMMON_EXPORT BasicIterator
00366   {
00367   public:
00368     BasicIterator();
00369     BasicIterator(const BasicIterator& source);
00370     BasicIterator(const int* list, unsigned int listSize);
00371     BasicIterator& operator=(const BasicIterator& source);
00372     virtual ~BasicIterator();
00373
00374     int GetListSize() const
00375       {
00376         return this->ListSize;
00377       }
00378     int GetCurrentIndex()
00379       {
00380         return this->List[this->Position];
00381       }
00382     int BeginIndex()
00383       {
00384         this->Position = -1;
00385         return this->NextIndex();
00386       }
00387     int End() const
00388       {
00389         return (this->Position >= this->ListSize);
00390       }
00391     int NextIndex()
00392       {
00393         this->Position++;
00394         return (this->End() ? -1 : this->List[this->Position]);
00395       }
00396
00397   protected:
00398     int IsInList(int index);
00399
00400     int* List;
00401     int ListSize;
00402     int Position;
00403   };
00404
00405   class VTK_COMMON_EXPORT Iterator : public BasicIterator
00406   {
00407   public:
00408
00409     Iterator();
00410     Iterator(const Iterator& source);
00411     Iterator& operator=(const Iterator& source);
00412     virtual ~Iterator();
00413     Iterator(vtkFieldData* dsa, const int* list=0,
00414              unsigned int listSize=0);
00415
00416     vtkDataArray* Begin()
00417       {
00418         this->Position = -1;
00419         return this->Next();
00420       }
00421
00422     vtkDataArray* Next()
00423       {
00424         this->Position++;
00425         return (this->End() ? 0 :
00426                 Fields->GetArray(this->List[this->Position]));
00427       }
00428
00429     void DetachFieldData();
00430
00431   protected:
00432     vtkFieldData* Fields;
00433     int Detached;
00434   };
00435
00436
00437 //ETX
00438
00439 };
00440
00441
00442 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkFileOutputWindow.h Source File

Common/vtkFileOutputWindow.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkFileOutputWindow.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkFileOutputWindow_h
00055 #define __vtkFileOutputWindow_h
00056
00057 #include "vtkOutputWindow.h"
00058
00059
00060 class VTK_COMMON_EXPORT vtkFileOutputWindow : public vtkOutputWindow
00061 {
00062 public:
00063   vtkTypeMacro(vtkFileOutputWindow, vtkOutputWindow);
00064
00065   static vtkFileOutputWindow* New();
00066
00067   virtual void PrintSelf(ostream& os, vtkIndent indent);
00068
00070   virtual void DisplayText(const char*);
00071
00073   vtkSetStringMacro(FileName);
00074   vtkGetStringMacro(FileName);
00076
00078
00079   vtkSetMacro(Flush, int);
00080   vtkGetMacro(Flush, int);
00081   vtkBooleanMacro(Flush, int);
00083
00085
00087   vtkSetMacro(Append, int);
00088   vtkGetMacro(Append, int);
00089   vtkBooleanMacro(Append, int);
00091
00092  protected:
00093   vtkFileOutputWindow();
00094   virtual ~vtkFileOutputWindow();
00095   void Initialize();
00096   char* FileName;
00097   ofstream* OStream;
00098   int Flush;
00099   int Append;
00100 private:
00101   vtkFileOutputWindow(const vtkFileOutputWindow&);  // Not implemented.
00102   void operator=(const vtkFileOutputWindow&);  // Not implemented.
00103 };
00104
00105
00106
00107 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkFloatArray.h Source File

Common/vtkFloatArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkFloatArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkFloatArray_h
00058 #define __vtkFloatArray_h
00059
00060 #include "vtkDataArray.h"
00061
00062 class VTK_COMMON_EXPORT vtkFloatArray : public vtkDataArray
00063 {
00064 public:
00065   static vtkFloatArray *New();
00066   vtkTypeMacro(vtkFloatArray,vtkDataArray);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00071   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00072
00074   void Initialize();
00075
00077   vtkDataArray *MakeObject();
00078
00080
00081   int GetDataType()
00082     {return VTK_FLOAT;}
00084
00086   void SetNumberOfTuples(const vtkIdType number);
00087
00089   float *GetTuple(const vtkIdType i);
00090
00092
00093   void GetTuple(const vtkIdType i, float * tuple);
00094   void GetTuple(const vtkIdType i, double * tuple);
00096
00098
00099   void SetTuple(const vtkIdType i, const float * tuple);
00100   void SetTuple(const vtkIdType i, const double * tuple);
00102
00104
00106   void InsertTuple(const vtkIdType i, const float * tuple);
00107   void InsertTuple(const vtkIdType i, const double * tuple);
00109
00111
00113   vtkIdType InsertNextTuple(const float * tuple);
00114   vtkIdType InsertNextTuple(const double * tuple);
00116
00118   void Squeeze() {this->ResizeAndExtend(this->MaxId+1);};
00119
00121   virtual void Resize(vtkIdType numTuples);
00122
00126   float GetComponent(const vtkIdType i, const int j);
00127
00132   void SetComponent(const vtkIdType i, const int j, const float c);
00133
00137   void InsertComponent(const vtkIdType i, const int j, const float c);
00138
00140
00141   float GetValue(const vtkIdType id)
00142     {return this->Array[id];}
00144
00146
00148   void SetValue(const vtkIdType id, const float value)
00149     {this->Array[id] = value;}
00151
00155   void SetNumberOfValues(const vtkIdType number);
00156
00158   void InsertValue(const vtkIdType id, const float f);
00159
00162   vtkIdType InsertNextValue(const float f);
00163
00167   float *WritePointer(const vtkIdType id, const vtkIdType number);
00168
00170
00172   void *GetVoidPointer(const vtkIdType id)
00173     {return (void *)this->GetPointer(id);}
00174   float *GetPointer(const vtkIdType id)
00175     {return this->Array + id;}
00177
00179   void DeepCopy(vtkDataArray *fa);
00180
00182
00188   void SetArray(float* array, vtkIdType size, int save);
00189   void SetVoidArray(void *array, vtkIdType size, int save)
00190     {this->SetArray((float*)array, size, save);}
00192
00193
00194 protected:
00195   vtkFloatArray(vtkIdType numComp=1);
00196   ~vtkFloatArray();
00197
00198   float *Array;  // pointer to data
00199   float *ResizeAndExtend(const vtkIdType sz);  // function to reallocate data
00200
00201   int SaveUserArray;
00202 private:
00203   vtkFloatArray(const vtkFloatArray&);  // Not implemented.
00204   void operator=(const vtkFloatArray&);  // Not implemented.
00205 };
00206
00207 inline void vtkFloatArray::SetNumberOfValues(const vtkIdType number)
00208 {
00209   this->Allocate(number);
00210   this->MaxId = number - 1;
00211 }
00212
00213
00214 inline float *vtkFloatArray::WritePointer(const vtkIdType id,
00215                                           const vtkIdType number)
00216 {
00217   vtkIdType newSize=id+number;
00218   if ( newSize > this->Size )
00219     {
00220     this->ResizeAndExtend(newSize);
00221     }
00222   if ( (--newSize) > this->MaxId )
00223     {
00224     this->MaxId = newSize;
00225     }
00226   return this->Array + id;
00227 }
00228
00229 inline void vtkFloatArray::InsertValue(const vtkIdType id, const float f)
00230 {
00231   if ( id >= this->Size )
00232     {
00233     this->ResizeAndExtend(id+1);
00234     }
00235   this->Array[id] = f;
00236   if ( id > this->MaxId )
00237     {
00238     this->MaxId = id;
00239     }
00240 }
00241
00242 inline vtkIdType vtkFloatArray::InsertNextValue(const float f)
00243 {
00244   this->InsertValue (++this->MaxId,f);
00245   return this->MaxId;
00246 }
00247
00248 #endif
Generated on Thu Dec 20 01:04:17 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkFunctionParser.h Source File

Common/vtkFunctionParser.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkFunctionParser.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00051 #ifndef __vtkFunctionParser_h
00052 #define __vtkFunctionParser_h
00053
00054 #include "vtkObject.h"
00055
00056 #define VTK_PARSER_IMMEDIATE 1
00057 #define VTK_PARSER_UNARY_MINUS 2
00058
00059 // supported math functions
00060 #define VTK_PARSER_ADD 3
00061 #define VTK_PARSER_SUBTRACT 4
00062 #define VTK_PARSER_MULTIPLY 5
00063 #define VTK_PARSER_DIVIDE 6
00064 #define VTK_PARSER_POWER 7
00065 #define VTK_PARSER_ABSOLUTE_VALUE 8
00066 #define VTK_PARSER_EXPONENT 9
00067 #define VTK_PARSER_CEILING 10
00068 #define VTK_PARSER_FLOOR 11
00069 #define VTK_PARSER_LOGARITHM 12
00070 #define VTK_PARSER_SQUARE_ROOT 13
00071 #define VTK_PARSER_SINE 14
00072 #define VTK_PARSER_COSINE 15
00073 #define VTK_PARSER_TANGENT 16
00074 #define VTK_PARSER_ARCSINE 17
00075 #define VTK_PARSER_ARCCOSINE 18
00076 #define VTK_PARSER_ARCTANGENT 19
00077 #define VTK_PARSER_HYPERBOLIC_SINE 20
00078 #define VTK_PARSER_HYPERBOLIC_COSINE 21
00079 #define VTK_PARSER_HYPERBOLIC_TANGENT 22
00080
00081 // functions involving vectors
00082 #define VTK_PARSER_VECTOR_UNARY_MINUS 23
00083 #define VTK_PARSER_DOT_PRODUCT 24
00084 #define VTK_PARSER_VECTOR_ADD 25
00085 #define VTK_PARSER_VECTOR_SUBTRACT 26
00086 #define VTK_PARSER_SCALAR_MULTIPLE 27
00087 #define VTK_PARSER_MAGNITUDE 28
00088 #define VTK_PARSER_NORMALIZE 29
00089
00090 // codes for scalar variables come before those for vectors
00091 #define VTK_PARSER_BEGIN_VARIABLES 30
00092
00093 // the value that is retuned as a result if there is an error
00094 #define VTK_PARSER_ERROR_RESULT VTK_LARGE_FLOAT
00095
00096 class VTK_COMMON_EXPORT vtkFunctionParser : public vtkObject
00097 {
00098 public:
00099   static vtkFunctionParser *New();
00100   vtkTypeMacro(vtkFunctionParser, vtkObject);
00101   void PrintSelf(ostream& os, vtkIndent indent);
00102
00104
00105   void SetFunction(const char *function);
00106   vtkGetStringMacro(Function);
00108
00111   int IsScalarResult();
00112
00115   int IsVectorResult();
00116
00118   double GetScalarResult();
00119
00121
00122   double* GetVectorResult();
00123   void GetVectorResult(double result[3]) {
00124     double *r = this->GetVectorResult();
00125     result[0] = r[0]; result[1] = r[1]; result[2] = r[2]; };
00127
00129
00133   void SetScalarVariableValue(const char* variableName, double value);
00134   void SetScalarVariableValue(int i, double value);
00136
00138
00139   double GetScalarVariableValue(const char* variableName);
00140   double GetScalarVariableValue(int i);
00142
00144
00148   void SetVectorVariableValue(const char* variableName, double xValue,
00149                               double yValue, double zValue);
00150   void SetVectorVariableValue(const char* variableName,
00151                               const double values[3]) {
00152     this->SetVectorVariableValue(variableName,values[0],values[1],values[2]);};
00153   void SetVectorVariableValue(int i, double xValue, double yValue,
00154                               double zValue);
00155   void SetVectorVariableValue(int i, const double values[3]) {
00156     this->SetVectorVariableValue(i,values[0],values[1],values[2]);};
00158
00160
00161   double* GetVectorVariableValue(const char* variableName);
00162   void GetVectorVariableValue(const char* variableName, double value[3]) {
00163     double *r = this->GetVectorVariableValue(variableName);
00164     value[0] = r[0]; value[1] = r[1]; value[2] = r[2]; };
00165   double* GetVectorVariableValue(int i);
00166   void GetVectorVariableValue(int i, double value[3]) {
00167     double *r = this->GetVectorVariableValue(i);
00168     value[0] = r[0]; value[1] = r[1]; value[2] = r[2]; };
00170
00172
00173   vtkGetMacro(NumberOfScalarVariables,int);
00175
00177
00178   vtkGetMacro(NumberOfVectorVariables,int);
00180
00182   char* GetScalarVariableName(int i);
00183
00185   char* GetVectorVariableName(int i);
00186
00187 protected:
00188   vtkFunctionParser();
00189   ~vtkFunctionParser();
00190
00191   int Parse();
00192   void Evaluate();
00193
00194   int CheckSyntax();
00195   void RemoveSpaces();
00196
00197   int BuildInternalFunctionStructure();
00198   void BuildInternalSubstringStructure(int beginIndex, int endIndex);
00199   void AddInternalByte(unsigned char newByte);
00200
00201   int IsSubstringCompletelyEnclosed(int beginIndex, int endIndex);
00202   int FindEndOfMathFunction(int beginIndex);
00203
00204   int IsVariableName(int currentIndex);
00205   int IsElementaryOperator(int op);
00206
00207   int GetMathFunctionNumber(int currentIndex);
00208   int GetMathFunctionStringLength(int mathFunctionNumber);
00209   int GetElementaryOperatorNumber(char op);
00210   int GetOperandNumber(int currentIndex);
00211   int GetVariableNameLength(int variableNumber);
00212
00213   int DisambiguateOperators();
00214
00215   char* Function;
00216   int FunctionLength;
00217   int NumberOfScalarVariables;
00218   int NumberOfVectorVariables;
00219   char** ScalarVariableNames;
00220   char** VectorVariableNames;
00221   double* ScalarVariableValues;
00222   double** VectorVariableValues;
00223   unsigned char *ByteCode;
00224   int ByteCodeSize;
00225   double *Immediates;
00226   int ImmediatesSize;
00227   double *Stack;
00228   int StackSize;
00229   int StackPointer;
00230
00231   vtkTimeStamp FunctionMTime;
00232   vtkTimeStamp ParseMTime;
00233   vtkTimeStamp VariableMTime;
00234   vtkTimeStamp EvaluateMTime;
00235 private:
00236   vtkFunctionParser(const vtkFunctionParser&);  // Not implemented.
00237   void operator=(const vtkFunctionParser&);  // Not implemented.
00238 };
00239
00240 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkFunctionSet.h Source File

Common/vtkFunctionSet.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkFunctionSet.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkFunctionSet_h
00057 #define __vtkFunctionSet_h
00058
00059 #include "vtkObject.h"
00060
00061 class VTK_COMMON_EXPORT vtkFunctionSet : public vtkObject
00062 {
00063 public:
00064   vtkTypeMacro(vtkFunctionSet,vtkObject);
00065   virtual void PrintSelf(ostream& os, vtkIndent indent);
00066
00070   virtual int FunctionValues(float* x, float* f) = 0;
00071
00073
00075   virtual int GetNumberOfFunctions() {
00076     return this->NumFuncs; }
00078
00080
00083   virtual int GetNumberOfIndependentVariables() {
00084     return this->NumIndepVars; }
00086
00087 protected:
00088   vtkFunctionSet();
00089   ~vtkFunctionSet() {};
00090
00091   int NumFuncs;
00092   int NumIndepVars;
00093
00094 private:
00095   vtkFunctionSet(const vtkFunctionSet&);  // Not implemented.
00096   void operator=(const vtkFunctionSet&);  // Not implemented.
00097 };
00098
00099 #endif
00100
00101
00102
00103
00104
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkGeneralTransform.h Source File

Common/vtkGeneralTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGeneralTransform.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00060 #include "vtkAbstractTransform.h"
00061
00062 #ifndef __vtkGeneralTransform_h
00063 #define __vtkGeneralTransform_h
00064
00065 class VTK_COMMON_EXPORT vtkGeneralTransform : public vtkAbstractTransform
00066 {
00067 public:
00068   static vtkGeneralTransform *New();
00069
00070   vtkTypeMacro(vtkGeneralTransform,vtkAbstractTransform);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072
00076   void Identity() { this->Concatenation->Identity(); this->Modified(); };
00077
00081   void Inverse() { this->Concatenation->Inverse(); this->Modified(); };
00082
00084
00086   void Translate(double x, double y, double z) {
00087     this->Concatenation->Translate(x,y,z); };
00088   void Translate(const double x[3]) { this->Translate(x[0], x[1], x[2]); };
00089   void Translate(const float x[3]) { this->Translate(x[0], x[1], x[2]); };
00091
00093
00097   void RotateWXYZ(double angle, double x, double y, double z) {
00098     this->Concatenation->Rotate(angle,x,y,z); };
00099   void RotateWXYZ(double angle, const double axis[3]) {
00100     this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
00101   void RotateWXYZ(double angle, const float axis[3]) {
00102     this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
00104
00106
00109   void RotateX(double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
00110   void RotateY(double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
00111   void RotateZ(double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
00113
00115
00118   void Scale(double x, double y, double z) {
00119     this->Concatenation->Scale(x,y,z); };
00120   void Scale(const double s[3]) { this->Scale(s[0], s[1], s[2]); };
00121   void Scale(const float s[3]) { this->Scale(s[0], s[1], s[2]); };
00123
00125
00127   void Concatenate(vtkMatrix4x4 *matrix) {
00128     this->Concatenate(*matrix->Element); };
00129   void Concatenate(const double elements[16]) {
00130     this->Concatenation->Concatenate(elements); };
00132
00138   void Concatenate(vtkAbstractTransform *transform);
00139
00141
00146   void PreMultiply() {
00147     if (this->Concatenation->GetPreMultiplyFlag()) { return; }
00148     this->Concatenation->SetPreMultiplyFlag(1); this->Modified(); };
00150
00152
00157   void PostMultiply()  {
00158     if (!this->Concatenation->GetPreMultiplyFlag()) { return; }
00159     this->Concatenation->SetPreMultiplyFlag(0); this->Modified(); };
00161
00163
00165   int GetNumberOfConcatenatedTransforms() {
00166     return this->Concatenation->GetNumberOfTransforms() +
00167       (this->Input == NULL ? 0 : 1); };
00169
00171
00176   vtkAbstractTransform *GetConcatenatedTransform(int i) {
00177     if (this->Input == NULL) {
00178       return this->Concatenation->GetTransform(i); }
00179     else if (i < this->Concatenation->GetNumberOfPreTransforms()) {
00180       return this->Concatenation->GetTransform(i); }
00181     else if (i > this->Concatenation->GetNumberOfPreTransforms()) {
00182       return this->Concatenation->GetTransform(i-1); }
00183     else if (this->GetInverseFlag()) {
00184       return this->Input->GetInverse(); }
00185     else {
00186       return this->Input; } };
00188
00190
00196   void SetInput(vtkAbstractTransform *input);
00197   vtkAbstractTransform *GetInput() { return this->Input; };
00199
00201
00205   int GetInverseFlag() {
00206     return this->Concatenation->GetInverseFlag(); };
00208
00210
00211   void Push() { if (this->Stack == NULL) {
00212                     this->Stack = vtkTransformConcatenationStack::New(); }
00213                 this->Stack->Push(&this->Concatenation);
00214                 this->Modified(); };
00216
00218
00220   void Pop() { if (this->Stack == NULL) { return; }
00221                this->Stack->Pop(&this->Concatenation);
00222                this->Modified(); };
00224
00226
00228   void InternalTransformPoint(const float in[3], float out[3]);
00229   void InternalTransformPoint(const double in[3], double out[3]);
00231
00233
00235   void InternalTransformDerivative(const float in[3], float out[3],
00236                                    float derivative[3][3]);
00237   void InternalTransformDerivative(const double in[3], double out[3],
00238                                    double derivative[3][3]);
00240
00247   int CircuitCheck(vtkAbstractTransform *transform);
00248
00250   vtkAbstractTransform *MakeTransform();
00251
00253   unsigned long GetMTime();
00254
00255 protected:
00256   vtkGeneralTransform();
00257   ~vtkGeneralTransform();
00258
00259   void InternalDeepCopy(vtkAbstractTransform *t);
00260   void InternalUpdate();
00261
00262   vtkAbstractTransform *Input;
00263   vtkTransformConcatenation *Concatenation;
00264   vtkTransformConcatenationStack *Stack;
00265 private:
00266   vtkGeneralTransform(const vtkGeneralTransform&);  // Not implemented.
00267   void operator=(const vtkGeneralTransform&);  // Not implemented.
00268 };
00269
00270
00271 #endif
00272
00273
00274
00275
00276
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkGenericCell.h Source File

Common/vtkGenericCell.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGenericCell.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkGenericCell_h
00058 #define __vtkGenericCell_h
00059
00060 #include "vtkCell.h"
00061
00062 class VTK_COMMON_EXPORT vtkGenericCell : public vtkCell
00063 {
00064 public:
00066   static vtkGenericCell *New();
00067
00068   vtkTypeMacro(vtkGenericCell,vtkCell);
00069
00071
00072   vtkCell *MakeObject();
00073   void ShallowCopy(vtkCell *c);
00074   void DeepCopy(vtkCell *c);
00075   int GetCellType();
00076   int GetCellDimension();
00077   int GetInterpolationOrder();
00078   int GetNumberOfEdges();
00079   int GetNumberOfFaces();
00080   vtkCell *GetEdge(int edgeId);
00081   vtkCell *GetFace(int faceId);
00082   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00083   int EvaluatePosition(float x[3], float* closestPoint,
00084                        int& subId, float pcoords[3],
00085                        float& dist2, float *weights);
00086   void EvaluateLocation(int& subId, float pcoords[3],
00087                         float x[3], float *weights);
00088   void Contour(float value, vtkDataArray *cellScalars,
00089                vtkPointLocator *locator, vtkCellArray *verts,
00090                vtkCellArray *lines, vtkCellArray *polys,
00091                vtkPointData *inPd, vtkPointData *outPd,
00092                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00093   void Clip(float value, vtkDataArray *cellScalars,
00094             vtkPointLocator *locator, vtkCellArray *connectivity,
00095             vtkPointData *inPd, vtkPointData *outPd,
00096             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00097             int insideOut);
00098   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00099                         float x[3], float pcoords[3], int& subId);
00100   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00101   void Derivatives(int subId, float pcoords[3], float *values,
00102                    int dim, float *derivs);
00103   int GetParametricCenter(float pcoords[3]);
00105
00107
00112   void SetCellType(int cellType);
00113   void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
00114   void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
00115   void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
00116   void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
00117   void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
00118   void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
00119   void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
00120   void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
00121   void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
00122   void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
00123   void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
00124   void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
00125   void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
00126   void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
00127   void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
00129
00130 protected:
00131   vtkGenericCell();
00132   ~vtkGenericCell();
00133
00134   vtkCell *Cell;
00135
00136 private:
00137   vtkGenericCell(const vtkGenericCell&);  // Not implemented.
00138   void operator=(const vtkGenericCell&);  // Not implemented.
00139 };
00140
00141 #endif
00142
00143
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkHeap.h Source File

Common/vtkHeap.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHeap.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00065 #ifndef __vtkHeap_h
00066 #define __vtkHeap_h
00067
00068 #include "vtkObject.h"
00069
00070 //BTX
00071 class VTK_COMMON_EXPORT vtkHeapNode
00072 {
00073 public:
00074   void* Ptr;
00075   vtkHeapNode* Next;
00076   vtkHeapNode():Ptr(0),Next(0) {};
00077 };
00078 //ETX
00079
00080 class VTK_COMMON_EXPORT vtkHeap : public vtkObject
00081 {
00082 public:
00083   static vtkHeap *New();
00084   vtkTypeMacro(vtkHeap,vtkObject);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086
00088   void* AllocateMemory(size_t n);
00089
00091   char* StrDup(const char* str);
00092
00094
00095   vtkGetMacro(NumberOfAllocations,int);
00097
00098 protected:
00099   vtkHeap();
00100   ~vtkHeap();
00101
00102   void Add(vtkHeapNode* node);
00103   void CleanAll();
00104   vtkHeapNode* DeleteAndNext();
00105
00106   vtkHeapNode* First;
00107   vtkHeapNode* Last;
00108   vtkHeapNode* Current;
00109
00110   int NumberOfAllocations;
00111 private:
00112   vtkHeap(const vtkHeap&); // Not implemented.
00113   void operator=(const vtkHeap&);  // Not implemented.
00114 };
00115
00116 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkHexahedron.h Source File

Common/vtkHexahedron.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHexahedron.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkHexahedron_h
00057 #define __vtkHexahedron_h
00058
00059 #include "vtkCell3D.h"
00060 #include "vtkLine.h"
00061 #include "vtkQuad.h"
00062
00063 class VTK_COMMON_EXPORT vtkHexahedron : public vtkCell3D
00064 {
00065 public:
00066   static vtkHexahedron *New();
00067   vtkTypeMacro(vtkHexahedron,vtkCell);
00068
00070
00071   virtual void GetEdgePoints(int edgeId, int* &pts);
00072   virtual void GetFacePoints(int faceId, int* &pts);
00074
00076
00077   vtkCell *MakeObject();
00078   int GetCellType() {return VTK_HEXAHEDRON;}
00079   int GetNumberOfEdges() {return 12;}
00080   int GetNumberOfFaces() {return 6;}
00081   vtkCell *GetEdge(int edgeId);
00082   vtkCell *GetFace(int faceId);
00083   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00084   void Contour(float value, vtkDataArray *cellScalars,
00085                vtkPointLocator *locator, vtkCellArray *verts,
00086                vtkCellArray *lines, vtkCellArray *polys,
00087                vtkPointData *inPd, vtkPointData *outPd,
00088                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00090
00091   int EvaluatePosition(float x[3], float* closestPoint,
00092                        int& subId, float pcoords[3],
00093                        float& dist2, float *weights);
00094   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00095                         float *weights);
00096   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00097                         float x[3], float pcoords[3], int& subId);
00098   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00099   void Derivatives(int subId, float pcoords[3], float *values,
00100                    int dim, float *derivs);
00101
00103
00104   static void InterpolationFunctions(float pcoords[3], float weights[8]);
00105   static void InterpolationDerivs(float pcoords[3], float derivs[24]);
00106   static int *GetEdgeArray(int edgeId);
00107   static int *GetFaceArray(int faceId);
00109
00113   void JacobianInverse(float pcoords[3], double **inverse, float derivs[24]);
00114
00115 protected:
00116   vtkHexahedron();
00117   ~vtkHexahedron();
00118
00119   vtkLine *Line;
00120   vtkQuad *Quad;
00121
00122 private:
00123   vtkHexahedron(const vtkHexahedron&);  // Not implemented.
00124   void operator=(const vtkHexahedron&);  // Not implemented.
00125 };
00126
00127 #endif
00128
00129
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkHomogeneousTransform.h Source File

Common/vtkHomogeneousTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHomogeneousTransform.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00054 #ifndef __vtkHomogeneousTransform_h
00055 #define __vtkHomogeneousTransform_h
00056
00057 #include "vtkAbstractTransform.h"
00058 #include "vtkMatrix4x4.h"
00059
00060 class VTK_COMMON_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
00061 {
00062 public:
00063
00064   vtkTypeMacro(vtkHomogeneousTransform,vtkAbstractTransform);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00069   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00070
00072
00074   virtual void TransformPointsNormalsVectors(vtkPoints *inPts,
00075                                              vtkPoints *outPts,
00076                                              vtkDataArray *inNms,
00077                                              vtkDataArray *outNms,
00078                                              vtkDataArray *inVrs,
00079                                              vtkDataArray *outVrs);
00081
00084   void GetMatrix(vtkMatrix4x4 *m);
00085
00090   vtkMatrix4x4 *GetMatrix() { this->Update(); return this->Matrix; };
00091
00093
00095   vtkHomogeneousTransform *GetHomogeneousInverse() {
00096     return (vtkHomogeneousTransform *)this->GetInverse(); };
00098
00100
00102   void InternalTransformPoint(const float in[3], float out[3]);
00103   void InternalTransformPoint(const double in[3], double out[3]);
00105
00107
00109   void InternalTransformDerivative(const float in[3], float out[3],
00110                                    float derivative[3][3]);
00111   void InternalTransformDerivative(const double in[3], double out[3],
00112                                    double derivative[3][3]);
00114
00115 protected:
00116   vtkHomogeneousTransform();
00117   ~vtkHomogeneousTransform();
00118
00119   void InternalDeepCopy(vtkAbstractTransform *transform);
00120
00121   vtkMatrix4x4 *Matrix;
00122 private:
00123   vtkHomogeneousTransform(const vtkHomogeneousTransform&);  // Not implemented.
00124   void operator=(const vtkHomogeneousTransform&);  // Not implemented.
00125 };
00126
00127 #endif
00128
00129
00130
00131
00132
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkIdentityTransform.h Source File

Common/vtkIdentityTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIdentityTransform.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00057 #ifndef __vtkIdentityTransform_h
00058 #define __vtkIdentityTransform_h
00059
00060 #include "vtkLinearTransform.h"
00061
00062 class VTK_COMMON_EXPORT vtkIdentityTransform : public vtkLinearTransform
00063 {
00064 public:
00065   static vtkIdentityTransform *New();
00066
00067   vtkTypeMacro(vtkIdentityTransform,vtkLinearTransform);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069
00072   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00073
00076   void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms);
00077
00080   void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs);
00081
00083
00085   void TransformPointsNormalsVectors(vtkPoints *inPts,
00086                                      vtkPoints *outPts,
00087                                      vtkDataArray *inNms,
00088                                      vtkDataArray *outNms,
00089                                      vtkDataArray *inVrs,
00090                                      vtkDataArray *outVrs);
00092
00093   // Invert the transformation.  This doesn't do anything to the
00094   // identity transformation.
00095   void Inverse() {};
00096
00098
00100   void InternalTransformPoint(const float in[3], float out[3]);
00101   void InternalTransformPoint(const double in[3], double out[3]);
00103
00105
00107   void InternalTransformNormal(const float in[3], float out[3]);
00108   void InternalTransformNormal(const double in[3], double out[3]);
00110
00112
00114   void InternalTransformVector(const float in[3], float out[3]);
00115   void InternalTransformVector(const double in[3], double out[3]);
00117
00119
00121   void InternalTransformDerivative(const float in[3], float out[3],
00122                                    float derivative[3][3]);
00123   void InternalTransformDerivative(const double in[3], double out[3],
00124                                    double derivative[3][3]);
00126
00129   vtkAbstractTransform *MakeTransform();
00130
00131 protected:
00132   vtkIdentityTransform();
00133   ~vtkIdentityTransform();
00134
00135   void InternalDeepCopy(vtkAbstractTransform *t);
00136
00137 private:
00138   vtkIdentityTransform(const vtkIdentityTransform&);  // Not implemented.
00139   void operator=(const vtkIdentityTransform&);  // Not implemented.
00140 };
00141
00142 #endif
00143
00144
00145
00146
00147
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkIdList.h Source File

Common/vtkIdList.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIdList.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkIdList_h
00058 #define __vtkIdList_h
00059
00060 #include "vtkObject.h"
00061
00062 class VTK_COMMON_EXPORT vtkIdList : public vtkObject
00063 {
00064 public:
00065   static vtkIdList *New();
00066
00067   void Initialize();
00068   int Allocate(const int sz, const int strategy=0);
00069   vtkTypeMacro(vtkIdList,vtkObject);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071
00073   vtkIdType GetNumberOfIds() {return this->NumberOfIds;};
00074
00076   vtkIdType GetId(const int i) {return this->Ids[i];};
00077
00080   void SetNumberOfIds(const vtkIdType number);
00081
00085   void SetId(const vtkIdType i, const vtkIdType id) {this->Ids[i] = id;};
00086
00089   void InsertId(const vtkIdType i, const vtkIdType id);
00090
00093   vtkIdType InsertNextId(const vtkIdType id);
00094
00097   vtkIdType InsertUniqueId(const vtkIdType id);
00098
00100   vtkIdType *GetPointer(const vtkIdType i) {return this->Ids + i;};
00101
00105   vtkIdType *WritePointer(const vtkIdType i, const vtkIdType number);
00106
00108   void Reset() {this->NumberOfIds = 0;};
00109
00111   void Squeeze() {this->Resize(this->NumberOfIds);};
00112
00114   void DeepCopy(vtkIdList *ids);
00115
00118   void DeleteId(vtkIdType id);
00119
00122   vtkIdType IsId(vtkIdType id);
00123
00126   void IntersectWith(vtkIdList& otherIds);
00127
00128 protected:
00129   vtkIdList();
00130   ~vtkIdList();
00131
00132   vtkIdType NumberOfIds;
00133   vtkIdType Size;
00134   vtkIdType *Ids;
00135
00136   vtkIdType *Resize(const vtkIdType sz);
00137 private:
00138   vtkIdList(const vtkIdList&);  // Not implemented.
00139   void operator=(const vtkIdList&);  // Not implemented.
00140 };
00141
00142 // In-lined for performance
00143 inline vtkIdType vtkIdList::InsertNextId(const vtkIdType id)
00144 {
00145   if ( this->NumberOfIds >= this->Size )
00146     {
00147     this->Resize(this->NumberOfIds+1);
00148     }
00149   this->Ids[this->NumberOfIds++] = id;
00150   return this->NumberOfIds-1;
00151 }
00152
00153 inline vtkIdType vtkIdList::IsId(vtkIdType id)
00154 {
00155   vtkIdType *ptr, i;
00156   for (ptr=this->Ids, i=0; i<this->NumberOfIds; i++, ptr++)
00157     {
00158     if ( id == *ptr )
00159       {
00160       return i;
00161       }
00162     }
00163   return (-1);
00164 }
00165
00166 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkIdTypeArray.h Source File

Common/vtkIdTypeArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIdTypeArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkIdTypeArray_h
00055 #define __vtkIdTypeArray_h
00056
00057 #include "vtkDataArray.h"
00058
00059 class VTK_COMMON_EXPORT vtkIdTypeArray : public vtkDataArray
00060 {
00061 public:
00062   static vtkIdTypeArray *New();
00063
00064   vtkTypeMacro(vtkIdTypeArray, vtkDataArray);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00069   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00070
00072   void Initialize();
00073
00075   vtkDataArray *MakeObject();
00076
00078
00079   int GetDataType()
00080     {return VTK_ID_TYPE;}
00082
00084
00085   void Squeeze()
00086     {this->ResizeAndExtend (this->MaxId+1);}
00088
00090   virtual void Resize(vtkIdType numTuples);
00091
00093   void SetNumberOfTuples(const vtkIdType number);
00094
00097   float *GetTuple(const vtkIdType i);
00098
00100
00101   void GetTuple(const vtkIdType i, float * tuple);
00102   void GetTuple(const vtkIdType i, double * tuple);
00104
00106
00107   void SetTuple(const vtkIdType i, const float * tuple);
00108   void SetTuple(const vtkIdType i, const double * tuple);
00110
00112
00114   void InsertTuple(const vtkIdType i, const float * tuple);
00115   void InsertTuple(const vtkIdType i, const double * tuple);
00117
00119
00121   vtkIdType InsertNextTuple(const float * tuple);
00122   vtkIdType InsertNextTuple(const double * tuple);
00124
00126
00127   vtkIdType GetValue(const vtkIdType id)
00128     {return this->Array[id];}
00130
00132
00134   void SetValue(const vtkIdType id, const vtkIdType value)
00135     {this->Array[id] = value;}
00137
00141   void SetNumberOfValues(const vtkIdType number);
00142
00144   void InsertValue(const vtkIdType id, const vtkIdType i);
00145
00148   vtkIdType InsertNextValue(const vtkIdType i);
00149
00151
00153   vtkIdType *GetPointer(const vtkIdType id)
00154     {return this->Array + id;}
00155   void *GetVoidPointer(const vtkIdType id)
00156     {return (void *)this->GetPointer(id);}
00158
00162   vtkIdType *WritePointer(const vtkIdType id, const vtkIdType number);
00163
00165   void DeepCopy(vtkDataArray *ia);
00166
00168
00174   void SetArray(vtkIdType* array, vtkIdType size, int save);
00175   void SetVoidArray(void *array, vtkIdType size, int save)
00176     {this->SetArray((vtkIdType*)array, size, save);};
00178
00179 protected:
00180   vtkIdTypeArray(vtkIdType numComp=1);
00181   ~vtkIdTypeArray();
00182
00183   vtkIdType *Array;   // pointer to data
00184   vtkIdType *ResizeAndExtend(const vtkIdType sz);  // function to resize data
00185
00186   int TupleSize; //used for data conversion
00187   float *Tuple;
00188
00189   int SaveUserArray;
00190 private:
00191   vtkIdTypeArray(const vtkIdTypeArray&);  // Not implemented.
00192   void operator=(const vtkIdTypeArray&);  // Not implemented.
00193 };
00194
00195
00196 inline void vtkIdTypeArray::SetNumberOfValues(const vtkIdType number)
00197 {
00198   this->Allocate(number);
00199   this->MaxId = number - 1;
00200 }
00201
00202 inline vtkIdType *vtkIdTypeArray::WritePointer(const vtkIdType id,
00203                                                const vtkIdType number)
00204 {
00205   vtkIdType newSize=id+number;
00206   if ( newSize > this->Size )
00207     {
00208     this->ResizeAndExtend(newSize);
00209     }
00210   if ( (--newSize) > this->MaxId )
00211     {
00212     this->MaxId = newSize;
00213     }
00214   return this->Array + id;
00215 }
00216
00217 inline void vtkIdTypeArray::InsertValue(const vtkIdType id, const vtkIdType i)
00218 {
00219   if ( id >= this->Size )
00220     {
00221     this->ResizeAndExtend(id+1);
00222     }
00223   this->Array[id] = i;
00224   if ( id > this->MaxId )
00225     {
00226     this->MaxId = id;
00227     }
00228 }
00229
00230 inline vtkIdType vtkIdTypeArray::InsertNextValue(const vtkIdType i)
00231 {
00232   this->InsertValue (++this->MaxId,i);
00233   return this->MaxId;
00234 }
00235
00236
00237 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkImageData.h Source File

Common/vtkImageData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00058 #ifndef __vtkImageData_h
00059 #define __vtkImageData_h
00060
00061 #include "vtkDataSet.h"
00062 #include "vtkStructuredData.h"
00063 class vtkVertex;
00064 class vtkLine;
00065 class vtkPixel;
00066 class vtkVoxel;
00067
00068
00069 class VTK_COMMON_EXPORT vtkImageData : public vtkDataSet
00070 {
00071 public:
00072   static vtkImageData *New();
00073
00074   vtkTypeMacro(vtkImageData,vtkDataSet);
00075   void PrintSelf(ostream& os, vtkIndent indent);
00076
00078   vtkDataObject *MakeObject() {return vtkImageData::New();};
00079
00082   void CopyStructure(vtkDataSet *ds);
00083
00085   int GetDataObjectType() {return VTK_IMAGE_DATA;};
00086
00089   void UpdateData();
00090
00092
00093   vtkIdType GetNumberOfCells();
00094   vtkIdType GetNumberOfPoints();
00095   float *GetPoint(vtkIdType ptId);
00096   void GetPoint(vtkIdType id, float x[3]);
00097   vtkCell *GetCell(vtkIdType cellId);
00098   void GetCell(vtkIdType cellId, vtkGenericCell *cell);
00099   void GetCellBounds(vtkIdType cellId, float bounds[6]);
00100   vtkIdType FindPoint(float x, float y, float z) { return this->vtkDataSet::FindPoint(x, y, z);};
00101   vtkIdType FindPoint(float x[3]);
00102   vtkIdType FindCell(float x[3], vtkCell *cell, vtkIdType cellId, float tol2,
00103                      int& subId, float pcoords[3], float *weights);
00104   vtkIdType FindCell(float x[3], vtkCell *cell, vtkGenericCell *gencell,
00105                      vtkIdType cellId, float tol2, int& subId,
00106                      float pcoords[3], float *weights);
00107   vtkCell *FindAndGetCell(float x[3], vtkCell *cell, vtkIdType cellId,
00108                           float tol2, int& subId, float pcoords[3],
00109                           float *weights);
00110   int GetCellType(vtkIdType cellId);
00111   void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)
00112     {vtkStructuredData::GetCellPoints(cellId,ptIds,this->DataDescription,
00113                                       this->GetDimensions());}
00114   void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)
00115     {vtkStructuredData::GetPointCells(ptId,cellIds,this->GetDimensions());}
00116   void ComputeBounds();
00117   int GetMaxCellSize() {return 8;}; //voxel is the largest
00119
00121   void SetDimensions(int i, int j, int k);
00122
00124   void SetDimensions(int dims[3]);
00125
00127
00129   int *GetDimensions();
00130   void GetDimensions(int dims[3]);
00132
00138   int ComputeStructuredCoordinates(float x[3], int ijk[3], float pcoords[3]);
00139
00148   void GetVoxelGradient(int i,int j,int k, vtkDataArray *s, vtkDataArray *g);
00149
00155   void GetPointGradient(int i, int j, int k, vtkDataArray *s, float g[3]);
00156
00158   int GetDataDimension();
00159
00161
00163   vtkIdType ComputePointId(int ijk[3]) {
00164     return vtkStructuredData::ComputePointId(this->GetDimensions(),ijk);};
00166
00168
00170   vtkIdType ComputeCellId(int ijk[3]) {
00171     return vtkStructuredData::ComputeCellId(this->GetDimensions(),ijk);};
00173
00175
00176   void SetAxisUpdateExtent(int axis, int min, int max);
00177   void GetAxisUpdateExtent(int axis, int &min, int &max);
00179
00181
00184   void SetUpdateExtent(int piece, int numPieces, int ghostLevel);
00185   void SetUpdateExtent(int piece, int numPieces)
00186     {this->SetUpdateExtent(piece, numPieces, 0);}
00188
00190
00191   void SetUpdateExtent( int x1, int x2, int y1, int y2, int z1, int z2 )
00192     { this->vtkDataSet::SetUpdateExtent( x1, x2, y1, y2, z1, z2 ); };
00193   void SetUpdateExtent( int ext[6] )
00194     { this->vtkDataSet::SetUpdateExtent( ext ); };
00196
00198
00201   void SetExtent(int extent[6]);
00202   void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
00203   vtkGetVector6Macro(Extent,int);
00205
00210   virtual unsigned long GetEstimatedMemorySize();
00211
00213
00215   double GetScalarTypeMin();
00216   double GetScalarTypeMax();
00218
00220   int GetScalarSize();
00221
00223
00226   int *GetIncrements();
00227   void GetIncrements(int &incX, int &incY, int &incZ);
00228   void GetIncrements(int inc[3]);
00230
00240   void GetContinuousIncrements(int extent[6], int &incX, int &incY, int &incZ);
00241
00243
00244   void *GetScalarPointerForExtent(int extent[6]);
00245   void *GetScalarPointer(int coordinates[3]);
00246   void *GetScalarPointer(int x, int y, int z);
00247   void *GetScalarPointer();
00249
00251   float GetScalarComponentAsFloat(int x, int y, int z, int component);
00252
00254   void AllocateScalars();
00255
00257
00261   void CopyAndCastFrom(vtkImageData *inData, int extent[6]);
00262   void CopyAndCastFrom(vtkImageData *inData, int x0, int x1,
00263                        int y0, int y1, int z0, int z1)
00264     {int e[6]; e[0]=x0; e[1]=x1; e[2]=y0; e[3]=y1; e[4]=z0; e[5]=z1;
00265     this->CopyAndCastFrom(inData, e);}
00267
00271   virtual void Crop();
00272
00278   unsigned long GetActualMemorySize();
00279
00281
00283   vtkSetVector3Macro(Spacing,float);
00284   vtkGetVector3Macro(Spacing,float);
00286
00288
00290   vtkSetVector3Macro(Origin,float);
00291   vtkGetVector3Macro(Origin,float);
00293
00295
00296   void SetScalarTypeToFloat(){this->SetScalarType(VTK_FLOAT);};
00297   void SetScalarTypeToDouble(){this->SetScalarType(VTK_DOUBLE);};
00298   void SetScalarTypeToInt(){this->SetScalarType(VTK_INT);};
00299   void SetScalarTypeToUnsignedInt()
00300     {this->SetScalarType(VTK_UNSIGNED_INT);};
00301   void SetScalarTypeToLong(){this->SetScalarType(VTK_LONG);};
00302   void SetScalarTypeToUnsignedLong()
00303     {this->SetScalarType(VTK_UNSIGNED_LONG);};
00304   void SetScalarTypeToShort(){this->SetScalarType(VTK_SHORT);};
00305   void SetScalarTypeToUnsignedShort()
00306     {this->SetScalarType(VTK_UNSIGNED_SHORT);};
00307   void SetScalarTypeToUnsignedChar()
00308     {this->SetScalarType(VTK_UNSIGNED_CHAR);};
00309   void SetScalarTypeToChar()
00310     {this->SetScalarType(VTK_CHAR);};
00311   vtkSetMacro(ScalarType, int);
00312   int GetScalarType();
00314
00316
00317   void SetNumberOfScalarComponents( int n );
00318   vtkGetMacro(NumberOfScalarComponents,int);
00320
00321   // Must only be called with vtkImageData (or subclass) as input
00322   void CopyTypeSpecificInformation( vtkDataObject *image );
00323
00327   virtual void PrepareForNewData();
00328
00330
00331   void ShallowCopy(vtkDataObject *src);
00332   void DeepCopy(vtkDataObject *src);
00334
00335   //--------------------------------------------------------------------------
00336   // Methods that apply to any array (not just scalars).
00337   // I am starting to experiment with generalizing imaging fitlers
00338   // to operate on more than just scalars.
00339
00341
00344   void *GetArrayPointerForExtent(vtkDataArray* array, int extent[6]);
00345   void *GetArrayPointer(vtkDataArray* array, int coordinates[3]);
00347
00350   void GetArrayIncrements(vtkDataArray *array, int increments[3]);
00351
00352 protected:
00353   vtkImageData();
00354   ~vtkImageData();
00355
00356   // for the GetCell method
00357   vtkVertex *Vertex;
00358   vtkLine *Line;
00359   vtkPixel *Pixel;
00360   vtkVoxel *Voxel;
00361
00362   // The extent type is a 3D extent
00363   int GetExtentType() { return VTK_3D_EXTENT; };
00364
00365   // The extent of what is currently in the structured grid.
00366   // Dimensions is just an array to return a value.
00367   // Its contents are out of data until GetDimensions is called.
00368   int Dimensions[3];
00369   int DataDescription;
00370   int Increments[3];
00371
00372   float Origin[3];
00373   float Spacing[3];
00374   int ScalarType;
00375   int NumberOfScalarComponents;
00376
00377   void ComputeIncrements();
00378
00379 private:
00380   void InternalImageDataCopy(vtkImageData *src);
00381 private:
00382   vtkImageData(const vtkImageData&);  // Not implemented.
00383   void operator=(const vtkImageData&);  // Not implemented.
00384 };
00385
00386
00387 inline void vtkImageData::GetPoint(vtkIdType id, float x[3])
00388 {
00389   float *p=this->GetPoint(id);
00390   x[0] = p[0]; x[1] = p[1]; x[2] = p[2];
00391 }
00392
00393
00394
00395 inline vtkIdType vtkImageData::GetNumberOfPoints()
00396 {
00397   int *dims = this->GetDimensions();
00398   return dims[0]*dims[1]*dims[2];
00399 }
00400
00401 inline int vtkImageData::GetDataDimension()
00402 {
00403   return vtkStructuredData::GetDataDimension(this->DataDescription);
00404 }
00405
00406 #endif
00407
00408
00409
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkImageIterator.h Source File

Common/vtkImageIterator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageIterator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00053 #ifndef __vtkImageIterator_h
00054 #define __vtkImageIterator_h
00055
00056 #include "vtkWin32Header.h"
00057 class vtkImageData;
00058
00059 template<typename DType> class VTK_COMMON_EXPORT vtkImageIterator
00060 {
00061 public:
00062   typedef DType *SpanIterator;
00063
00065   vtkImageIterator(vtkImageData *id, int *ext);
00066
00068   void NextSpan();
00069
00071
00072   SpanIterator BeginSpan()
00073     {
00074       return this->Pointer;
00075     }
00077
00079
00080   SpanIterator EndSpan()
00081     {
00082       return this->SpanEndPointer;
00083     }
00085
00087
00088   bool IsAtEnd()
00089     {
00090     return (this->Pointer >= this->EndPointer);
00091     }
00093
00094 protected:
00095   DType *Pointer;
00096   DType *SpanEndPointer;
00097   DType *SliceEndPointer;
00098   DType *EndPointer;
00099   int    Increments[3];
00100   int    ContinuousIncrements[3];
00101 };
00102
00103 #ifdef CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION
00104 // include the code
00105 #include "vtkImageIterator.cxx"
00106 #endif
00107
00108 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkImageProgressIterator.h Source File

Common/vtkImageProgressIterator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageProgressIterator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00053 #ifndef __vtkImageProgressIterator_h
00054 #define __vtkImageProgressIterator_h
00055
00056 #include "vtkImageIterator.h"
00057 class vtkProcessObject;
00058
00059 template<typename DType> class VTK_COMMON_EXPORT vtkImageProgressIterator :
00060   public vtkImageIterator<DType>
00061 {
00062 public:
00063
00065
00068   vtkImageProgressIterator(vtkImageData *imgd, int *ext,
00069                            vtkProcessObject *po, int id);
00071
00074   void NextSpan();
00075
00076 protected:
00077   vtkProcessObject *ProcessObject;
00078   unsigned long     Count;
00079   unsigned long     Count2;
00080   unsigned long     Target;
00081   int               ID;
00082 };
00083
00084 #ifdef CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION
00085 // include the code
00086 #include "vtkImageProgressIterator.cxx"
00087 #endif
00088
00089 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkImplicitFunction.h Source File

Common/vtkImplicitFunction.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitFunction.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00073 #ifndef __vtkImplicitFunction_h
00074 #define __vtkImplicitFunction_h
00075
00076 #include "vtkObject.h"
00077 #include "vtkAbstractTransform.h"
00078
00079 class VTK_COMMON_EXPORT vtkImplicitFunction : public vtkObject
00080 {
00081 public:
00082   vtkTypeMacro(vtkImplicitFunction,vtkObject);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084
00087   unsigned long GetMTime();
00088
00090
00092   float FunctionValue(const float x[3]);
00093   float FunctionValue(float x, float y, float z) {
00094     float xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
00096
00098
00100   void FunctionGradient(const float x[3], float g[3]);
00101   float *FunctionGradient(const float x[3]) {
00102     this->FunctionGradient(x,this->ReturnValue);
00103     return this->ReturnValue; };
00104   float *FunctionGradient(float x, float y, float z) {
00105     float xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
00107
00109
00111   vtkSetObjectMacro(Transform,vtkAbstractTransform);
00112   vtkGetObjectMacro(Transform,vtkAbstractTransform);
00114
00116
00120   virtual float EvaluateFunction(float x[3]) = 0;
00121   float EvaluateFunction(float x, float y, float z) {
00122     float xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
00124
00129   virtual void EvaluateGradient(float x[3], float g[3]) = 0;
00130
00131 protected:
00132   vtkImplicitFunction();
00133   ~vtkImplicitFunction();
00134
00135   vtkAbstractTransform *Transform;
00136   float ReturnValue[3];
00137 private:
00138   vtkImplicitFunction(const vtkImplicitFunction&);  // Not implemented.
00139   void operator=(const vtkImplicitFunction&);  // Not implemented.
00140 };
00141
00142 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkImplicitFunctionCollection.h Source File

Common/vtkImplicitFunctionCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitFunctionCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkImplicitFunctionCollection_h
00053 #define __vtkImplicitFunctionCollection_h
00054
00055 #include "vtkCollection.h"
00056 #include "vtkImplicitFunction.h"
00057
00058 class VTK_COMMON_EXPORT vtkImplicitFunctionCollection : public vtkCollection
00059 {
00060 public:
00061   vtkTypeMacro(vtkImplicitFunctionCollection,vtkCollection);
00062   static vtkImplicitFunctionCollection *New();
00063
00065   void AddItem(vtkImplicitFunction *);
00066
00068   vtkImplicitFunction *GetNextItem();
00069
00070 protected:
00071   vtkImplicitFunctionCollection() {};
00072   ~vtkImplicitFunctionCollection() {};
00073
00074
00075 private:
00076   // hide the standard AddItem from the user and the compiler.
00077   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00078
00079 private:
00080   vtkImplicitFunctionCollection(const vtkImplicitFunctionCollection&);  // Not implemented.
00081   void operator=(const vtkImplicitFunctionCollection&);  // Not implemented.
00082 };
00083
00084 inline void vtkImplicitFunctionCollection::AddItem(vtkImplicitFunction *f)
00085 {
00086   this->vtkCollection::AddItem((vtkObject *)f);
00087 }
00088
00089 inline vtkImplicitFunction *vtkImplicitFunctionCollection::GetNextItem()
00090 {
00091   return static_cast<vtkImplicitFunction *>(this->GetNextItemAsObject());
00092 }
00093
00094 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkIndent.h Source File

Common/vtkIndent.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIndent.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00057 #ifndef __vtkIndent_h
00058 #define __vtkIndent_h
00059
00060 #include "vtkWin32Header.h"
00061 #include "vtkSystemIncludes.h"
00062
00063 class VTK_COMMON_EXPORT vtkIndent
00064 {
00065 public:
00066   void Delete() {delete this;};
00067   vtkIndent(int ind=0) {this->Indent=ind;};
00068   static vtkIndent *New();
00069
00070   virtual const char *GetClassName() {return "vtkIndent";};
00071
00074   vtkIndent GetNextIndent();
00075
00076   //BTX
00078   /*! Print out the indentation. Basically output a bunch of spaces. */
00079   friend VTK_COMMON_EXPORT ostream& operator<<(ostream& os, vtkIndent& o);
00080   //ETX
00082
00083 protected:
00084   int Indent;
00085
00086 };
00087
00088 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkInitialValueProblemSolver.h Source File

Common/vtkInitialValueProblemSolver.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInitialValueProblemSolver.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00059 #ifndef __vtkInitialValueProblemSolver_h
00060 #define __vtkInitialValueProblemSolver_h
00061
00062 #include "vtkFunctionSet.h"
00063
00064 class VTK_COMMON_EXPORT vtkInitialValueProblemSolver : public vtkObject
00065 {
00066 public:
00067   vtkTypeMacro(vtkInitialValueProblemSolver,vtkObject);
00068   virtual void PrintSelf(ostream& os, vtkIndent indent);
00069
00071
00075   virtual float ComputeNextStep(float* xprev, float* xnext, float t,
00076                                 float delT)
00077     {
00078       return this->ComputeNextStep(xprev, 0, xnext, t, delT);
00079     }
00080   virtual float ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00081                                 float t, float delT) = 0;
00083
00085   virtual vtkInitialValueProblemSolver *MakeObject()=0;
00086
00088
00089   virtual void SetFunctionSet(vtkFunctionSet* functionset);
00090   vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
00092
00093 protected:
00094   vtkInitialValueProblemSolver();
00095   ~vtkInitialValueProblemSolver();
00096
00097   virtual void Initialize();
00098
00099   vtkFunctionSet* FunctionSet;
00100
00101   float* Vals;
00102   float* Derivs;
00103   int Initialized;
00104 private:
00105   vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&);  // Not implemented.
00106   void operator=(const vtkInitialValueProblemSolver&);  // Not implemented.
00107 };
00108
00109 #endif
00110
00111
00112
00113
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkInstantiator.h Source File

Common/vtkInstantiator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInstantiator.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00082 #ifndef __vtkInstantiator_h
00083 #define __vtkInstantiator_h
00084
00085 #include "vtkObject.h"
00086
00087 class vtkInstantiatorInitialize;
00088 class vtkInstantiatorHashTable;
00089
00090 class VTK_COMMON_EXPORT vtkInstantiator : public vtkObject
00091 {
00092 public:
00093   static vtkInstantiator* New();
00094   vtkTypeMacro(vtkInstantiator,vtkObject);
00095   void PrintSelf(ostream& os, vtkIndent indent);
00096
00099   static vtkObject* CreateInstance(const char* className);
00100
00101   //BTX
00102   typedef vtkObject* (*CreateFunction)();
00103
00105
00109   static void RegisterInstantiator(const char* className,
00110                                    CreateFunction createFunction);
00112
00114
00117   static void UnRegisterInstantiator(const char* className,
00118                                      CreateFunction createFunction);
00119   //ETX
00121
00122 protected:
00123   vtkInstantiator();
00124   ~vtkInstantiator();
00125
00126   // Internal storage for registered creation functions.
00127   static vtkInstantiatorHashTable* CreatorTable;
00128
00129   static void ClassInitialize();
00130   static void ClassFinalize();
00131
00132   //BTX
00133   friend class vtkInstantiatorInitialize;
00134   //ETX
00135
00136 private:
00137   vtkInstantiator(const vtkInstantiator&);  // Not implemented.
00138   void operator=(const vtkInstantiator&);  // Not implemented.
00139 };
00140
00141 //BTX
00142 // Utility class to make sure vtkInstantiator is initialized before it
00143 // is used.
00144 class VTK_COMMON_EXPORT vtkInstantiatorInitialize
00145 {
00146 public:
00147   vtkInstantiatorInitialize();
00148   ~vtkInstantiatorInitialize();
00149 private:
00150   static unsigned int Count;
00151 };
00152
00153 // This instance will show up in any translation unit that uses
00154 // vtkInstantiator.  It will make sure vtkInstantiator is initialized
00155 // before it is used.
00156 static vtkInstantiatorInitialize vtkInstantiatorInitializer;
00157 //ETX
00158
00159 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkIntArray.h Source File

Common/vtkIntArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIntArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkIntArray_h
00058 #define __vtkIntArray_h
00059
00060 #include "vtkDataArray.h"
00061
00062 class VTK_COMMON_EXPORT vtkIntArray : public vtkDataArray
00063 {
00064 public:
00065   static vtkIntArray *New();
00066
00067   vtkTypeMacro(vtkIntArray,vtkDataArray);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069
00072   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00073
00075   void Initialize();
00076
00078   vtkDataArray *MakeObject();
00079
00081
00082   int GetDataType()
00083     {return VTK_INT;}
00085
00087
00088   void Squeeze()
00089     {this->ResizeAndExtend (this->MaxId+1);}
00091
00093   virtual void Resize(vtkIdType numTuples);
00094
00096   void SetNumberOfTuples(const vtkIdType number);
00097
00100   float *GetTuple(const vtkIdType i);
00101
00103
00104   void GetTuple(const vtkIdType i, float * tuple);
00105   void GetTuple(const vtkIdType i, double * tuple);
00107
00109
00110   void SetTuple(const vtkIdType i, const float * tuple);
00111   void SetTuple(const vtkIdType i, const double * tuple);
00113
00115
00117   void InsertTuple(const vtkIdType i, const float * tuple);
00118   void InsertTuple(const vtkIdType i, const double * tuple);
00120
00122
00124   vtkIdType InsertNextTuple(const float * tuple);
00125   vtkIdType InsertNextTuple(const double * tuple);
00127
00129
00130   int GetValue(const vtkIdType id)
00131     {return this->Array[id];}
00133
00135
00137   void SetValue(const vtkIdType id, const int value)
00138     {this->Array[id] = value;}
00140
00144   void SetNumberOfValues(const vtkIdType number);
00145
00147   void InsertValue(const vtkIdType id, const int i);
00148
00151   vtkIdType InsertNextValue(const int i);
00152
00156   virtual void InsertComponent(const vtkIdType i, const int j, const float c);
00157
00159
00161   int *GetPointer(const vtkIdType id)
00162     {return this->Array + id;}
00163   void *GetVoidPointer(const vtkIdType id)
00164     {return (void *)this->GetPointer(id);}
00166
00170   int *WritePointer(const vtkIdType id, const vtkIdType number);
00171
00173   void DeepCopy(vtkDataArray *ia);
00174
00176
00182   void SetArray(int* array, vtkIdType size, int save);
00183   void SetVoidArray(void *array,vtkIdType size, int save)
00184     {this->SetArray((int*)array, size, save);};
00186
00187 protected:
00188   vtkIntArray(vtkIdType numComp=1);
00189   ~vtkIntArray();
00190
00191   int *Array;   // pointer to data
00192   int *ResizeAndExtend(const vtkIdType sz);  // function to resize data
00193
00194   int TupleSize; //used for data conversion
00195   float *Tuple;
00196
00197   int SaveUserArray;
00198 private:
00199   vtkIntArray(const vtkIntArray&);  // Not implemented.
00200   void operator=(const vtkIntArray&);  // Not implemented.
00201 };
00202
00203
00204 inline void vtkIntArray::SetNumberOfValues(const vtkIdType number)
00205 {
00206   this->Allocate(number);
00207   this->MaxId = number - 1;
00208 }
00209
00210 inline int *vtkIntArray::WritePointer(const vtkIdType id,
00211                                       const vtkIdType number)
00212 {
00213   vtkIdType newSize=id+number;
00214   if ( newSize > this->Size )
00215     {
00216     this->ResizeAndExtend(newSize);
00217     }
00218   if ( (--newSize) > this->MaxId )
00219     {
00220     this->MaxId = newSize;
00221     }
00222   return this->Array + id;
00223 }
00224
00225 inline void vtkIntArray::InsertValue(const vtkIdType id, const int i)
00226 {
00227   if ( id >= this->Size )
00228     {
00229     this->ResizeAndExtend(id+1);
00230     }
00231   this->Array[id] = i;
00232   if ( id > this->MaxId )
00233     {
00234     this->MaxId = id;
00235     }
00236 }
00237
00238 inline vtkIdType vtkIntArray::InsertNextValue(const int i)
00239 {
00240   this->InsertValue (++this->MaxId,i);
00241   return this->MaxId;
00242 }
00243
00244
00245 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkInterpolatedVelocityField.h Source File

Common/vtkInterpolatedVelocityField.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInterpolatedVelocityField.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00068 #ifndef __vtkInterpolatedVelocityField_h
00069 #define __vtkInterpolatedVelocityField_h
00070
00071 #include "vtkFunctionSet.h"
00072 #include "vtkDataSet.h"
00073 #include "vtkGenericCell.h"
00074
00075 class VTK_COMMON_EXPORT vtkInterpolatedVelocityField : public vtkFunctionSet
00076 {
00077 public:
00078   vtkTypeMacro(vtkInterpolatedVelocityField,vtkFunctionSet);
00079   virtual void PrintSelf(ostream& os, vtkIndent indent);
00080
00083   static vtkInterpolatedVelocityField *New();
00084
00087   virtual int FunctionValues(float* x, float* f);
00088
00090
00091   virtual void SetDataSet(vtkDataSet* dataset);
00092   vtkGetObjectMacro(DataSet,vtkDataSet);
00094
00096
00097   vtkGetMacro(LastCellId, vtkIdType);
00098   vtkSetMacro(LastCellId, vtkIdType);
00100
00103   void ClearLastCellId() { this->LastCellId = -1; }
00104
00106
00109   int GetLastWeights(float* w);
00110   int GetLastLocalCoordinates(float pcoords[3]);
00112
00114
00115   vtkGetMacro(Caching, int);
00116   vtkSetMacro(Caching, int);
00117   vtkBooleanMacro(Caching, int);
00119
00121
00122   vtkGetMacro(CacheHit, int);
00123   vtkGetMacro(CacheMiss, int);
00125
00126 protected:
00127   vtkInterpolatedVelocityField();
00128   ~vtkInterpolatedVelocityField();
00129
00130   vtkDataSet* DataSet;
00131   vtkGenericCell* GenCell; // last cell
00132   vtkGenericCell* Cell;
00133   float* Weights; // last weights
00134   float LastPCoords[3]; // last local coordinates
00135   vtkIdType LastCellId;
00136   int CacheHit;
00137   int CacheMiss;
00138   int Caching;
00139 private:
00140   vtkInterpolatedVelocityField(const vtkInterpolatedVelocityField&);  // Not implemented.
00141   void operator=(const vtkInterpolatedVelocityField&);  // Not implemented.
00142 };
00143
00144 #endif
00145
00146
00147
00148
00149
00150
00151
00152
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkJavaAwt.h Source File

Common/vtkJavaAwt.h

00001 // only do this when JAWT is to be used
00002 #include "jawt_md.h"
00003
00004 extern "C" JNIEXPORT void  JNICALL
00005     Java_vtkPanel_RenderCreate(JNIEnv *env, jobject canvas, jobject id0)
00006 {
00007   JAWT awt;
00008   JAWT_DrawingSurface* ds;
00009   JAWT_DrawingSurfaceInfo* dsi;
00010   jint lock;
00011
00012   // get the render window pointer
00013   vtkRenderWindow *temp0;
00014   temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,id0,(char *) "vtkRenderWindow"));
00015
00016   /* Get the AWT */
00017   awt.version = JAWT_VERSION_1_3;
00018   if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
00019     {
00020     printf("AWT Not found\n");
00021     return;
00022     }
00023
00024   /* Get the drawing surface */
00025   ds = awt.GetDrawingSurface(env, canvas);
00026   if (ds == NULL)
00027     {
00028     printf("NULL drawing surface\n");
00029     return;
00030     }
00031
00032   /* Lock the drawing surface */
00033   lock = ds->Lock(ds);
00034   if((lock & JAWT_LOCK_ERROR) != 0)
00035     {
00036     printf("Error locking surface\n");
00037     awt.FreeDrawingSurface(ds);
00038     return;
00039     }
00040
00041   /* Get the drawing surface info */
00042   dsi = ds->GetDrawingSurfaceInfo(ds);
00043   if (dsi == NULL)
00044     {
00045     printf("Error getting surface info\n");
00046     ds->Unlock(ds);
00047     awt.FreeDrawingSurface(ds);
00048     return;
00049     }
00050
00051 // Here is the win32 drawing code
00052 #if defined(_WIN32) || defined(WIN32)
00053   JAWT_Win32DrawingSurfaceInfo* dsi_win;
00054   dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
00055   temp0->SetWindowId((void *)dsi_win->hwnd);
00056
00057 // otherwise use X11 code
00058 #else
00059   JAWT_X11DrawingSurfaceInfo* dsi_x11;
00060   dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi->platformInfo;
00061   temp0->SetDisplayId((void *)dsi_x11->display);
00062   temp0->SetWindowId((void *)dsi_x11->drawable);
00063 #endif
00064
00065   temp0->Render();
00066
00067   /* Free the drawing surface info */
00068   ds->FreeDrawingSurfaceInfo(dsi);
00069
00070   /* Unlock the drawing surface */
00071   ds->Unlock(ds);
00072
00073   /* Free the drawing surface */
00074   awt.FreeDrawingSurface(ds);
00075 }
00076
00077 extern "C" JNIEXPORT void  JNICALL
00078     Java_vtkPanel_RenderInternal(JNIEnv *env, jobject canvas, jobject id0)
00079 {
00080   JAWT awt;
00081   JAWT_DrawingSurface* ds;
00082   jint lock;
00083
00084   // get the render window pointer
00085   vtkRenderWindow *temp0;
00086   temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,id0,(char *) "vtkRenderWindow"));
00087
00088   /* Get the AWT */
00089   awt.version = JAWT_VERSION_1_3;
00090   if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
00091     {
00092     printf("AWT Not found\n");
00093     return;
00094     }
00095
00096   /* Get the drawing surface */
00097   ds = awt.GetDrawingSurface(env, canvas);
00098   if (ds == NULL)
00099     {
00100     printf("NULL drawing surface\n");
00101     return;
00102     }
00103
00104   /* Lock the drawing surface */
00105   lock = ds->Lock(ds);
00106   if((lock & JAWT_LOCK_ERROR) != 0)
00107     {
00108     printf("Error locking surface\n");
00109     awt.FreeDrawingSurface(ds);
00110     return;
00111     }
00112
00113   temp0->Render();
00114
00115   /* Unlock the drawing surface */
00116   ds->Unlock(ds);
00117
00118   /* Free the drawing surface */
00119   awt.FreeDrawingSurface(ds);
00120 }
00121
00122 extern "C" JNIEXPORT void  JNICALL
00123     Java_vtkPanel_SetSizeInternal(JNIEnv *env,
00124                                   jobject canvas,
00125                                   jobject id0, jint id1,jint id2)
00126 {
00127   JAWT awt;
00128   JAWT_DrawingSurface* ds;
00129   jint lock;
00130
00131   // get the render window pointer
00132   vtkRenderWindow *temp0;
00133   temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,id0,(char *) "vtkRenderWindow"));
00134
00135   /* Get the AWT */
00136   awt.version = JAWT_VERSION_1_3;
00137   if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
00138       {
00139           printf("AWT Not found\n");
00140           return;
00141       }
00142
00143   /* Get the drawing surface */
00144   ds = awt.GetDrawingSurface(env, canvas);
00145   if (ds == NULL)
00146       {
00147           printf("NULL drawing surface\n");
00148           return;
00149       }
00150
00151   /* Lock the drawing surface */
00152   lock = ds->Lock(ds);
00153   if((lock & JAWT_LOCK_ERROR) != 0)
00154     {
00155     printf("Error locking surface\n");
00156     awt.FreeDrawingSurface(ds);
00157     return;
00158     }
00159
00160   int      temp1;
00161   int      temp2;
00162   temp1 = id1;
00163   temp2 = id2;
00164
00165   temp0->SetSize(temp1,temp2);
00166
00167   /* Unlock the drawing surface */
00168   ds->Unlock(ds);
00169
00170   /* Free the drawing surface */
00171   awt.FreeDrawingSurface(ds);
00172 }
00173
00174
00175 // This function is provided to lock the render window and execute the
00176 // method represented by methodString of the object represented by anObject.
00177 // This is necessary to wrap any vtk filter which might call Render in
00178 // its Execute method (for example vtkRenderLargeImage).  The method passed
00179 // in must be void and zero-argument (this could be extended later to handle
00180 // more generic methods).
00181 extern "C" JNIEXPORT void  JNICALL
00182     Java_vtkPanel_LockAndExecuteVoidMethod(JNIEnv *env,
00183                                            jobject canvas,
00184                                            jobject renderWindow,
00185                                            jobject anObject,
00186                                            jstring methodString)
00187 {
00188   JAWT awt;
00189   JAWT_DrawingSurface* ds;
00190   jint lock;
00191
00192   jclass clazz;
00193   jmethodID mid;
00194   jboolean isCopy;
00195
00196   // get the render window pointer
00197   vtkRenderWindow *temp0;
00198   temp0 = (vtkRenderWindow *)(vtkJavaGetPointerFromObject(env,renderWindow,(char *) "vtkRenderWindow"));
00199
00200
00201   // convert jstring to const char*
00202   const char* utf_string = env->GetStringUTFChars(methodString, &isCopy);
00203
00204   /* Get the AWT */
00205   awt.version = JAWT_VERSION_1_3;
00206   if (JAWT_GetAWT(env, &awt) == JNI_FALSE)
00207       {
00208           printf("AWT Not found\n");
00209           return;
00210       }
00211
00212   /* Get the drawing surface */
00213   ds = awt.GetDrawingSurface(env, canvas);
00214   if (ds == NULL)
00215       {
00216           printf("NULL drawing surface\n");
00217           return;
00218       }
00219
00220   /* Lock the drawing surface */
00221   lock = ds->Lock(ds);
00222   if((lock & JAWT_LOCK_ERROR) != 0)
00223     {
00224     printf("Error locking surface\n");
00225     awt.FreeDrawingSurface(ds);
00226     return;
00227     }
00228
00229   // get object class containing method
00230   clazz = env->GetObjectClass(anObject);
00231
00232   // get void method id
00233   mid = env->GetMethodID(clazz, utf_string, "()V");
00234   if (mid == 0)
00235     {
00236       printf("Can't get void methodID %s for object\n", utf_string);
00237       ds->Unlock(ds);
00238       awt.FreeDrawingSurface(ds);
00239       return;
00240     }
00241
00242   env->CallVoidMethod(anObject, mid);
00243
00244   temp0->Render();
00245
00246   /* Unlock the drawing surface */
00247   ds->Unlock(ds);
00248
00249   /* Free the drawing surface */
00250   awt.FreeDrawingSurface(ds);
00251 }
00252
00253
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkJavaUtil.h Source File

Common/vtkJavaUtil.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkJavaUtil.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00041 #ifndef __vtkJavaUtil_h
00042 #define __vtkJavaUtil_h
00043
00044 #include "vtkSystemIncludes.h"
00045 #include <jni.h>
00046 #include "vtkCommand.h"
00047
00048
00049 extern JNIEXPORT int vtkJavaGetId(JNIEnv *env,jobject obj);
00050
00051 extern JNIEXPORT int vtkJavaRegisterNewObject(JNIEnv *env, jobject obj, void *ptr);
00052 extern JNIEXPORT void vtkJavaRegisterCastFunction(JNIEnv *env, jobject obj, int id, void *tcFunc);
00053
00054 extern JNIEXPORT void *vtkJavaGetPointerFromObject(JNIEnv *env,jobject obj,
00055            char *result_type);
00056 extern JNIEXPORT void vtkJavaDeleteObject(JNIEnv *env, jobject obj);
00057 extern JNIEXPORT jobject vtkJavaGetObjectFromPointer(void *ptr);
00058 extern JNIEXPORT char *vtkJavaUTFToChar(JNIEnv *env, jstring in);
00059 extern JNIEXPORT jstring vtkJavaMakeJavaString(JNIEnv *env, const char *in);
00060
00061 extern JNIEXPORT jarray vtkJavaMakeJArrayOfDoubleFromFloat(JNIEnv *env,
00062              float *arr, int size);
00063 extern JNIEXPORT jarray vtkJavaMakeJArrayOfDoubleFromDouble(JNIEnv *env,
00064               double *arr, int size);
00065 extern JNIEXPORT jarray vtkJavaMakeJArrayOfIntFromInt(JNIEnv *env, int *arr, int size);
00066 extern JNIEXPORT jarray vtkJavaMakeJArrayOfByteFromUnsignedChar(JNIEnv *env, unsigned char *arr, int size);
00067
00068 extern JNIEXPORT jobject vtkJavaCreateNewJavaStubForObject(JNIEnv *env, vtkObject* obj);
00069 extern JNIEXPORT jobject vtkJavaCreateNewJavaStub(JNIEnv *env,
00070               const char* fullclassname, void* obj);
00071
00072 // this is the void pointer parameter passed to the vtk callback routines on
00073 // behalf of the Java interface for callbacks.
00074 struct vtkJavaVoidFuncArg
00075 {
00076   JavaVM *vm;
00077   jobject  uobj;
00078   jmethodID mid;
00079 } ;
00080
00081 extern JNIEXPORT void vtkJavaVoidFunc(void *);
00082 extern JNIEXPORT void vtkJavaVoidFuncArgDelete(void *);
00083
00084 class vtkJavaCommand : public vtkCommand
00085 {
00086 public:
00087   static vtkJavaCommand *New() { return new vtkJavaCommand; };
00088
00089   void SetGlobalRef(jobject obj) { this->uobj = obj; };
00090   void SetMethodID(jmethodID id) { this->mid = id; };
00091   void AssignJavaVM(JNIEnv *env) { env->GetJavaVM(&(this->vm)); };
00092
00093   void Execute(vtkObject *, unsigned long, void *);
00094
00095   JavaVM *vm;
00096   jobject  uobj;
00097   jmethodID mid;
00098 protected:
00099   vtkJavaCommand();
00100   ~vtkJavaCommand();
00101 };
00102
00103 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLargeInteger.h Source File

Common/vtkLargeInteger.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLargeInteger.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00046 #ifndef __vtkLargeInteger_h
00047 #define __vtkLargeInteger_h
00048
00049 #include "vtkObject.h"
00050
00051 class VTK_COMMON_EXPORT vtkLargeInteger
00052 {
00053 public:
00054   vtkLargeInteger(void);
00055   vtkLargeInteger(long n);
00056   vtkLargeInteger(unsigned long n);
00057   vtkLargeInteger(int n);
00058   vtkLargeInteger(unsigned int n);
00059   vtkLargeInteger(const vtkLargeInteger& n);
00060   ~vtkLargeInteger(void);
00061
00062   char CastToChar(void) const;
00063   short CastToShort(void) const;
00064   int CastToInt(void) const;
00065   long CastToLong(void) const;
00066   unsigned long CastToUnsignedLong(void) const;
00067
00068   int IsEven(void) const;
00069   int IsOdd(void) const;
00070   int GetLength(void) const; // in bits
00071   int GetBit(unsigned int p) const; // p'th bit (from zero)
00072   int IsZero() const; // is zero
00073   int GetSign(void) const; // is negative
00074
00075   void Truncate(unsigned int n); // reduce to lower n bits
00076   void Complement(void); // * -1
00077
00078   int operator==(const vtkLargeInteger& n) const;
00079   int operator!=(const vtkLargeInteger& n) const;
00080   int operator<(const vtkLargeInteger& n) const;
00081   int operator<=(const vtkLargeInteger& n) const;
00082   int operator>(const vtkLargeInteger& n) const;
00083   int operator>=(const vtkLargeInteger& n) const;
00084
00085   vtkLargeInteger& operator=(const vtkLargeInteger& n);
00086   vtkLargeInteger& operator+=(const vtkLargeInteger& n);
00087   vtkLargeInteger& operator-=(const vtkLargeInteger& n);
00088   vtkLargeInteger& operator<<=(int n);
00089   vtkLargeInteger& operator>>=(int n);
00090   vtkLargeInteger& operator++(void);
00091   vtkLargeInteger& operator--(void);
00092   vtkLargeInteger  operator++(int);
00093   vtkLargeInteger  operator--(int);
00094   vtkLargeInteger& operator*=(const vtkLargeInteger& n);
00095   vtkLargeInteger& operator/=(const vtkLargeInteger& n);
00096   vtkLargeInteger& operator%=(const vtkLargeInteger& n);
00097   // no change of sign for following operators
00098   vtkLargeInteger& operator&=(const vtkLargeInteger& n);
00099   vtkLargeInteger& operator|=(const vtkLargeInteger& n);
00100   vtkLargeInteger& operator^=(const vtkLargeInteger& n);
00101
00102   vtkLargeInteger operator+(const vtkLargeInteger& n) const;
00103   vtkLargeInteger operator-(const vtkLargeInteger& n) const;
00104   vtkLargeInteger operator*(const vtkLargeInteger& n) const;
00105   vtkLargeInteger operator/(const vtkLargeInteger& n) const;
00106   vtkLargeInteger operator%(const vtkLargeInteger& n) const;
00107   // no change of sign for following operators
00108   vtkLargeInteger operator&(const vtkLargeInteger& n) const;
00109   vtkLargeInteger operator|(const vtkLargeInteger& n) const;
00110   vtkLargeInteger operator^(const vtkLargeInteger& n) const;
00111   vtkLargeInteger operator<<(int n) const;
00112   vtkLargeInteger operator>>(int n) const;
00113
00114   friend ostream& operator<<(ostream& s, const vtkLargeInteger& n);
00115   friend istream& operator>>(istream& s, vtkLargeInteger& n);
00116
00117 private:
00118   char* Number;
00119   int Negative;
00120   unsigned int Sig;
00121   unsigned int Max;
00122
00123   // unsigned operators
00124   int IsSmaller(const vtkLargeInteger& n) const; // unsigned
00125   int IsGreater(const vtkLargeInteger& n) const; // unsigned
00126   void Expand(unsigned int n); // ensure n'th bit exits
00127   void Contract(); // remove leading 0s
00128   void Plus(const vtkLargeInteger& n); // unsigned
00129   void Minus(const vtkLargeInteger& n); // unsigned
00130 };
00131
00132 #endif
00133
00134
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLine.h Source File

Common/vtkLine.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLine.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkLine_h
00056 #define __vtkLine_h
00057
00058 #include "vtkCell.h"
00059
00060 class VTK_COMMON_EXPORT vtkLine : public vtkCell
00061 {
00062 public:
00063   static vtkLine *New();
00064   vtkTypeMacro(vtkLine,vtkCell);
00065
00067
00068   vtkCell *MakeObject();
00069   int GetCellType() {return VTK_LINE;};
00070   int GetCellDimension() {return 1;};
00071   int GetNumberOfEdges() {return 0;};
00072   int GetNumberOfFaces() {return 0;};
00073   vtkCell *GetEdge(int) {return 0;};
00074   vtkCell *GetFace(int) {return 0;};
00075   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00076   void Contour(float value, vtkDataArray *cellScalars,
00077                vtkPointLocator *locator, vtkCellArray *verts,
00078                vtkCellArray *lines, vtkCellArray *polys,
00079                vtkPointData *inPd, vtkPointData *outPd,
00080                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00081   int EvaluatePosition(float x[3], float* closestPoint,
00082                        int& subId, float pcoords[3],
00083                        float& dist2, float *weights);
00084   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00085                         float *weights);
00086   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00087   void Derivatives(int subId, float pcoords[3], float *values,
00088                    int dim, float *derivs);
00090
00092
00094   void Clip(float value, vtkDataArray *cellScalars,
00095             vtkPointLocator *locator, vtkCellArray *lines,
00096             vtkPointData *inPd, vtkPointData *outPd,
00097             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00098             int insideOut);
00100
00102
00104   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00105                         float x[3], float pcoords[3], int& subId);
00107
00108
00110
00115   static int Intersection(float p1[3], float p2[3], float x1[3], float x2[3],
00116                           float& u, float& v);
00118
00119
00121
00123   static float DistanceToLine(float x[3], float p1[3], float p2[3],
00124                               float &t, float closestPoint[3]);
00126
00127
00131   static float DistanceToLine(float x[3], float p1[3], float p2[3]);
00132
00134   static void InterpolationFunctions(float pcoords[3], float weights[2]);
00135
00136 protected:
00137   vtkLine();
00138   ~vtkLine() {};
00139
00140 private:
00141   vtkLine(const vtkLine&);  // Not implemented.
00142   void operator=(const vtkLine&);  // Not implemented.
00143 };
00144
00145 #endif
00146
00147
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLinearTransform.h Source File

Common/vtkLinearTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLinearTransform.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00053 #ifndef __vtkLinearTransform_h
00054 #define __vtkLinearTransform_h
00055
00056 #include "vtkHomogeneousTransform.h"
00057
00058 class VTK_COMMON_EXPORT vtkLinearTransform : public vtkHomogeneousTransform
00059 {
00060 public:
00061
00062   vtkTypeMacro(vtkLinearTransform,vtkHomogeneousTransform);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00064
00066
00068   void TransformNormal(const float in[3], float out[3]) {
00069     this->Update(); this->InternalTransformNormal(in,out); };
00071
00073
00075   void TransformNormal(const double in[3], double out[3]) {
00076     this->Update(); this->InternalTransformNormal(in,out); };
00078
00080
00082   double *TransformNormal(double x, double y, double z) {
00083     return this->TransformDoubleNormal(x,y,z); }
00084   double *TransformNormal(const double normal[3]) {
00085     return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
00087
00089
00091   float *TransformFloatNormal(float x, float y, float z) {
00092     this->InternalFloatPoint[0] = x;
00093     this->InternalFloatPoint[1] = y;
00094     this->InternalFloatPoint[2] = z;
00095     this->TransformNormal(this->InternalFloatPoint,this->InternalFloatPoint);
00096     return this->InternalFloatPoint; };
00097   float *TransformFloatNormal(const float normal[3]) {
00098     return this->TransformFloatNormal(normal[0],normal[1],normal[2]); };
00100
00102
00104   double *TransformDoubleNormal(double x, double y, double z) {
00105     this->InternalDoublePoint[0] = x;
00106     this->InternalDoublePoint[1] = y;
00107     this->InternalDoublePoint[2] = z;
00108     this->TransformNormal(this->InternalDoublePoint,this->InternalDoublePoint);
00109     return this->InternalDoublePoint; };
00110   double *TransformDoubleNormal(const double normal[3]) {
00111     return this->TransformDoubleNormal(normal[0],normal[1],normal[2]); };
00113
00115
00117   double *TransformVector(double x, double y, double z) {
00118     return this->TransformDoubleVector(x,y,z); }
00119   double *TransformVector(const double normal[3]) {
00120     return this->TransformDoubleVector(normal[0],normal[1],normal[2]); };
00122
00124
00126   void TransformVector(const float in[3], float out[3]) {
00127     this->Update(); this->InternalTransformVector(in,out); };
00129
00131
00133   void TransformVector(const double in[3], double out[3]) {
00134     this->Update(); this->InternalTransformVector(in,out); };
00136
00138
00140   float *TransformFloatVector(float x, float y, float z) {
00141       this->InternalFloatPoint[0] = x;
00142       this->InternalFloatPoint[1] = y;
00143       this->InternalFloatPoint[2] = z;
00144       this->TransformVector(this->InternalFloatPoint,this->InternalFloatPoint);
00145       return this->InternalFloatPoint; };
00146   float *TransformFloatVector(const float vec[3]) {
00147     return this->TransformFloatVector(vec[0],vec[1],vec[2]); };
00149
00151
00153   double *TransformDoubleVector(double x, double y, double z) {
00154     this->InternalDoublePoint[0] = x;
00155     this->InternalDoublePoint[1] = y;
00156     this->InternalDoublePoint[2] = z;
00157     this->TransformVector(this->InternalDoublePoint,this->InternalDoublePoint);
00158     return this->InternalDoublePoint; };
00159   double *TransformDoubleVector(const double vec[3]) {
00160     return this->TransformDoubleVector(vec[0],vec[1],vec[2]); };
00162
00165   void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
00166
00169   virtual void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms);
00170
00173   virtual void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs);
00174
00176
00178   void TransformPointsNormalsVectors(vtkPoints *inPts,
00179                                      vtkPoints *outPts,
00180                                      vtkDataArray *inNms,
00181                                      vtkDataArray *outNms,
00182                                      vtkDataArray *inVrs,
00183                                      vtkDataArray *outVrs);
00185
00187
00189   vtkLinearTransform *GetLinearInverse() {
00190     return (vtkLinearTransform *)this->GetInverse(); };
00192
00194
00196   void InternalTransformPoint(const float in[3], float out[3]);
00197   void InternalTransformPoint(const double in[3], double out[3]);
00199
00201
00203   virtual void InternalTransformNormal(const float in[3], float out[3]);
00204   virtual void InternalTransformNormal(const double in[3], double out[3]);
00206
00208
00210   virtual void InternalTransformVector(const float in[3], float out[3]);
00211   virtual void InternalTransformVector(const double in[3], double out[3]);
00213
00215
00217   void InternalTransformDerivative(const float in[3], float out[3],
00218                                    float derivative[3][3]);
00219   void InternalTransformDerivative(const double in[3], double out[3],
00220                                    double derivative[3][3]);
00222
00223 protected:
00224   vtkLinearTransform() {};
00225   ~vtkLinearTransform() {};
00226 private:
00227   vtkLinearTransform(const vtkLinearTransform&);  // Not implemented.
00228   void operator=(const vtkLinearTransform&);  // Not implemented.
00229 };
00230
00231 #endif
00232
00233
00234
00235
00236
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLocator.h Source File

Common/vtkLocator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLocator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00080 #ifndef __vtkLocator_h
00081 #define __vtkLocator_h
00082
00083 #include "vtkObject.h"
00084 #include "vtkDataSet.h"
00085 class vtkPolyData;
00086
00087 class VTK_COMMON_EXPORT vtkLocator : public vtkObject
00088 {
00089 public:
00090   vtkTypeMacro(vtkLocator,vtkObject);
00091   void PrintSelf(ostream& os, vtkIndent indent);
00092
00094
00095   vtkSetObjectMacro(DataSet,vtkDataSet);
00096   vtkGetObjectMacro(DataSet,vtkDataSet);
00098
00100
00102   vtkSetClampMacro(MaxLevel,int,0,VTK_LARGE_INTEGER);
00103   vtkGetMacro(MaxLevel,int);
00105
00107
00110   vtkGetMacro(Level,int);
00112
00114
00118   vtkSetMacro(Automatic,int);
00119   vtkGetMacro(Automatic,int);
00120   vtkBooleanMacro(Automatic,int);
00122
00124
00126   vtkSetClampMacro(Tolerance,float,0.0,VTK_LARGE_FLOAT);
00127   vtkGetMacro(Tolerance,float);
00129
00131
00135   vtkSetMacro(RetainCellLists,int);
00136   vtkGetMacro(RetainCellLists,int);
00137   vtkBooleanMacro(RetainCellLists,int);
00139
00142   virtual void Update();
00143
00145   virtual void Initialize();
00146
00148   virtual void BuildLocator() = 0;
00149
00151   virtual void FreeSearchStructure() = 0;
00152
00157   virtual void GenerateRepresentation(int level, vtkPolyData *pd) = 0;
00158
00160
00161   vtkGetMacro(BuildTime, unsigned long);
00163
00164 protected:
00165   vtkLocator();
00166   ~vtkLocator();
00167
00168   vtkDataSet *DataSet;
00169   int Automatic; // boolean controls automatic subdivision (or uses user spec.)
00170   float Tolerance; // for performing merging
00171   int MaxLevel;
00172   int Level;
00173   int RetainCellLists;
00174
00175   vtkTimeStamp BuildTime;  // time at which locator was built
00176
00177 private:
00178   vtkLocator(const vtkLocator&);  // Not implemented.
00179   void operator=(const vtkLocator&);  // Not implemented.
00180 };
00181
00182 #endif
00183
00184
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLogLookupTable.h Source File

Common/vtkLogLookupTable.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLogLookupTable.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkLogLookupTable_h
00057 #define __vtkLogLookupTable_h
00058
00059 #include "vtkLookupTable.h"
00060
00061 class VTK_COMMON_EXPORT vtkLogLookupTable : public vtkLookupTable
00062 {
00063 public:
00064   static vtkLogLookupTable *New();
00065
00066   vtkTypeMacro(vtkLogLookupTable,vtkLookupTable);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00069 protected:
00070   vtkLogLookupTable(int sze=256, int ext=256);
00071   ~vtkLogLookupTable() {};
00072 private:
00073   vtkLogLookupTable(const vtkLogLookupTable&);  // Not implemented.
00074   void operator=(const vtkLogLookupTable&);  // Not implemented.
00075 };
00076
00077 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLongArray.h Source File

Common/vtkLongArray.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLongArray.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00054 #ifndef __vtkLongArray_h
00055 #define __vtkLongArray_h
00056
00057 #include "vtkDataArray.h"
00058
00059 class VTK_COMMON_EXPORT vtkLongArray : public vtkDataArray
00060 {
00061 public:
00062   static vtkLongArray *New();
00063
00064   vtkTypeMacro(vtkLongArray,vtkDataArray);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066
00069   int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00070
00072   void Initialize();
00073
00075   void Squeeze() {this->ResizeAndExtend (this->MaxId+1);};
00076
00078   virtual void Resize(vtkIdType numTuples);
00079
00081   vtkDataArray *MakeObject();
00082
00084   int GetDataType() {return VTK_LONG;};
00085
00087   void SetNumberOfTuples(const vtkIdType number);
00088
00091   float *GetTuple(const vtkIdType i);
00092
00094
00095   void GetTuple(const vtkIdType i, float * tuple);
00096   void GetTuple(const vtkIdType i, double * tuple);
00098
00100
00101   void SetTuple(const vtkIdType i, const float * tuple);
00102   void SetTuple(const vtkIdType i, const double * tuple);
00104
00106
00108   void InsertTuple(const vtkIdType i, const float * tuple);
00109   void InsertTuple(const vtkIdType i, const double * tuple);
00111
00113
00115   vtkIdType InsertNextTuple(const float * tuple);
00116   vtkIdType InsertNextTuple(const double * tuple);
00118
00120   long GetValue(const vtkIdType id) {return this->Array[id];};
00121
00125   void SetNumberOfValues(const vtkIdType number);
00126
00128
00130   void SetValue(const vtkIdType id, const long value)
00131     { this->Array[id] = value;};
00133
00135   void InsertValue(const vtkIdType id, const long i);
00136
00139   vtkIdType InsertNextValue(const long);
00140
00144   virtual void InsertComponent(const vtkIdType i, const int j, const float c);
00145
00147
00149   long *GetPointer(const vtkIdType id) {return this->Array + id;}
00150   void *GetVoidPointer(const vtkIdType id)
00151     {return (void *)this->GetPointer(id);};
00153
00157   long *WritePointer(const vtkIdType id, const vtkIdType number);
00158
00160   void DeepCopy(vtkDataArray *da);
00161
00163
00169   void SetArray(long* array, vtkIdType size, int save);
00170   void SetVoidArray(void *array, vtkIdType size, int save)
00171     {this->SetArray((long*)array, size, save);};
00173
00174 protected:
00175   vtkLongArray(vtkIdType numComp=1);
00176   ~vtkLongArray();
00177
00178   long *Array;   // pointer to data
00179   long *ResizeAndExtend(const vtkIdType sz);  // function to resize data
00180
00181   int TupleSize; //used for data conversion
00182   float *Tuple;
00183
00184   int SaveUserArray;
00185 private:
00186   vtkLongArray(const vtkLongArray&);  // Not implemented.
00187   void operator=(const vtkLongArray&);  // Not implemented.
00188 };
00189
00190 inline void vtkLongArray::SetNumberOfValues(const vtkIdType number)
00191 {
00192   this->Allocate(number);
00193   this->MaxId = number - 1;
00194 }
00195
00196 inline long *vtkLongArray::WritePointer(const vtkIdType id,
00197                                         const vtkIdType number)
00198 {
00199   vtkIdType newSize=id+number;
00200   if ( newSize > this->Size )
00201     {
00202     this->ResizeAndExtend(newSize);
00203     }
00204   if ( (--newSize) > this->MaxId )
00205     {
00206     this->MaxId = newSize;
00207     }
00208   return this->Array + id;
00209 }
00210
00211 inline void vtkLongArray::InsertValue(const vtkIdType id, const long i)
00212 {
00213   if ( id >= this->Size )
00214     {
00215     this->ResizeAndExtend(id+1);
00216     }
00217   this->Array[id] = i;
00218   if ( id > this->MaxId )
00219     {
00220     this->MaxId = id;
00221     }
00222 }
00223
00224 inline vtkIdType vtkLongArray::InsertNextValue(const long i)
00225 {
00226   this->InsertValue (++this->MaxId,i);
00227   return this->MaxId;
00228 }
00229
00230
00231 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkLookupTable.h Source File

Common/vtkLookupTable.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLookupTable.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00062 #ifndef __vtkLookupTable_h
00063 #define __vtkLookupTable_h
00064
00065 #include "vtkScalarsToColors.h"
00066
00067 #define VTK_RAMP_LINEAR 0
00068 #define VTK_RAMP_SCURVE 1
00069 #define VTK_SCALE_LINEAR 0
00070 #define VTK_SCALE_LOG10 1
00071
00072 class VTK_COMMON_EXPORT vtkLookupTable : public vtkScalarsToColors
00073 {
00074 public:
00077   static vtkLookupTable *New();
00078
00079   vtkTypeMacro(vtkLookupTable,vtkScalarsToColors);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081
00083   int Allocate(int sz=256, int ext=256);
00084
00087   virtual void Build();
00088
00094   virtual void ForceBuild();
00095
00097
00103   vtkSetMacro(Ramp,int);
00104   void SetRampToLinear() { this->SetRamp(VTK_RAMP_LINEAR); };
00105   void SetRampToSCurve() { this->SetRamp(VTK_RAMP_SCURVE); };
00106   vtkGetMacro(Ramp,int);
00108
00110
00113   void SetScale(int scale);
00114   void SetScaleToLinear() { this->SetScale(VTK_SCALE_LINEAR); };
00115   void SetScaleToLog10() { this->SetScale(VTK_SCALE_LOG10); };
00116   vtkGetMacro(Scale,int);
00118
00120
00124   void SetTableRange(float r[2]);
00125   virtual void SetTableRange(float min, float max);
00126   vtkGetVectorMacro(TableRange,float,2);
00128
00130
00132   vtkSetVector2Macro(HueRange,float);
00133   vtkGetVector2Macro(HueRange,float);
00135
00137
00139   vtkSetVector2Macro(SaturationRange,float);
00140   vtkGetVector2Macro(SaturationRange,float);
00142
00144
00146   vtkSetVector2Macro(ValueRange,float);
00147   vtkGetVector2Macro(ValueRange,float);
00149
00151
00153   vtkSetVector2Macro(AlphaRange,float);
00154   vtkGetVector2Macro(AlphaRange,float);
00156
00158   unsigned char *MapValue(float v);
00159
00161
00163   float *GetColor(float x) { return vtkScalarsToColors::GetColor(x); }
00164   void GetColor(float x, float rgb[3]);
00166
00169   float GetOpacity(float v);
00170
00172   virtual int GetIndex(float v);
00173
00175
00176   void SetNumberOfTableValues(int number);
00177   int GetNumberOfTableValues() { return this->NumberOfColors; };
00179
00184   void SetTableValue(int indx, float rgba[4]);
00185
00188   void SetTableValue(int indx, float r, float g, float b, float a=1.0);
00189
00192   float *GetTableValue(int id);
00193
00196   void GetTableValue(int id, float rgba[4]);
00197
00199
00201   unsigned char *GetPointer(const int id) {
00202     return this->Table->GetPointer(4*id); };
00204
00209   unsigned char *WritePointer(const int id, const int number);
00210
00212
00214   float *GetRange() { return this->GetTableRange(); };
00215   void SetRange(float min, float max) { this->SetTableRange(min, max); };
00216   void SetRange(float rng[2]) { this->SetRange(rng[0], rng[1]); };
00218
00220
00224   vtkSetClampMacro(NumberOfColors,int,2,65535);
00225   vtkGetMacro(NumberOfColors,int);
00227
00229
00230   void MapScalarsThroughTable2(void *input, unsigned char *output,
00231                                int inputDataType, int numberOfValues,
00232                                int inputIncrement, int outputIncrement);
00234
00235 protected:
00236   vtkLookupTable(int sze=256, int ext=256);
00237   ~vtkLookupTable();
00238
00239   int NumberOfColors;
00240   vtkUnsignedCharArray *Table;
00241   float TableRange[2];
00242   float HueRange[2];
00243   float SaturationRange[2];
00244   float ValueRange[2];
00245   float AlphaRange[2];
00246   int Scale;
00247   int Ramp;
00248   vtkTimeStamp InsertTime;
00249   vtkTimeStamp BuildTime;
00250   float RGBA[4]; //used during conversion process
00251 private:
00252   vtkLookupTable(const vtkLookupTable&);  // Not implemented.
00253   void operator=(const vtkLookupTable&);  // Not implemented.
00254 };
00255
00256 inline unsigned char *vtkLookupTable::WritePointer(const int id,
00257                                                    const int number)
00258 {
00259  return this->Table->WritePointer(4*id,4*number);
00260 }
00261
00262 #endif
00263
00264
00265
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMapper2D.h Source File

Common/vtkMapper2D.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMapper2D.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00053 #ifndef __vtkMapper2D_h
00054 #define __vtkMapper2D_h
00055
00056 #include "vtkAbstractMapper.h"
00057 #include "vtkWindow.h"
00058
00059 class vtkViewport;
00060 class vtkActor2D;
00061
00062 class VTK_COMMON_EXPORT vtkMapper2D : public vtkAbstractMapper
00063 {
00064 public:
00065   static vtkMapper2D* New();
00066
00067   vtkTypeMacro(vtkMapper2D,vtkAbstractMapper);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069
00070   virtual void RenderOverlay(vtkViewport*, vtkActor2D*) {};
00071   virtual void RenderOpaqueGeometry(vtkViewport*, vtkActor2D*) {};
00072   virtual void RenderTranslucentGeometry(vtkViewport*, vtkActor2D*) {};
00073
00074 protected:
00075   vtkMapper2D() {};
00076   ~vtkMapper2D() {};
00077
00078 private:
00079   vtkMapper2D(const vtkMapper2D&);  // Not implemented.
00080   void operator=(const vtkMapper2D&);  // Not implemented.
00081 };
00082
00083 #endif
00084
00085
00086
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMarchingCubesCases.h Source File

Common/vtkMarchingCubesCases.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMarchingCubesCases.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040 #ifndef __vtkMarchingCubesCases_h
00041 #define __vtkMarchingCubesCases_h
00042 //
00043 // marching cubes case table for generating isosurfaces
00044 //
00045 typedef int EDGE_LIST;
00046 struct VTK_COMMON_EXPORT VTK_TRIANGLE_CASES
00047 {
00048   EDGE_LIST edges[16];
00049   static VTK_TRIANGLE_CASES* GetCases();
00050 };
00051
00052 //
00053 // Edges to intersect.  Three at a time form a triangle. Comments at
00054 // end of line indicate case number (0->255) and base case number (0->15).
00055 //
00056
00057 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMarchingSquaresCases.h Source File

Common/vtkMarchingSquaresCases.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMarchingSquaresCases.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040 #ifndef __vtkMarchingSquaresCases_h
00041 #define __vtkMarchingSquaresCases_h
00042 //
00043 // marching squares cases for generating isolines
00044 //
00045
00046 typedef int EDGE_LIST;
00047 struct VTK_COMMON_EXPORT VTK_LINE_CASES
00048 {
00049   EDGE_LIST edges[5];
00050   static VTK_LINE_CASES* GetCases();
00051 };
00052
00053 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMath.h Source File

Common/vtkMath.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMath.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00059 #ifndef __vtkMath_h
00060 #define __vtkMath_h
00061
00062 #include "vtkObject.h"
00063
00064 class VTK_COMMON_EXPORT vtkMath : public vtkObject
00065 {
00066 public:
00067   static vtkMath *New();
00068   vtkTypeMacro(vtkMath,vtkObject);
00069
00071
00072   static float Pi() {return 3.14159265358979;};
00073   static float DegreesToRadians() {return 0.017453292;};
00075
00077   static double DoubleDegreesToRadians() {return 0.017453292519943295;};
00078
00080
00081   static float Dot(const float x[3], const float y[3]) {
00082     return (x[0]*y[0] + x[1]*y[1] + x[2]*y[2]);};
00084
00086
00087   static double Dot(const double x[3], const double y[3]) {
00088     return (x[0]*y[0] + x[1]*y[1] + x[2]*y[2]);};
00090
00092   static void Cross(const float x[3], const float y[3], float z[3]);
00093
00096   static void Cross(const double x[3], const double y[3], double z[3]);
00097
00099   static float Norm(const float* x, int n);
00100
00102
00103   static float Norm(const float x[3]) {
00104     return sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);};
00106
00108
00109   static double Norm(const double x[3]) {
00110     return sqrt(x[0]*x[0] + x[1]*x[1] + x[2]*x[2]);};
00112
00114   static float Normalize(float x[3]);
00115
00118   static double Normalize(double x[3]);
00119
00121
00126   static void Perpendiculars(const double x[3], double y[3], double z[3],
00127                              double theta);
00128   static void Perpendiculars(const float x[3], float y[3], float z[3],
00129                              double theta);
00131
00133   static float Distance2BetweenPoints(const float x[3], const float y[3]);
00134
00137   static double Distance2BetweenPoints(const double x[3], const double y[3]);
00138
00140
00141   static float Dot2D(const float x[3], const float y[3]) {
00142     return (x[0]*y[0] + x[1]*y[1]);};
00144
00146
00148   static double Dot2D(const double x[3], const double y[3]) {
00149     return (x[0]*y[0] + x[1]*y[1]);};
00151
00153
00154   static float Norm2D(const float x[3]) {
00155     return sqrt(x[0]*x[0] + x[1]*x[1]);};
00157
00159
00161   static double Norm2D(const double x[3]) {
00162     return sqrt(x[0]*x[0] + x[1]*x[1]);};
00164
00167   static float Normalize2D(float x[3]);
00168
00171   static double Normalize2D(double x[3]);
00172
00174
00175   static float Determinant2x2(const float c1[2], const float c2[2]) {
00176     return (c1[0]*c2[1] - c2[0]*c1[1]);};
00178
00180
00181   static double Determinant2x2(double a, double b, double c, double d) {
00182     return (a * d - b * c);};
00184
00186
00188   static void LUFactor3x3(float A[3][3], int index[3]);
00189   static void LUFactor3x3(double A[3][3], int index[3]);
00191
00193
00195   static void LUSolve3x3(const float A[3][3], const int index[3],
00196                          float x[3]);
00197   static void LUSolve3x3(const double A[3][3], const int index[3],
00198                          double x[3]);
00200
00202
00204   static void LinearSolve3x3(const float A[3][3], const float x[3],
00205                              float y[3]);
00206   static void LinearSolve3x3(const double A[3][3], const double x[3],
00207                              double y[3]);
00209
00211
00212   static void Multiply3x3(const float A[3][3], const float in[3],
00213                           float out[3]);
00214   static void Multiply3x3(const double A[3][3], const double in[3],
00215                           double out[3]);
00217
00219
00220   static void Multiply3x3(const float A[3][3], const float B[3][3],
00221                           float C[3][3]);
00222   static void Multiply3x3(const double A[3][3], const double B[3][3],
00223                           double C[3][3]);
00225
00227
00228   static void Transpose3x3(const float A[3][3], float AT[3][3]);
00229   static void Transpose3x3(const double A[3][3], double AT[3][3]);
00231
00233
00234   static void Invert3x3(const float A[3][3], float AI[3][3]);
00235   static void Invert3x3(const double A[3][3], double AI[3][3]);
00237
00239
00240   static void Identity3x3(float A[3][3]);
00241   static void Identity3x3(double A[3][3]);
00243
00245
00246   static double Determinant3x3(float A[3][3]);
00247   static double Determinant3x3(double A[3][3]);
00249
00251
00252   static float Determinant3x3(const float c1[3],
00253                               const float c2[3],
00254                               const float c3[3]);
00256
00258
00260   static double Determinant3x3(double a1, double a2, double a3,
00261                                double b1, double b2, double b3,
00262                                double c1, double c2, double c3);
00264
00266
00268   static void QuaternionToMatrix3x3(const float quat[4], float A[3][3]);
00269   static void QuaternionToMatrix3x3(const double quat[4], double A[3][3]);
00271
00273
00276   static void Matrix3x3ToQuaternion(const float A[3][3], float quat[4]);
00277   static void Matrix3x3ToQuaternion(const double A[3][3], double quat[4]);
00279
00281
00284   static void Orthogonalize3x3(const float A[3][3], float B[3][3]);
00285   static void Orthogonalize3x3(const double A[3][3], double B[3][3]);
00287
00289
00293   static void Diagonalize3x3(const float A[3][3], float w[3], float V[3][3]);
00294   static void Diagonalize3x3(const double A[3][3],double w[3],double V[3][3]);
00296
00298
00305   static void SingularValueDecomposition3x3(const float A[3][3],
00306                                             float U[3][3], float w[3],
00307                                             float VT[3][3]);
00308   static void SingularValueDecomposition3x3(const double A[3][3],
00309                                             double U[3][3], double w[3],
00310                                             double VT[3][3]);
00312
00317   static int SolveLinearSystem(double **A, double *x, int size);
00318
00322   static int InvertMatrix(double **A, double **AI, int size);
00323
00325
00327   static int InvertMatrix(double **A, double **AI, int size,
00328                           int *tmp1Size, double *tmp2Size);
00330
00336   static int LUFactorLinearSystem(double **A, int *index, int size);
00337
00339
00341   static int LUFactorLinearSystem(double **A, int *index, int size,
00342                                   double *tmpSize);
00344
00346
00352   static void LUSolveLinearSystem(double **A, int *index,
00353                                   double *x, int size);
00355
00363   static double EstimateMatrixCondition(double **A, int size);
00364
00370   static void RandomSeed(long s);
00371
00374   static float Random();
00375
00377   static float Random(float min, float max);
00378
00380
00384   static int Jacobi(float **a, float *w, float **v);
00385   static int Jacobi(double **a, double *w, double **v);
00387
00389
00394   static int JacobiN(float **a, int n, float *w, float **v);
00395   static int JacobiN(double **a, int n, double *w, double **v);
00397
00404   static double* SolveCubic(double c0, double c1, double c2, double c3);
00405
00412   static double* SolveQuadratic(double c0, double c1, double c2);
00413
00417   static double* SolveLinear(double c0, double c1);
00418
00420
00431   static int SolveCubic(double c0, double c1, double c2, double c3,
00432                         double *r1, double *r2, double *r3, int *num_roots);
00434
00436
00440   static int SolveQuadratic(double c0, double c1, double c2,
00441                             double *r1, double *r2, int *num_roots);
00443
00448   static int SolveLinear(double c0, double c1, double *r1, int *num_roots);
00449
00450
00452
00459   static int SolveLeastSquares(int numberOfSamples, double **xt, int xOrder,
00460                                double **yt, int yOrder, double **mt);
00462
00463 protected:
00464   vtkMath() {};
00465   ~vtkMath() {};
00466
00467   static long Seed;
00468 private:
00469   vtkMath(const vtkMath&);  // Not implemented.
00470   void operator=(const vtkMath&);  // Not implemented.
00471 };
00472
00473 inline float vtkMath::Normalize(float x[3])
00474 {
00475   float den;
00476   if ( (den = vtkMath::Norm(x)) != 0.0 )
00477     {
00478     for (int i=0; i < 3; i++)
00479       {
00480       x[i] /= den;
00481       }
00482     }
00483   return den;
00484 }
00485 inline double vtkMath::Normalize(double x[3])
00486 {
00487   double den;
00488   if ( (den = vtkMath::Norm(x)) != 0.0 )
00489     {
00490     for (int i=0; i < 3; i++)
00491       {
00492       x[i] /= den;
00493       }
00494     }
00495   return den;
00496 }
00497
00498 inline float vtkMath::Normalize2D(float x[3])
00499 {
00500   float den;
00501   if ( (den = vtkMath::Norm2D(x)) != 0.0 )
00502     {
00503     for (int i=0; i < 2; i++)
00504       {
00505       x[i] /= den;
00506       }
00507     }
00508   return den;
00509 }
00510
00511 inline double vtkMath::Normalize2D(double x[3])
00512 {
00513   double den;
00514   if ( (den = vtkMath::Norm2D(x)) != 0.0 )
00515     {
00516     for (int i=0; i < 2; i++)
00517       {
00518       x[i] /= den;
00519       }
00520     }
00521   return den;
00522 }
00523
00524 inline float vtkMath::Determinant3x3(const float c1[3],
00525                                      const float c2[3],
00526                                      const float c3[3])
00527 {
00528   return c1[0]*c2[1]*c3[2] + c2[0]*c3[1]*c1[2] + c3[0]*c1[1]*c2[2] -
00529          c1[0]*c3[1]*c2[2] - c2[0]*c1[1]*c3[2] - c3[0]*c2[1]*c1[2];
00530 }
00531
00532 inline double vtkMath::Determinant3x3(double a1, double a2, double a3,
00533                                       double b1, double b2, double b3,
00534                                       double c1, double c2, double c3)
00535 {
00536     return ( a1 * vtkMath::Determinant2x2( b2, b3, c2, c3 )
00537            - b1 * vtkMath::Determinant2x2( a2, a3, c2, c3 )
00538            + c1 * vtkMath::Determinant2x2( a2, a3, b2, b3 ) );
00539 }
00540
00541 inline float vtkMath::Distance2BetweenPoints(const float x[3],
00542                                              const float y[3])
00543 {
00544   return ((x[0]-y[0])*(x[0]-y[0]) + (x[1]-y[1])*(x[1]-y[1]) +
00545           (x[2]-y[2])*(x[2]-y[2]));
00546 }
00547 inline double vtkMath::Distance2BetweenPoints(const double x[3],
00548                                               const double y[3])
00549 {
00550   return ((x[0]-y[0])*(x[0]-y[0]) + (x[1]-y[1])*(x[1]-y[1]) +
00551           (x[2]-y[2])*(x[2]-y[2]));
00552 }
00553
00554 inline float vtkMath::Random(float min, float max)
00555 {
00556   return (min + vtkMath::Random()*(max-min));
00557 }
00558
00559 // Cross product of two 3-vectors. Result vector in z[3].
00560 inline void vtkMath::Cross(const float x[3], const float y[3], float z[3])
00561 {
00562   float Zx = x[1]*y[2] - x[2]*y[1];
00563   float Zy = x[2]*y[0] - x[0]*y[2];
00564   float Zz = x[0]*y[1] - x[1]*y[0];
00565   z[0] = Zx; z[1] = Zy; z[2] = Zz;
00566 }
00567
00568 // Cross product of two 3-vectors. Result vector in z[3].
00569 inline void vtkMath::Cross(const double x[3], const double y[3], double z[3])
00570 {
00571   double Zx = x[1]*y[2] - x[2]*y[1];
00572   double Zy = x[2]*y[0] - x[0]*y[2];
00573   double Zz = x[0]*y[1] - x[1]*y[0];
00574   z[0] = Zx; z[1] = Zy; z[2] = Zz;
00575 }
00576
00577 //BTX
00578 //----------------------------------------------------------------------------
00579 template<class T>
00580 static inline double vtkDeterminant3x3(T A[3][3])
00581 {
00582   return A[0][0]*A[1][1]*A[2][2] + A[1][0]*A[2][1]*A[0][2] +
00583          A[2][0]*A[0][1]*A[1][2] - A[0][0]*A[2][1]*A[1][2] -
00584          A[1][0]*A[0][1]*A[2][2] - A[2][0]*A[1][1]*A[0][2];
00585 }
00586 //ETX
00587
00588 inline double vtkMath::Determinant3x3(float A[3][3])
00589 {
00590   return vtkDeterminant3x3(A);
00591 }
00592
00593 inline double vtkMath::Determinant3x3(double A[3][3])
00594 {
00595   return vtkDeterminant3x3(A);
00596 }
00597
00598
00599 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMatrix4x4.h Source File

Common/vtkMatrix4x4.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMatrix4x4.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkMatrix4x4_h
00058 #define __vtkMatrix4x4_h
00059
00060 #include "vtkObject.h"
00061
00062 class VTK_COMMON_EXPORT vtkMatrix4x4 : public vtkObject
00063 {
00064   // Some of the methods in here have a corresponding static (class)
00065   // method taking a pointer to 16 doubles that constitutes a user
00066   // supplied matrix. This allows C++ clients to allocate double arrays
00067   // on the stack and manipulate them using vtkMatrix4x4 methods.
00068   // This is an alternative to allowing vtkMatrix4x4 instances to be
00069   // created on the stack (which is frowned upon) or doing lots of
00070   // temporary heap allocation within vtkTransform and vtkActor methods,
00071   // which is inefficient.
00072
00073 public:
00074   double Element[4][4];
00075
00077   static vtkMatrix4x4 *New();
00078
00079   vtkTypeMacro(vtkMatrix4x4,vtkObject);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081
00083
00085   void DeepCopy(vtkMatrix4x4 *source)
00086     {vtkMatrix4x4::DeepCopy(*this->Element,source); this->Modified(); }
00088 //BTX
00089   static void DeepCopy(double Elements[16], vtkMatrix4x4 *source)
00090     {vtkMatrix4x4::DeepCopy(Elements,*source->Element); }
00091   static void DeepCopy(double Elements[16], const double newElements[16]);
00092 //ETX
00093
00095
00096   void DeepCopy(const double Elements[16])
00097     { this->DeepCopy(*this->Element,Elements); this->Modified(); }
00099
00101
00102   void Zero()
00103     { vtkMatrix4x4::Zero(*this->Element); this->Modified(); }
00105 //BTX
00106   static void Zero(double Elements[16]);
00107 //ETX
00108
00110
00111   void Identity()
00112     { vtkMatrix4x4::Identity(*this->Element); this->Modified();}
00114 //BTX
00115   static void Identity(double Elements[16]);
00116 //ETX
00117
00119
00121   static void Invert(vtkMatrix4x4 *in, vtkMatrix4x4 *out)
00122     {vtkMatrix4x4::Invert(*in->Element,*out->Element); out->Modified(); }
00123   void Invert()
00124     { vtkMatrix4x4::Invert(this,this); }
00126 //BTX
00127   static void Invert(const double inElements[16], double outElements[16]);
00128 //ETX
00129
00130
00132
00133   static void Transpose(vtkMatrix4x4 *in, vtkMatrix4x4 *out)
00134     {vtkMatrix4x4::Transpose(*in->Element,*out->Element); out->Modified(); }
00135   void Transpose()
00136     { vtkMatrix4x4::Transpose(this,this); }
00138 //BTX
00139   static void Transpose(const double inElements[16], double outElements[16]);
00140 //ETX
00141
00143
00145   void MultiplyPoint(const float in[4], float out[4])
00146     {vtkMatrix4x4::MultiplyPoint(*this->Element,in,out); }
00147   void MultiplyPoint(const double in[4], double out[4])
00148     {vtkMatrix4x4::MultiplyPoint(*this->Element,in,out); }
00150
00151 //BTX
00152   static void MultiplyPoint(const double Elements[16],
00153                             const float in[4], float out[4]);
00154   static void MultiplyPoint(const double Elements[16],
00155                             const double in[4], double out[4]);
00156 //ETX
00157
00159
00161   float *MultiplyPoint(const float in[4])
00162     {return this->MultiplyFloatPoint(in); }
00163   float *MultiplyFloatPoint(const float in[4])
00164     {this->MultiplyPoint(in,this->FloatPoint); return this->FloatPoint; }
00165   double *MultiplyDoublePoint(const double in[4])
00166     {this->MultiplyPoint(in,this->DoublePoint); return this->DoublePoint; }
00168
00170
00171   static void Multiply4x4(vtkMatrix4x4 *a, vtkMatrix4x4 *b, vtkMatrix4x4 *c) {
00172     vtkMatrix4x4::Multiply4x4(*a->Element,*b->Element,*c->Element); };
00174 //BTX
00175   static void Multiply4x4(const double a[16], const double b[16],
00176                           double c[16]);
00177 //ETX
00178
00180
00181   void Adjoint(vtkMatrix4x4 *in, vtkMatrix4x4 *out)
00182     {vtkMatrix4x4::Adjoint(*in->Element,*out->Element);}
00184 //BTX
00185   static void Adjoint(const double inElements[16], double outElements[16]);
00186 //ETX
00187
00189   double Determinant() {return vtkMatrix4x4::Determinant(*this->Element);}
00190 //BTX
00191   static double Determinant(const double Elements[16]);
00192 //ETX
00193
00195   void SetElement(int i, int j, double value);
00196
00198
00199   double GetElement(int i, int j) const
00200     {return this->Element[i][j];}
00202
00203 //BTX
00204   double *operator[](const unsigned int i)
00205     {return &(this->Element[i][0]);}
00206   const double *operator[](unsigned int i) const
00207     { return &(this->Element[i][0]); }
00208   void operator= (double element);
00209   void Adjoint(vtkMatrix4x4 &in,vtkMatrix4x4 &out)
00210     {this->Adjoint(&in,&out);}
00211   double Determinant(vtkMatrix4x4 &in)
00212     {return this->Determinant(&in);}
00213   double Determinant(vtkMatrix4x4 *in)
00214     {return vtkMatrix4x4::Determinant(*in->Element);}
00215   void Invert(vtkMatrix4x4 &in,vtkMatrix4x4 &out)
00216     {this->Invert(&in,&out);}
00217   void Transpose(vtkMatrix4x4 &in,vtkMatrix4x4 &out)
00218     {this->Transpose(&in,&out);}
00219   static void PointMultiply(const double Elements[16],
00220                             const float in[4], float out[4]);
00221   static void PointMultiply(const double Elements[16],
00222                             const double in[4], double out[4]);
00223 //ETX
00224
00225 protected:
00226   vtkMatrix4x4() { vtkMatrix4x4::Identity(*this->Element); };
00227   ~vtkMatrix4x4() {};
00228
00229   float FloatPoint[4];
00230   double DoublePoint[4];
00231 private:
00232   vtkMatrix4x4(const vtkMatrix4x4&);  // Not implemented.
00233   void operator= (const vtkMatrix4x4& source);  // Not implemented.
00234 };
00235
00236 inline void vtkMatrix4x4::SetElement(int i, int j, double value)
00237 {
00238   if (this->Element[i][j] != value)
00239     {
00240     this->Element[i][j] = value;
00241     this->Modified();
00242     }
00243 }
00244
00245 #endif
00246
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMatrixToHomogeneousTransform.h Source File

Common/vtkMatrixToHomogeneousTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMatrixToHomogeneousTransform.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00059 #ifndef __vtkMatrixToHomogeneousTransform_h
00060 #define __vtkMatrixToHomogeneousTransform_h
00061
00062 #include "vtkHomogeneousTransform.h"
00063 #include "vtkMatrix4x4.h"
00064
00065 class VTK_COMMON_EXPORT vtkMatrixToHomogeneousTransform :
00066   public vtkHomogeneousTransform
00067 {
00068  public:
00069   static vtkMatrixToHomogeneousTransform *New();
00070   vtkTypeMacro(vtkMatrixToHomogeneousTransform,vtkHomogeneousTransform);
00071   void PrintSelf (ostream& os, vtkIndent indent);
00072
00073   // Set the input matrix.  Any modifications to the matrix will be
00074   // reflected in the transformation.
00075   vtkSetObjectMacro(Input,vtkMatrix4x4);
00076   vtkGetObjectMacro(Input,vtkMatrix4x4);
00077
00080   void Inverse();
00081
00083   unsigned long GetMTime();
00084
00086   vtkAbstractTransform *MakeTransform();
00087
00089
00090   void SetMatrix(vtkMatrix4x4 *matrix) {
00091     this->SetInput(matrix);
00092     vtkWarningMacro("SetMatrix: deprecated, use SetInput() instead"); }
00094
00095 protected:
00096   vtkMatrixToHomogeneousTransform();
00097   ~vtkMatrixToHomogeneousTransform();
00098
00099   void InternalUpdate();
00100   void InternalDeepCopy(vtkAbstractTransform *transform);
00101
00102   int InverseFlag;
00103   vtkMatrix4x4 *Input;
00104 private:
00105   vtkMatrixToHomogeneousTransform(const vtkMatrixToHomogeneousTransform&);  // Not implemented.
00106   void operator=(const vtkMatrixToHomogeneousTransform&);  // Not implemented.
00107 };
00108
00109 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMatrixToLinearTransform.h Source File

Common/vtkMatrixToLinearTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMatrixToLinearTransform.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00059 #ifndef __vtkMatrixToLinearTransform_h
00060 #define __vtkMatrixToLinearTransform_h
00061
00062 #include "vtkLinearTransform.h"
00063 #include "vtkMatrix4x4.h"
00064
00065 class VTK_COMMON_EXPORT vtkMatrixToLinearTransform : public vtkLinearTransform
00066 {
00067  public:
00068   static vtkMatrixToLinearTransform *New();
00069   vtkTypeMacro(vtkMatrixToLinearTransform,vtkLinearTransform);
00070   void PrintSelf (ostream& os, vtkIndent indent);
00071
00073
00075   vtkSetObjectMacro(Input,vtkMatrix4x4);
00076   vtkGetObjectMacro(Input,vtkMatrix4x4);
00078
00081   void Inverse();
00082
00084   unsigned long GetMTime();
00085
00087   vtkAbstractTransform *MakeTransform();
00088
00090
00091   void SetMatrix(vtkMatrix4x4 *matrix) {
00092     this->SetInput(matrix);
00093     vtkWarningMacro("SetMatrix: deprecated, use SetInput() instead"); }
00095
00096 protected:
00097   vtkMatrixToLinearTransform();
00098   ~vtkMatrixToLinearTransform();
00099
00100   void InternalUpdate();
00101   void InternalDeepCopy(vtkAbstractTransform *transform);
00102
00103   int InverseFlag;
00104   vtkMatrix4x4 *Input;
00105 private:
00106   vtkMatrixToLinearTransform(const vtkMatrixToLinearTransform&);  // Not implemented.
00107   void operator=(const vtkMatrixToLinearTransform&);  // Not implemented.
00108 };
00109
00110 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMultiThreader.h Source File

Common/vtkMultiThreader.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMultiThreader.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkMultiThreader_h
00053 #define __vtkMultiThreader_h
00054
00055 #include "vtkObject.h"
00056 #include "vtkMutexLock.h"
00057
00058 #ifdef VTK_USE_SPROC
00059 #include <sys/types.h>
00060 #include <unistd.h>
00061 #endif
00062
00063 #ifdef VTK_USE_PTHREADS
00064 #include <sys/types.h>
00065 #include <unistd.h>
00066 #endif
00067
00068 // If VTK_USE_SPROC is defined, then sproc() will be used to create
00069 // multiple threads on an SGI. If VTK_USE_PTHREADS is defined, then
00070 // pthread_create() will be used to create multiple threads (on
00071 // a sun, for example)
00072
00073 // The maximum number of threads allowed
00074 #ifdef VTK_USE_SPROC
00075 #define VTK_MAX_THREADS              32
00076 #endif
00077
00078 #ifdef VTK_USE_PTHREADS
00079 #define VTK_MAX_THREADS              32
00080 #endif
00081
00082
00083 #ifdef VTK_USE_WIN32_THREADS
00084 #define VTK_MAX_THREADS              8
00085 #endif
00086
00087 #ifndef VTK_USE_WIN32_THREADS
00088 #ifndef VTK_USE_SPROC
00089 #ifndef VTK_USE_PTHREADS
00090 #define VTK_MAX_THREADS              1
00091 #endif
00092 #endif
00093 #endif
00094
00095 // If VTK_USE_PTHREADS is defined, then the multithreaded
00096 // function is of type void *, and returns NULL
00097 // Otherwise the type is void which is correct for WIN32
00098 // and SPROC
00099 //BTX
00100 #ifdef VTK_USE_SPROC
00101 typedef int vtkThreadProcessIDType;
00102 #endif
00103
00104 #ifdef VTK_USE_PTHREADS
00105 typedef void *(*vtkThreadFunctionType)(void *);
00106 typedef pthread_t vtkThreadProcessIDType;
00107 #define VTK_THREAD_RETURN_VALUE  NULL
00108 #define VTK_THREAD_RETURN_TYPE   void *
00109 #endif
00110
00111 #ifdef VTK_USE_WIN32_THREADS
00112 typedef LPTHREAD_START_ROUTINE vtkThreadFunctionType;
00113 typedef HANDLE vtkThreadProcessIDType;
00114 #define VTK_THREAD_RETURN_VALUE 0
00115 #define VTK_THREAD_RETURN_TYPE DWORD __stdcall
00116 #endif
00117
00118 #if !defined(VTK_USE_PTHREADS) && !defined(VTK_USE_WIN32_THREADS)
00119 typedef void (*vtkThreadFunctionType)(void *);
00120 typedef int vtkThreadProcessIDType;
00121 #define VTK_THREAD_RETURN_VALUE
00122 #define VTK_THREAD_RETURN_TYPE void
00123 #endif
00124 //ETX
00125
00136 //BTX
00137 struct ThreadInfoStruct
00138 {
00139   int                 ThreadID;
00140   int                 NumberOfThreads;
00141   int                 *ActiveFlag;
00142   vtkMutexLock        *ActiveFlagLock;
00143   void                *UserData;
00144 };
00145 //ETX
00146
00147 class VTK_COMMON_EXPORT vtkMultiThreader : public vtkObject
00148 {
00149 public:
00150   static vtkMultiThreader *New();
00151
00152   vtkTypeMacro(vtkMultiThreader,vtkObject);
00153   void PrintSelf(ostream& os, vtkIndent indent);
00154
00156
00159   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00160   vtkGetMacro( NumberOfThreads, int );
00162
00164
00167   static void SetGlobalMaximumNumberOfThreads(int val);
00168   static int  GetGlobalMaximumNumberOfThreads();
00170
00172
00175   static void SetGlobalDefaultNumberOfThreads(int val);
00176   static int  GetGlobalDefaultNumberOfThreads();
00178
00179   // These methods are excluded from Tcl wrapping 1) because the
00180   // wrapper gives up on them and 2) because they really shouldn't be
00181   // called from a script anyway.
00182   //BTX
00183
00186   void SingleMethodExecute();
00187
00191   void MultipleMethodExecute();
00192
00197   void SetSingleMethod(vtkThreadFunctionType, void *data );
00198
00201   void SetMultipleMethod( int index, vtkThreadFunctionType, void *data );
00202
00206   int SpawnThread( vtkThreadFunctionType, void *data );
00207
00209   void TerminateThread( int thread_id );
00210
00211
00212 protected:
00213   vtkMultiThreader();
00214   ~vtkMultiThreader();
00215
00216   // The number of threads to use
00217   int                        NumberOfThreads;
00218
00219   // An array of thread info containing a thread id
00220   // (0, 1, 2, .. VTK_MAX_THREADS-1), the thread count, and a pointer
00221   // to void so that user data can be passed to each thread
00222   ThreadInfoStruct           ThreadInfoArray[VTK_MAX_THREADS];
00223
00224   // The methods
00225   vtkThreadFunctionType      SingleMethod;
00226   vtkThreadFunctionType      MultipleMethod[VTK_MAX_THREADS];
00227
00228   // Storage of MutexFunctions and ints used to control spawned
00229   // threads and the spawned thread ids
00230   int                        SpawnedThreadActiveFlag[VTK_MAX_THREADS];
00231   vtkMutexLock               *SpawnedThreadActiveFlagLock[VTK_MAX_THREADS];
00232   vtkThreadProcessIDType     SpawnedThreadProcessID[VTK_MAX_THREADS];
00233   ThreadInfoStruct           SpawnedThreadInfoArray[VTK_MAX_THREADS];
00234
00235 //ETX
00236
00237   // Internal storage of the data
00238   void                       *SingleData;
00239   void                       *MultipleData[VTK_MAX_THREADS];
00240
00241 private:
00242   vtkMultiThreader(const vtkMultiThreader&);  // Not implemented.
00243   void operator=(const vtkMultiThreader&);  // Not implemented.
00244 };
00245
00246 #endif
00247
00248
00249
00250
00251
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkMutexLock.h Source File

Common/vtkMutexLock.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMutexLock.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00051 #ifndef __vtkMutexVariable_h
00052 #define __vtkMutexVariable_h
00053
00054
00055 #include "vtkObject.h"
00056
00057 //BTX
00058
00059 #ifdef VTK_USE_SPROC
00060 #include <abi_mutex.h>
00061 typedef abilock_t vtkMutexType;
00062 #endif
00063
00064 #ifdef VTK_USE_PTHREADS
00065 #include <pthread.h>
00066 typedef pthread_mutex_t vtkMutexType;
00067 #endif
00068
00069 #ifdef VTK_USE_WIN32_THREADS
00070 #include <winbase.h>
00071 typedef HANDLE vtkMutexType;
00072 #endif
00073
00074 #ifndef VTK_USE_SPROC
00075 #ifndef VTK_USE_PTHREADS
00076 #ifndef VTK_USE_WIN32_THREADS
00077 typedef int vtkMutexType;
00078 #endif
00079 #endif
00080 #endif
00081
00082 // Mutex lock that is not a vtkObject.
00083 class VTK_COMMON_EXPORT vtkSimpleMutexLock
00084 {
00085 public:
00086   // left public purposely
00087   vtkSimpleMutexLock();
00088   virtual ~vtkSimpleMutexLock();
00089
00090   static vtkSimpleMutexLock *New();
00091
00092   virtual const char *GetClassName() {return "vtkSimpleMutexLock";};
00093   virtual int IsA(const char *name);
00094   static vtkSimpleMutexLock *SafeDownCast(vtkSimpleMutexLock *o);
00095
00096   void Delete() {delete this;}
00097
00099   void Lock( void );
00100
00102   void Unlock( void );
00103
00104 protected:
00105   vtkMutexType   MutexLock;
00106 };
00107
00108 //ETX
00109
00110 class VTK_COMMON_EXPORT vtkMutexLock : public vtkObject
00111 {
00112 public:
00113   static vtkMutexLock *New();
00114
00115   vtkTypeMacro(vtkMutexLock,vtkObject);
00116   void PrintSelf(ostream& os, vtkIndent indent);
00117
00119   void Lock( void );
00120
00122   void Unlock( void );
00123
00124 protected:
00125   vtkSimpleMutexLock   SimpleMutexLock;
00126   vtkMutexLock() {};
00127 private:
00128   vtkMutexLock(const vtkMutexLock&);  // Not implemented.
00129   void operator=(const vtkMutexLock&);  // Not implemented.
00130 };
00131
00132
00133 inline void vtkMutexLock::Lock( void )
00134 {
00135   this->SimpleMutexLock.Lock();
00136 }
00137
00138 inline void vtkMutexLock::Unlock( void )
00139 {
00140   this->SimpleMutexLock.Unlock();
00141 }
00142
00143 #endif
Generated on Thu Dec 20 01:04:18 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkNormals.h Source File

Common/vtkNormals.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkNormals.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00051 #ifndef __vtkNormals_h
00052 #define __vtkNormals_h
00053
00054 #include "vtkAttributeData.h"
00055
00056 class vtkIdList;
00057 class vtkNormals;
00058
00059 class VTK_COMMON_EXPORT vtkNormals : public vtkAttributeData
00060 {
00061 public:
00062   static vtkNormals *New(int dataType);
00063   static vtkNormals *New();
00064
00065   vtkTypeMacro(vtkNormals,vtkAttributeData);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067
00069
00070   vtkAttributeData *MakeObject()
00071     {return vtkNormals::New(this->GetDataType());}
00073
00075
00076   vtkIdType GetNumberOfNormals()
00077     {return this->Data->GetNumberOfTuples();}
00079
00081
00082   float *GetNormal(vtkIdType id)
00083     {return this->Data->GetTuple(id);}
00085
00087
00089   void GetNormal(vtkIdType id, float n[3])
00090     {this->Data->GetTuple(id,n);}
00091   void GetNormal(vtkIdType id, double n[3])
00092     {this->Data->GetTuple(id,n);}
00094
00096
00099   void SetNormal(vtkIdType id, const float n[3])
00100     {this->Data->SetTuple(id,n);}
00101   void SetNormal(vtkIdType id, const double n[3])
00102     {this->Data->SetTuple(id,n);}
00103   void SetNormal(vtkIdType id, double nx, double ny, double nz);
00105
00107
00109   void InsertNormal(vtkIdType id, const double n[3])
00110     {this->Data->InsertTuple(id,n);}
00111   void InsertNormal(vtkIdType id, float n[3])
00112     {this->Data->InsertTuple(id,n);}
00113   void InsertNormal(vtkIdType id, double nx, double ny, double nz);
00115
00117
00118   vtkIdType InsertNextNormal(const float n[3])
00119     {return this->Data->InsertNextTuple(n);}
00120   vtkIdType InsertNextNormal(const double n[3])
00121     {return this->Data->InsertNextTuple(n);}
00122   vtkIdType InsertNextNormal(double nx, double ny, double nz);
00124
00128   void SetNumberOfNormals(vtkIdType number);
00129
00131   void GetNormals(vtkIdList *ptId, vtkNormals *fn);
00132
00133 protected:
00134   vtkNormals();
00135   ~vtkNormals() {};
00136
00137 private:
00138   vtkNormals(const vtkNormals&);  // Not implemented.
00139   void operator=(const vtkNormals&);  // Not implemented.
00140 };
00141
00142
00143 inline void vtkNormals::SetNumberOfNormals(vtkIdType number)
00144 {
00145   this->Data->SetNumberOfComponents(3);
00146   this->Data->SetNumberOfTuples(number);
00147 }
00148
00149 inline void vtkNormals::SetNormal(vtkIdType id, double nx, double ny, double nz)
00150 {
00151   double n[3];
00152   n[0] = nx;
00153   n[1] = ny;
00154   n[2] = nz;
00155   this->Data->SetTuple(id,n);
00156 }
00157
00158 inline void vtkNormals::InsertNormal(vtkIdType id, double nx, double ny,
00159                                      double nz)
00160 {
00161   double n[3];
00162
00163   n[0] = nx;
00164   n[1] = ny;
00165   n[2] = nz;
00166   this->Data->InsertTuple(id,n);
00167 }
00168
00169 inline vtkIdType vtkNormals::InsertNextNormal(double nx, double ny, double nz)
00170 {
00171   double n[3];
00172
00173   n[0] = nx;
00174   n[1] = ny;
00175   n[2] = nz;
00176   return this->Data->InsertNextTuple(n);
00177 }
00178
00179
00180 // These include files are placed here so that if Normals.h is included
00181 // all other classes necessary for compilation are also included.
00182 #include "vtkIdList.h"
00183
00184 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkObject.h Source File

Common/vtkObject.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkObject.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00076 #ifndef __vtkObject_h
00077 #define __vtkObject_h
00078
00079 #include "vtkIndent.h"
00080 #include "vtkTimeStamp.h"
00081 #include "vtkSetGet.h"
00082
00083 class vtkSubjectHelper;
00084 class vtkCommand;
00085
00086 class VTK_COMMON_EXPORT vtkObject
00087 {
00088 public:
00091   virtual const char *GetClassName() {return "vtkObject";};
00092
00096   static int IsTypeOf(const char *name);
00097
00101   virtual int IsA(const char *name);
00102
00107   static vtkObject *SafeDownCast(vtkObject *o);
00108
00112   virtual void Delete();
00113
00115
00117   static vtkObject *New()
00118     {return new vtkObject;}
00120
00121 #ifdef _WIN32
00122   // avoid dll boundary problems
00123   void* operator new( size_t tSize, const char *, int);
00124   void* operator new( size_t tSize );
00125   void operator delete( void* p );
00126 #endif
00127
00129   virtual void DebugOn();
00130
00132   virtual void DebugOff();
00133
00135   unsigned char GetDebug();
00136
00138   void SetDebug(unsigned char debugFlag);
00139
00142   static void BreakOnError();
00143
00148   virtual void Modified();
00149
00151   virtual unsigned long GetMTime();
00152
00155   void Print(ostream& os);
00156
00158
00162   virtual void PrintSelf(ostream& os, vtkIndent indent);
00163   virtual void PrintHeader(ostream& os, vtkIndent indent);
00164   virtual void PrintTrailer(ostream& os, vtkIndent indent);
00166
00168
00170   static void SetGlobalWarningDisplay(int val);
00171   static void GlobalWarningDisplayOn(){vtkObject::SetGlobalWarningDisplay(1);};
00172   static void GlobalWarningDisplayOff()
00173     {vtkObject::SetGlobalWarningDisplay(0);};
00174   static int  GetGlobalWarningDisplay();
00176
00178   void Register(vtkObject* o);
00179
00183   virtual void UnRegister(vtkObject* o);
00184
00186
00187   int  GetReferenceCount()
00188     {return this->ReferenceCount;}
00190
00192   void SetReferenceCount(int);
00193
00195
00200   unsigned long AddObserver(unsigned long event, vtkCommand *);
00201   unsigned long AddObserver(const char *event, vtkCommand *);
00202   vtkCommand *GetCommand(unsigned long tag);
00203   void InvokeEvent(unsigned long event, void *callData);
00204   void InvokeEvent(const char *event, void *callData);
00205   //ETX
00206   void RemoveObserver(unsigned long tag);
00207   int HasObserver(unsigned long event);
00208   int HasObserver(const char *event);
00210
00211 protected:
00212   vtkObject();
00213   virtual ~vtkObject();
00214
00215   unsigned char Debug;     // Enable debug messages
00216   vtkTimeStamp MTime;      // Keep track of modification time
00217   int ReferenceCount;      // Number of uses of this object by other objects
00218   vtkSubjectHelper *SubjectHelper;
00219
00220 private:
00221   //BTX
00222   friend VTK_COMMON_EXPORT ostream& operator<<(ostream& os, vtkObject& o);
00223   //ETX
00224 private:
00225   vtkObject(const vtkObject&);  // Not implemented.
00226   void operator=(const vtkObject&);  // Not implemented.
00227 };
00228
00229 #endif
00230
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkObjectFactory.h Source File

Common/vtkObjectFactory.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkObjectFactory.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00072 #ifndef __vtkObjectFactory_h
00073 #define __vtkObjectFactory_h
00074
00075
00076
00077
00078 #include "vtkObject.h"
00079
00080 class vtkObjectFactoryCollection;
00081 class vtkOverrideInformationCollection;
00082
00083 class VTK_COMMON_EXPORT vtkObjectFactory : public vtkObject
00084 {
00085 public:
00086   // Class Methods used to interface with the registered factories
00087
00089
00093   static vtkObject* CreateInstance(const char* vtkclassname);
00094   // Description:
00095   // Re-check the VTK_AUTOLOAD_PATH for new factory libraries.
00096   // This calls UnRegisterAll before re-loading
00097   static void ReHash();
00098   // Description:
00099   // Register a factory so it can be used to create vtk objects
00100   static void RegisterFactory(vtkObjectFactory* );
00101   // Description:
00102   // Remove a factory from the list of registered factories
00103   static void UnRegisterFactory(vtkObjectFactory*);
00104   // Description:
00105   // Unregister all factories
00106   static void UnRegisterAllFactories();
00108
00111   static vtkObjectFactoryCollection* GetRegisteredFactories();
00112
00115   static int HasOverrideAny(const char* className);
00116
00118
00120   static void GetOverrideInformation(const char* name,
00121                                      vtkOverrideInformationCollection*);
00123
00125
00127   static void SetAllEnableFlags(int flag,
00128                                 const char* className);
00129   // Description:
00130   // Set the enable flag for a given named class subclass pair
00131   // for all registered factories.
00132   static void SetAllEnableFlags(int flag,
00133                                 const char* className,
00134                                 const char* subclassName);
00136
00137   // Instance methods to be used on individual instances of vtkObjectFactory
00138
00139   // Methods from vtkObject
00140   vtkTypeMacro(vtkObjectFactory,vtkObject);
00142   virtual void PrintSelf(ostream& os, vtkIndent indent);
00143
00150   virtual const char* GetVTKSourceVersion() = 0;
00151
00153   virtual const char* GetDescription() = 0;
00154
00156   virtual int GetNumberOfOverrides();
00157
00159   virtual const char* GetClassOverrideName(int index);
00160
00163   virtual const char* GetClassOverrideWithName(int index);
00164
00166   virtual int GetEnableFlag(int index);
00167
00169   virtual const char* GetOverrideDescription(int index);
00170
00172
00174   virtual void SetEnableFlag(int flag,
00175                              const char* className,
00176                              const char* subclassName);
00177   virtual int GetEnableFlag(const char* className,
00178                             const char* subclassName);
00180
00182
00183   virtual int HasOverride(const char* className);
00184   // Description:
00185   // Return 1 if this factory overrides the given class name, 0 otherwise.
00186   virtual int HasOverride(const char* className, const char* subclassName);
00188
00191   virtual void Disable(const char* className);
00192
00194
00195   vtkGetStringMacro(LibraryPath);
00197
00198   //BTX
00199   typedef vtkObject* (*CreateFunction)();
00200   //ETX
00201 protected:
00202   //BTX
00203
00205
00206   void RegisterOverride(const char* classOverride,
00207                         const char* overrideClassName,
00208                         const char* description,
00209                         int enableFlag,
00210                         CreateFunction createFunction);
00212
00213   //ETX
00214
00215
00219   virtual vtkObject* CreateObject(const char* vtkclassname );
00220
00221   vtkObjectFactory();
00222   ~vtkObjectFactory();
00223   //BTX
00224   struct OverrideInformation
00225   {
00226     char* Description;
00227     char* OverrideWithName;
00228     int EnabledFlag;
00229     CreateFunction CreateCallback;
00230   };
00231   //ETX
00232   OverrideInformation* OverrideArray;
00233   char** OverrideClassNames;
00234   int SizeOverrideArray;
00235   int OverrideArrayLength;
00236
00237 private:
00238   void GrowOverrideArray();
00239
00241
00243   static void Init();
00244   // Description:
00245   // Register default factories which are not loaded at run time.
00246   static void RegisterDefaults();
00247   // Description:
00248   // Load dynamic factories from the VTK_AUTOLOAD_PATH
00249   static void LoadDynamicFactories();
00250   // Description:
00251   // Load all dynamic libraries in the given path
00252   static void LoadLibrariesInPath( const char*);
00254
00255   // list of registered factories
00256   static vtkObjectFactoryCollection* RegisteredFactories;
00257
00258   // member variables for a factory set by the base class
00259   // at load or register time
00260   void* LibraryHandle;
00261   char* LibraryVTKVersion;
00262   char* LibraryCompilerUsed;
00263   char* LibraryPath;
00264 private:
00265   vtkObjectFactory(const vtkObjectFactory&);  // Not implemented.
00266   void operator=(const vtkObjectFactory&);  // Not implemented.
00267 };
00268
00269 // Macro to create an object creation function.
00270 // The name of the function will by vtkObjectFactoryCreateclassname
00271 // where classname is the name of the class being created
00272 #define VTK_CREATE_CREATE_FUNCTION(classname) \
00273 static vtkObject* vtkObjectFactoryCreate##classname() \
00274 { return classname::New(); }
00275
00276 #endif
00277
00278
00279 #ifdef _WIN32
00280 #define VTK_FACTORY_INTERFACE_EXPORT  __declspec( dllexport )
00281 #else
00282 #define VTK_FACTORY_INTERFACE_EXPORT
00283 #endif
00284
00285 // Macro to create the interface "C" functions used in
00286 // a dll or shared library that contains a VTK object factory.
00287 // Put this function in the .cxx file of your object factory,
00288 // and pass in the name of the factory sub-class that you want
00289 // the dll to create.
00290 #define VTK_FACTORY_INTERFACE_IMPLEMENT(factoryName)  \
00291 extern "C"                                      \
00292 VTK_FACTORY_INTERFACE_EXPORT                    \
00293 const char* vtkGetFactoryCompilerUsed()         \
00294 {                                               \
00295   return VTK_CXX_COMPILER;                      \
00296 }                                               \
00297 extern "C"                                      \
00298 VTK_FACTORY_INTERFACE_EXPORT                    \
00299 const char* vtkGetFactoryVersion()              \
00300 {                                               \
00301   return VTK_SOURCE_VERSION;                    \
00302 }                                               \
00303 extern "C"                                      \
00304 VTK_FACTORY_INTERFACE_EXPORT                    \
00305 vtkObjectFactory* vtkLoad()                     \
00306 {                                               \
00307   return factoryName ::New();                   \
00308 }
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkObjectFactoryCollection.h Source File

Common/vtkObjectFactoryCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkObjectFactoryCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkObjectFactoryCollection_h
00056 #define __vtkObjectFactoryCollection_h
00057
00058 #include "vtkCollection.h"
00059 #include "vtkObjectFactory.h"
00060 #include "vtkDebugLeaks.h"
00061
00062 class VTK_COMMON_EXPORT vtkObjectFactoryCollection : public vtkCollection
00063 {
00064 public:
00065   vtkTypeMacro(vtkObjectFactoryCollection,vtkCollection);
00066   static vtkObjectFactoryCollection *New()
00067     {
00068 #ifdef VTK_DEBUG_LEAKS
00069     vtkDebugLeaks::ConstructClass("vtkObjectFactoryCollection");
00070 #endif
00071 return new vtkObjectFactoryCollection;};
00072
00074   void AddItem(vtkObjectFactory *t) { this->vtkCollection::AddItem((vtkObject *)t); }
00075
00078   vtkObjectFactory *GetNextItem() { return static_cast<vtkObjectFactory *>(this->GetNextItemAsObject());}
00079
00080 protected:
00081   vtkObjectFactoryCollection() {};
00082   ~vtkObjectFactoryCollection() {};
00083
00084
00085 private:
00086   // hide the standard AddItem from the user and the compiler.
00087   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00088
00089 private:
00090   vtkObjectFactoryCollection(const vtkObjectFactoryCollection&);  // Not implemented.
00091   void operator=(const vtkObjectFactoryCollection&);  // Not implemented.
00092 };
00093
00094
00095 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkOldStyleCallbackCommand.h Source File

Common/vtkOldStyleCallbackCommand.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOldStyleCallbackCommand.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00046 #ifndef __vtkOldStyleCallbackCommand_h
00047 #define __vtkOldStyleCallbackCommand_h
00048
00049 #include "vtkCommand.h"
00050
00051 // the old style void fund(void *) callbacks
00052 class VTK_COMMON_EXPORT vtkOldStyleCallbackCommand : public vtkCommand
00053 {
00054 public:
00055   static vtkOldStyleCallbackCommand *New()
00056     {return new vtkOldStyleCallbackCommand;};
00057
00058   void SetClientData(void *cd)
00059     {this->ClientData = cd;};
00060   void SetCallback(void (*f)(void *))
00061     {this->Callback = f;};
00062   void SetClientDataDeleteCallback(void (*f)(void *))
00063     {this->ClientDataDeleteCallback = f;};
00064
00065   void Execute(vtkObject *,unsigned long, void *);
00066
00067   void *ClientData;
00068   void (*Callback)(void *);
00069   void (*ClientDataDeleteCallback)(void *);
00070 protected:
00071   vtkOldStyleCallbackCommand();
00072   ~vtkOldStyleCallbackCommand();
00073 };
00074
00075
00076 #endif /* __vtkOldStyleCallbackCommand_h */
00077
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkOrderedTriangulator.h Source File

Common/vtkOrderedTriangulator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOrderedTriangulator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00093 #ifndef __vtkOrderedTriangulator_h
00094 #define __vtkOrderedTriangulator_h
00095
00096 #include "vtkObject.h"
00097
00098 class vtkUnstructuredGrid;
00099 class vtkOTMesh;
00100 class vtkCellArray;
00101 class vtkMemoryPool;
00102
00103 class VTK_COMMON_EXPORT vtkOrderedTriangulator : public vtkObject
00104 {
00105 public:
00106   vtkTypeMacro(vtkOrderedTriangulator,vtkObject);
00107   void PrintSelf(ostream& os, vtkIndent indent);
00108
00110   static vtkOrderedTriangulator *New();
00111
00114   void InitTriangulation(float bounds[6], int numPts);
00115
00126   vtkIdType InsertPoint(vtkIdType id, float x[3], int type);
00127
00130   void Triangulate();
00131
00137   void UpdatePointType(vtkIdType internalId, int type);
00138
00140
00144   vtkSetMacro(PreSorted,int)
00145   vtkGetMacro(PreSorted,int)
00146   vtkBooleanMacro(PreSorted,int)
00148
00158   vtkIdType GetTetras(int classification, vtkUnstructuredGrid *ugrid);
00159
00167   vtkIdType AddTetras(int classification, vtkUnstructuredGrid *ugrid);
00168
00174   vtkIdType AddTetras(int classification, vtkCellArray *connectivity);
00175
00176 protected:
00177   vtkOrderedTriangulator();
00178   ~vtkOrderedTriangulator();
00179
00180 private:
00181   vtkOTMesh  *Mesh;
00182   int NumberOfPoints; //number of points inserted
00183   int MaximumNumberOfPoints; //maximum possible number of points to be inserted
00184   int PreSorted;
00185   vtkMemoryPool* Pool;
00186
00187 private:
00188   vtkOrderedTriangulator(const vtkOrderedTriangulator&);  // Not implemented.
00189   void operator=(const vtkOrderedTriangulator&);  // Not implemented.
00190 };
00191
00192 #endif
00193
00194
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkOutputWindow.h Source File

Common/vtkOutputWindow.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOutputWindow.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkOutputWindow_h
00056 #define __vtkOutputWindow_h
00057
00058 #include "vtkObject.h"
00059
00060 //BTX
00061
00062 class VTK_COMMON_EXPORT vtkOutputWindow;
00063
00064 class VTK_COMMON_EXPORT vtkOutputWindowSmartPointer
00065 {
00066 public:
00067   vtkOutputWindowSmartPointer(vtkOutputWindow* p) { this->Pointer=p; };
00068   void SetPointer(vtkOutputWindow* obj)
00069     {
00070       this->Pointer = obj;
00071     }
00072   ~vtkOutputWindowSmartPointer();
00073 private:
00074   vtkOutputWindow* Pointer;
00075 };
00076 //ETX
00077
00078 class VTK_COMMON_EXPORT vtkOutputWindow : public vtkObject
00079 {
00080 public:
00081 // Methods from vtkObject
00082   vtkTypeMacro(vtkOutputWindow,vtkObject);
00084   virtual void PrintSelf(ostream& os, vtkIndent indent);
00085
00087
00091   static vtkOutputWindow* New();
00092   // Description:
00093   // Return the singleton instance with no reference counting.
00094   static vtkOutputWindow* GetInstance();
00095   // Description:
00096   // Supply a user defined output window. Call ->Delete() on the supplied
00097   // instance after setting it.
00098   static void SetInstance(vtkOutputWindow *instance);
00099   // Description:
00100   // Display the text. Four virtual methods exist, depending on the type of
00101   // message to display. This allows redirection or reformatting of the
00102   // messages. The default implementation uses DisplayText for all.
00103   virtual void DisplayText(const char*);
00104   virtual void DisplayErrorText(const char*);
00105   virtual void DisplayWarningText(const char*);
00106   virtual void DisplayGenericWarningText(const char*);
00108
00109   virtual void DisplayDebugText(const char*);
00111
00113   vtkBooleanMacro(PromptUser,int);
00114   vtkSetMacro(PromptUser, int);
00116 //BTX
00117   // use this as a way of memory management when the
00118   // program exits the SmartPointer will be deleted which
00119   // will delete the Instance singleton
00120   static vtkOutputWindowSmartPointer SmartPointer;
00121 //ETX
00122 protected:
00123   vtkOutputWindow();
00124   virtual ~vtkOutputWindow();
00125   int PromptUser;
00126 private:
00127   static vtkOutputWindow* Instance;
00128 private:
00129   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
00130   void operator=(const vtkOutputWindow&);  // Not implemented.
00131 };
00132
00133 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkOverrideInformation.h Source File

Common/vtkOverrideInformation.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOverrideInformation.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2000 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00055 #ifndef __vtkOverrideInformation_h
00056 #define __vtkOverrideInformation_h
00057
00058
00059 #include "vtkObject.h"
00060 #include "vtkObjectFactory.h"
00061
00062
00063 class VTK_COMMON_EXPORT vtkOverrideInformation : public vtkObject
00064 {
00065 public:
00066   static vtkOverrideInformation* New();
00067   vtkTypeMacro(vtkOverrideInformation,vtkObject);
00069   virtual void PrintSelf(ostream& os, vtkIndent indent);
00070
00072
00075   const char* GetClassOverrideName()
00076     {
00077       return this->ClassOverrideName;
00078     }
00080
00082
00085   const char* GetClassOverrideWithName()
00086     {
00087       return this->ClassOverrideWithName;
00088     }
00090
00092
00094   const char* GetDescription()
00095     {
00096       return this->Description;
00097     }
00099
00101
00102   vtkObjectFactory* GetObjectFactory()
00103     {
00104       return this->ObjectFactory;
00105     }
00106   // Description:
00107   // Set the class override name
00108   vtkSetStringMacro(ClassOverrideName);
00109   // Set the class override with name
00110   vtkSetStringMacro(ClassOverrideWithName);
00111   // Set the description
00112   vtkSetStringMacro(Description);
00114 protected:
00115   vtkSetObjectMacro(ObjectFactory, vtkObjectFactory);
00116 private:
00117   vtkOverrideInformation();
00118   ~vtkOverrideInformation();
00119   // allow the object factory to set the values in this
00120   // class, but only the object factory
00121 //BTX
00122   friend class vtkObjectFactory;
00123 //ETX
00124
00125   char* ClassOverrideName;
00126   char* ClassOverrideWithName;
00127   char* Description;
00128   vtkObjectFactory* ObjectFactory;
00129 private:
00130   vtkOverrideInformation(const vtkOverrideInformation&);  // Not implemented.
00131   void operator=(const vtkOverrideInformation&);  // Not implemented.
00132 };
00133
00134 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkOverrideInformationCollection.h Source File

Common/vtkOverrideInformationCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOverrideInformationCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2000 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkOverrideInformationCollection_h
00056 #define __vtkOverrideInformationCollection_h
00057
00058 #include "vtkCollection.h"
00059 #include "vtkOverrideInformation.h"
00060
00061 class VTK_COMMON_EXPORT vtkOverrideInformationCollection : public vtkCollection
00062 {
00063 public:
00064   vtkTypeMacro(vtkOverrideInformationCollection,vtkCollection);
00065   static vtkOverrideInformationCollection *New();
00066
00068   void AddItem(vtkOverrideInformation *);
00069
00071   vtkOverrideInformation *GetNextItem();
00072
00073 protected:
00074   vtkOverrideInformationCollection() {};
00075   ~vtkOverrideInformationCollection() {};
00076
00077
00078 private:
00079   // hide the standard AddItem from the user and the compiler.
00080   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00081
00082 private:
00083   vtkOverrideInformationCollection(const vtkOverrideInformationCollection&);  // Not implemented.
00084   void operator=(const vtkOverrideInformationCollection&);  // Not implemented.
00085 };
00086
00087 inline void vtkOverrideInformationCollection::AddItem(vtkOverrideInformation *f)
00088 {
00089   this->vtkCollection::AddItem((vtkObject *)f);
00090 }
00091
00092 inline vtkOverrideInformation *vtkOverrideInformationCollection::GetNextItem()
00093 {
00094   return static_cast<vtkOverrideInformation *>(this->GetNextItemAsObject());
00095 }
00096
00097 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPerspectiveTransform.h Source File

Common/vtkPerspectiveTransform.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPerspectiveTransform.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00075 #ifndef __vtkPerspectiveTransform_h
00076 #define __vtkPerspectiveTransform_h
00077
00078 #include "vtkHomogeneousTransform.h"
00079
00080 class VTK_COMMON_EXPORT vtkPerspectiveTransform : public vtkHomogeneousTransform
00081 {
00082  public:
00083   static vtkPerspectiveTransform *New();
00084   vtkTypeMacro(vtkPerspectiveTransform,vtkHomogeneousTransform);
00085   void PrintSelf(ostream& os, vtkIndent indent);
00086
00090   void Identity() { this->Concatenation->Identity(); this->Modified(); };
00091
00095   void Inverse() { this->Concatenation->Inverse(); this->Modified(); };
00096
00098
00104   void AdjustViewport(double oldXMin, double oldXMax,
00105                       double oldYMin, double oldYMax,
00106                       double newXMin, double newXMax,
00107                       double newYMin, double newYMax);
00109
00111
00116   void AdjustZBuffer(double oldNearZ, double oldFarZ,
00117                      double newNearZ, double newFarZ);
00119
00121
00124   void Ortho(double xmin, double xmax, double ymin, double ymax,
00125              double znear, double zfar);
00127
00129
00133   void Frustum(double xmin, double xmax, double ymin, double ymax,
00134                double znear, double zfar);
00136
00141   void Perspective(double angle, double aspect, double znear, double zfar);
00142
00153   void Shear(double dxdz, double dydz, double zplane);
00154
00162   void Stereo(double angle, double focaldistance);
00163
00165
00168   void SetupCamera(const double position[3], const double focalpoint[3],
00169                    const double viewup[3]);
00171
00173
00175   void Translate(double x, double y, double z) {
00176     this->Concatenation->Translate(x,y,z); };
00177   void Translate(const double x[3]) { this->Translate(x[0], x[1], x[2]); };
00178   void Translate(const float x[3]) { this->Translate(x[0], x[1], x[2]); };
00180
00182
00186   void RotateWXYZ(double angle, double x, double y, double z) {
00187     this->Concatenation->Rotate(angle,x,y,z); };
00188   void RotateWXYZ(double angle, const double axis[3]) {
00189     this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
00190   void RotateWXYZ(double angle, const float axis[3]) {
00191     this->RotateWXYZ(angle, axis[0], axis[1], axis[2]); };
00193
00195
00198   void RotateX(double angle) { this->RotateWXYZ(angle, 1, 0, 0); };
00199   void RotateY(double angle) { this->RotateWXYZ(angle, 0, 1, 0); };
00200   void RotateZ(double angle) { this->RotateWXYZ(angle, 0, 0, 1); };
00202
00204
00207   void Scale(double x, double y, double z) {
00208     this->Concatenation->Scale(x,y,z); };
00209   void Scale(const double s[3]) { this->Scale(s[0], s[1], s[2]); };
00210   void Scale(const float s[3]) { this->Scale(s[0], s[1], s[2]); };
00212
00214
00216   void SetMatrix(vtkMatrix4x4 *matrix) {
00217     this->SetMatrix(*matrix->Element); };
00218   void SetMatrix(const double elements[16]) {
00219     this->Identity(); this->Concatenate(elements); };
00221
00223
00225   void Concatenate(vtkMatrix4x4 *matrix) {
00226     this->Concatenate(*matrix->Element); };
00227   void Concatenate(const double elements[16]) {
00228     this->Concatenation->Concatenate(elements); };
00230
00236   void Concatenate(vtkHomogeneousTransform *transform);
00237
00239
00244   void PreMultiply() {
00245     if (this->Concatenation->GetPreMultiplyFlag()) { return; }
00246     this->Concatenation->SetPreMultiplyFlag(1); this->Modified(); };
00248
00250
00255   void PostMultiply()  {
00256     if (!this->Concatenation->GetPreMultiplyFlag()) { return; }
00257     this->Concatenation->SetPreMultiplyFlag(0); this->Modified(); };
00259
00261
00263   int GetNumberOfConcatenatedTransforms() {
00264     return this->Concatenation->GetNumberOfTransforms() +
00265       (this->Input == NULL ? 0 : 1); };
00267
00269
00274   vtkHomogeneousTransform *GetConcatenatedTransform(int i) {
00275     if (this->Input == NULL) {
00276       return (vtkHomogeneousTransform *)this->Concatenation->GetTransform(i); }
00277     else if (i < this->Concatenation->GetNumberOfPreTransforms()) {
00278       return (vtkHomogeneousTransform *)this->Concatenation->GetTransform(i); }
00279     else if (i > this->Concatenation->GetNumberOfPreTransforms()) {
00280       return (vtkHomogeneousTransform*)this->Concatenation->GetTransform(i-1);}
00281     else if (this->GetInverseFlag()) {
00282       return (vtkHomogeneousTransform *)this->Input->GetInverse(); }
00283     else {
00284       return (vtkHomogeneousTransform *)this->Input; } };
00286
00288
00294   void SetInput(vtkHomogeneousTransform *input);
00295   vtkHomogeneousTransform *GetInput() { return this->Input; };
00297
00299
00303   int GetInverseFlag() {
00304     return this->Concatenation->GetInverseFlag(); };
00306
00308
00309   void Push() { if (this->Stack == NULL) {
00310                     this->Stack = vtkTransformConcatenationStack::New(); }
00311                 this->Stack->Push(&this->Concatenation);
00312                 this->Modified(); };
00314
00316
00318   void Pop() { if (this->Stack == NULL) { return; }
00319                this->Stack->Pop(&this->Concatenation);
00320                this->Modified(); };
00322
00325   vtkAbstractTransform *MakeTransform();
00326
00333   int CircuitCheck(vtkAbstractTransform *transform);
00334
00336   unsigned long GetMTime();
00337
00338 protected:
00339   vtkPerspectiveTransform();
00340   ~vtkPerspectiveTransform();
00341
00342   void InternalDeepCopy(vtkAbstractTransform *t);
00343   void InternalUpdate();
00344
00345   vtkHomogeneousTransform *Input;
00346   vtkTransformConcatenation *Concatenation;
00347   vtkTransformConcatenationStack *Stack;
00348 private:
00349   vtkPerspectiveTransform(const vtkPerspectiveTransform& t);  // Not implemented.
00350   void operator=(const vtkPerspectiveTransform&);  // Not implemented.
00351 };
00352
00353
00354 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPixel.h Source File

Common/vtkPixel.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPixel.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00058 #ifndef __vtkPixel_h
00059 #define __vtkPixel_h
00060
00061 #include "vtkCell.h"
00062 #include "vtkLine.h"
00063
00064 class VTK_COMMON_EXPORT vtkPixel : public vtkCell
00065 {
00066 public:
00067   static vtkPixel *New();
00068   vtkTypeMacro(vtkPixel,vtkCell);
00069
00071
00072   vtkCell *MakeObject();
00073   int GetCellType() {return VTK_PIXEL;};
00074   int GetCellDimension() {return 2;};
00075   int GetNumberOfEdges() {return 4;};
00076   int GetNumberOfFaces() {return 0;};
00077   vtkCell *GetEdge(int edgeId);
00078   vtkCell *GetFace(int) {return 0;};
00079   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00080   void Contour(float value, vtkDataArray *cellScalars,
00081                vtkPointLocator *locator, vtkCellArray *verts,
00082                vtkCellArray *lines, vtkCellArray *polys,
00083                vtkPointData *inPd, vtkPointData *outPd,
00084                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00085   void Clip(float value, vtkDataArray *cellScalars,
00086             vtkPointLocator *locator, vtkCellArray *polys,
00087             vtkPointData *inPd, vtkPointData *outPd,
00088             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00089             int insideOut);
00090   int EvaluatePosition(float x[3], float* closestPoint,
00091                        int& subId, float pcoords[3],
00092                        float& dist2, float *weights);
00093   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00094                         float *weights);
00095   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00096                         float x[3], float pcoords[3], int& subId);
00097   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00098   void Derivatives(int subId, float pcoords[3], float *values,
00099                    int dim, float *derivs);
00101
00103
00104   static void InterpolationFunctions(float pcoords[3], float weights[4]);
00105   static void InterpolationDerivs(float pcoords[3], float derivs[8]);
00107
00108
00109 protected:
00110   vtkPixel();
00111   ~vtkPixel();
00112
00113   vtkLine *Line;
00114
00115 private:
00116   vtkPixel(const vtkPixel&);  // Not implemented.
00117   void operator=(const vtkPixel&);  // Not implemented.
00118 };
00119
00120 #endif
00121
00122
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPlane.h Source File

Common/vtkPlane.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPlane.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00058 #ifndef __vtkPlane_h
00059 #define __vtkPlane_h
00060
00061 #include <math.h>
00062 #include "vtkImplicitFunction.h"
00063
00064 class VTK_COMMON_EXPORT vtkPlane : public vtkImplicitFunction
00065 {
00066 public:
00068   static vtkPlane *New();
00069
00070   vtkTypeMacro(vtkPlane,vtkImplicitFunction);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072
00074
00075   float EvaluateFunction(float x[3]);
00076   float EvaluateFunction(float x, float y, float z)
00077     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00079
00081   void EvaluateGradient(float x[3], float g[3]);
00082
00084
00085   vtkSetVector3Macro(Normal,float);
00086   vtkGetVectorMacro(Normal,float,3);
00088
00090
00092   vtkSetVector3Macro(Origin,float);
00093   vtkGetVectorMacro(Origin,float,3);
00095
00097
00100   static void ProjectPoint(float x[3], float origin[3], float normal[3],
00101                            float xproj[3]);
00102   static void ProjectPoint(double x[3], double origin[3], double normal[3],
00103                            double xproj[3]);
00105
00107
00110   static void GeneralizedProjectPoint(float x[3], float origin[3],
00111                                       float normal[3], float xproj[3]);
00113
00115
00116   static float Evaluate(float normal[3], float origin[3], float x[3]);
00117   static float Evaluate(double normal[3], double origin[3], double x[3]);
00119
00122   static float DistanceToPlane(float x[3], float n[3], float p0[3]);
00123
00125
00130   static int IntersectWithLine(float p1[3], float p2[3], float n[3],
00131                                float p0[3], float& t, float x[3]);
00133
00134
00135 protected:
00136   vtkPlane();
00137   ~vtkPlane() {};
00138
00139   float Normal[3];
00140   float Origin[3];
00141
00142 private:
00143   vtkPlane(const vtkPlane&);  // Not implemented.
00144   void operator=(const vtkPlane&);  // Not implemented.
00145 };
00146
00147 inline float vtkPlane::Evaluate(float normal[3], float origin[3], float x[3])
00148 {
00149   return normal[0]*(x[0]-origin[0]) + normal[1]*(x[1]-origin[1]) +
00150          normal[2]*(x[2]-origin[2]);
00151 }
00152 inline float vtkPlane::Evaluate(double normal[3], double origin[3],double x[3])
00153 {
00154   return normal[0]*(x[0]-origin[0]) + normal[1]*(x[1]-origin[1]) +
00155          normal[2]*(x[2]-origin[2]);
00156 }
00157
00158 inline float vtkPlane::DistanceToPlane(float x[3], float n[3], float p0[3])
00159 {
00160   return ((float) fabs(n[0]*(x[0]-p0[0]) + n[1]*(x[1]-p0[1]) +
00161                        n[2]*(x[2]-p0[2])));
00162 }
00163
00164 #endif
00165
00166
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPlaneCollection.h Source File

Common/vtkPlaneCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPlaneCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00052 #ifndef __vtkPlaneCollection_h
00053 #define __vtkPlaneCollection_h
00054
00055 #include "vtkCollection.h"
00056 #include "vtkPlane.h"
00057
00058 class VTK_COMMON_EXPORT vtkPlaneCollection : public vtkCollection
00059 {
00060 public:
00061   vtkTypeMacro(vtkPlaneCollection,vtkCollection);
00062   static vtkPlaneCollection *New();
00063
00065   void AddItem(vtkPlane *);
00066
00068   vtkPlane *GetNextItem();
00069
00070 protected:
00071   vtkPlaneCollection() {};
00072   ~vtkPlaneCollection() {};
00073
00074
00075 private:
00076   // hide the standard AddItem from the user and the compiler.
00077   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00078
00079 private:
00080   vtkPlaneCollection(const vtkPlaneCollection&);  // Not implemented.
00081   void operator=(const vtkPlaneCollection&);  // Not implemented.
00082 };
00083
00084 inline void vtkPlaneCollection::AddItem(vtkPlane *f)
00085 {
00086   this->vtkCollection::AddItem((vtkObject *)f);
00087 }
00088
00089 inline vtkPlane *vtkPlaneCollection::GetNextItem()
00090 {
00091   return static_cast<vtkPlane *>(this->GetNextItemAsObject());
00092 }
00093
00094 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPlanes.h Source File

Common/vtkPlanes.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPlanes.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00068 #ifndef __vtkPlanes_h
00069 #define __vtkPlanes_h
00070
00071 #include "vtkImplicitFunction.h"
00072
00073 class vtkPlane;
00074
00075 class VTK_COMMON_EXPORT vtkPlanes : public vtkImplicitFunction
00076 {
00077 public:
00078   static vtkPlanes *New();
00079   vtkTypeMacro(vtkPlanes,vtkImplicitFunction);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081
00083
00084   float EvaluateFunction(float x[3]);
00085   float EvaluateFunction(float x, float y, float z)
00086     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00088
00090   void EvaluateGradient(float x[3], float n[3]);
00091
00093
00095   vtkSetObjectMacro(Points,vtkPoints);
00096   vtkGetObjectMacro(Points,vtkPoints);
00098
00100
00102   void SetNormals(vtkDataArray* normals);
00103   vtkGetObjectMacro(Normals,vtkDataArray);
00105
00108   void SetFrustumPlanes(float planes[24]);
00109
00111
00115   void SetBounds(float bounds[6]);
00116   void SetBounds(float xmin, float xmax, float ymin, float ymax,
00117                  float zmin, float zmax);
00119
00121   int GetNumberOfPlanes();
00122
00126   vtkPlane *GetPlane(int i);
00127
00128 protected:
00129   vtkPlanes();
00130   ~vtkPlanes();
00131
00132   vtkPoints *Points;
00133   vtkDataArray *Normals;
00134   vtkPlane *Plane;
00135
00136 private:
00137   float Planes[24];
00138   float Bounds[6];
00139
00140 private:
00141   vtkPlanes(const vtkPlanes&);  // Not implemented.
00142   void operator=(const vtkPlanes&);  // Not implemented.
00143 };
00144
00145 #endif
00146
00147
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPointData.h Source File

Common/vtkPointData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00055 #ifndef __vtkPointData_h
00056 #define __vtkPointData_h
00057
00058 #include "vtkDataSetAttributes.h"
00059
00060 class VTK_COMMON_EXPORT vtkPointData : public vtkDataSetAttributes
00061 {
00062 public:
00063   static vtkPointData *New();
00064
00065   vtkTypeMacro(vtkPointData,vtkDataSetAttributes);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067   void NullPoint(vtkIdType ptId);
00068
00069 protected:
00070   vtkPointData() {};
00071   ~vtkPointData() {};
00072
00073 private:
00074   vtkPointData(const vtkPointData&);  // Not implemented.
00075   void operator=(const vtkPointData&);  // Not implemented.
00076 };
00077
00078 #endif
00079
00080
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPointLocator2D.h Source File

Common/vtkPointLocator2D.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointLocator2D.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00069 #ifndef __vtkPointLocator2D_h
00070 #define __vtkPointLocator2D_h
00071
00072 #include "vtkLocator.h"
00073 #include "vtkPoints.h"
00074 #include "vtkIdList.h"
00075
00076 class vtkNeighborPoints2D;
00077
00078 class VTK_COMMON_EXPORT vtkPointLocator2D : public vtkLocator
00079 {
00080 public:
00083   static vtkPointLocator2D *New();
00084
00085   vtkTypeMacro(vtkPointLocator2D,vtkLocator);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087
00089
00090   vtkSetVector2Macro(Divisions,int);
00091   vtkGetVectorMacro(Divisions,int,2);
00093
00095
00096   vtkSetClampMacro(NumberOfPointsPerBucket,int,1,VTK_LARGE_INTEGER);
00097   vtkGetMacro(NumberOfPointsPerBucket,int);
00099
00101   virtual int FindClosestPoint(float x[2]);
00102
00106   virtual int IsInsertedPoint(float x[2]);
00107
00109
00113   virtual void FindClosestNPoints(int N, float x[2], vtkIdList *result);
00114   virtual void FindClosestNPoints(int N, float x, float y,
00115                                   vtkIdList *result);
00117
00119
00122   virtual void FindDistributedPoints(int N, float x[2],
00123                                      vtkIdList *result, int M);
00124   virtual void FindDistributedPoints(int N, float x, float y,
00125                                      vtkIdList *result, int M);
00127
00129
00131   virtual void FindPointsWithinRadius(float R, float x[2], vtkIdList *result);
00132   virtual void FindPointsWithinRadius(float R, float x, float y,
00133                                       vtkIdList *result);
00134   // Description:
00135   // See vtkLocator interface documentation.
00136   void Initialize();
00137   void FreeSearchStructure();
00138   void BuildLocator();
00139   void GenerateRepresentation(int level, vtkPolyData *pd);
00141
00143
00144   vtkSetObjectMacro(Points,vtkPoints);
00145   vtkGetObjectMacro(Points,vtkPoints);
00147
00148 protected:
00149   vtkPointLocator2D();
00150   ~vtkPointLocator2D();
00151
00152   // place points in appropriate buckets
00153   void GetBucketNeighbors(int ijk[2], int ndivs[2], int level);
00154   void GetOverlappingBuckets(float x[2], int ijk[2], float dist, int level);
00155   void GenerateFace(int face, int i, int j, int k,
00156                     vtkPoints *pts, vtkCellArray *polys);
00157
00158   vtkPoints *Points; // Used for merging points
00159   int Divisions[2]; // Number of sub-divisions in x-y-z directions
00160   int NumberOfPointsPerBucket; //Used with previous boolean to control subdivide
00161   float Bounds[4]; // bounds of points
00162   vtkIdList **HashTable; // lists of point ids in buckets
00163   int NumberOfBuckets; // total size of hash table
00164   float H[2]; // width of each bucket in x-y-z directions
00165   vtkNeighborPoints2D *Buckets;
00166   float InsertionTol2;
00167 private:
00168   vtkPointLocator2D(const vtkPointLocator2D&);  // Not implemented.
00169   void operator=(const vtkPointLocator2D&);  // Not implemented.
00170 };
00171
00172 #endif
00173
00174
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPointLocator.h Source File

Common/vtkPointLocator.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointLocator.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00069 #ifndef __vtkPointLocator_h
00070 #define __vtkPointLocator_h
00071
00072 #include "vtkLocator.h"
00073 #include "vtkPoints.h"
00074
00075 class vtkIdList;
00076 class vtkNeighborPoints;
00077
00078 class VTK_COMMON_EXPORT vtkPointLocator : public vtkLocator
00079 {
00080 public:
00083   static vtkPointLocator *New();
00084
00085   vtkTypeMacro(vtkPointLocator,vtkLocator);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087
00089
00090   vtkSetVector3Macro(Divisions,int);
00091   vtkGetVectorMacro(Divisions,int,3);
00093
00095
00096   vtkSetClampMacro(NumberOfPointsPerBucket,int,1,VTK_LARGE_INTEGER);
00097   vtkGetMacro(NumberOfPointsPerBucket,int);
00099
00101
00105   virtual vtkIdType FindClosestPoint(const float x[3]);
00106   vtkIdType FindClosestPoint(float x, float y, float z);
00108
00110
00114   vtkIdType FindClosestPointWithinRadius(float radius, const float x[3],
00115                                          float& dist2);
00116   vtkIdType FindClosestPointWithinRadius(float radius, const float x[3],
00117                                          float inputDataLength, float& dist2);
00119
00124   virtual int InitPointInsertion(vtkPoints *newPts, const float bounds[6]);
00125
00127
00131   virtual int InitPointInsertion(vtkPoints *newPts, const float bounds[6],
00132                                  vtkIdType estSize);
00134
00142   virtual void InsertPoint(vtkIdType ptId, const float x[3]);
00143
00151   virtual vtkIdType InsertNextPoint(const float x[3]);
00152
00154
00157   vtkIdType IsInsertedPoint(float x, float  y, float z)
00158     {
00159     float xyz[3];
00160     xyz[0] = x; xyz[1] = y; xyz[2] = z;
00161     return this->IsInsertedPoint (xyz);
00162     };
00163   virtual vtkIdType IsInsertedPoint(const float x[3]);
00165
00173   virtual int InsertUniquePoint(const float x[3], vtkIdType &ptId);
00174
00180   virtual vtkIdType FindClosestInsertedPoint(const float x[3]);
00181
00183
00189   virtual void FindClosestNPoints(int N, const float x[3], vtkIdList *result);
00190   virtual void FindClosestNPoints(int N, float x, float y, float z,
00191                                   vtkIdList *result);
00193
00195
00200   virtual void FindDistributedPoints(int N, const float x[3],
00201                                      vtkIdList *result, int M);
00202   virtual void FindDistributedPoints(int N, float x, float y,
00203                                      float z, vtkIdList *result, int M);
00205
00207
00211   virtual void FindPointsWithinRadius(float R, const float x[3],
00212                                       vtkIdList *result);
00213   virtual void FindPointsWithinRadius(float R, float x, float y, float z,
00214                                       vtkIdList *result);
00216
00221   virtual vtkIdList *GetPointsInBucket(const float x[3], int ijk[3]);
00222
00224
00226   void Initialize();
00227   void FreeSearchStructure();
00228   void BuildLocator();
00229   void GenerateRepresentation(int level, vtkPolyData *pd);
00231
00232 protected:
00233   vtkPointLocator();
00234   ~vtkPointLocator();
00235
00236   // place points in appropriate buckets
00237   void GetBucketNeighbors(vtkNeighborPoints* buckets,
00238                           const int ijk[3], const int ndivs[3], int level);
00239   void GetOverlappingBuckets(vtkNeighborPoints* buckets,
00240                              const float x[3], const int ijk[3], float dist,
00241                              int level);
00242   void GetOverlappingBuckets(vtkNeighborPoints* buckets,
00243                              const float x[3], float dist,
00244                              int prevMinLevel[3],
00245                              int prevMaxLevel[3]);
00246   void GenerateFace(int face, int i, int j, int k,
00247                     vtkPoints *pts, vtkCellArray *polys);
00248   float Distance2ToBucket(const float x[3], const int nei[3]);
00249   float Distance2ToBounds(const float x[3], const float bounds[6]);
00250
00251   vtkPoints *Points; // Used for merging points
00252   int Divisions[3]; // Number of sub-divisions in x-y-z directions
00253   int NumberOfPointsPerBucket; //Used with previous boolean to control subdivide
00254   float Bounds[6]; // bounds of points
00255   vtkIdList **HashTable; // lists of point ids in buckets
00256   vtkIdType NumberOfBuckets; // total size of hash table
00257   float H[3]; // width of each bucket in x-y-z directions
00258
00259   float InsertionTol2;
00260   vtkIdType InsertionPointId;
00261
00262   float InsertionLevel;
00263 private:
00264   vtkPointLocator(const vtkPointLocator&);  // Not implemented.
00265   void operator=(const vtkPointLocator&);  // Not implemented.
00266 };
00267
00268 #endif
00269
00270
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPoints.h Source File

Common/vtkPoints.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPoints.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkPoints_h
00057 #define __vtkPoints_h
00058
00059 #include "vtkObject.h"
00060 #include "vtkDataArray.h"
00061
00062 class vtkIdList;
00063 class vtkPoints;
00064
00065 class VTK_COMMON_EXPORT vtkPoints : public vtkObject
00066 {
00067 public:
00068 //BTX
00069   static vtkPoints *New(int dataType);
00070 //ETX
00071   static vtkPoints *New();
00072
00073   vtkTypeMacro(vtkPoints,vtkObject);
00074   void PrintSelf(ostream& os, vtkIndent indent);
00075
00077   virtual int Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00078
00080   virtual void Initialize();
00081
00083   vtkPoints *MakeObject();
00084
00086
00092   virtual void SetData(vtkDataArray *);
00093   vtkDataArray *GetData() {return this->Data;};
00095
00098   virtual int GetDataType();
00099
00101
00102   virtual void SetDataType(int dataType);
00103   void SetDataTypeToBit() {this->SetDataType(VTK_BIT);};
00104   void SetDataTypeToChar() {this->SetDataType(VTK_CHAR);};
00105   void SetDataTypeToUnsignedChar() {this->SetDataType(VTK_UNSIGNED_CHAR);};
00106   void SetDataTypeToShort() {this->SetDataType(VTK_SHORT);};
00107   void SetDataTypeToUnsignedShort() {this->SetDataType(VTK_UNSIGNED_SHORT);};
00108   void SetDataTypeToInt() {this->SetDataType(VTK_INT);};
00109   void SetDataTypeToUnsignedInt() {this->SetDataType(VTK_UNSIGNED_INT);};
00110   void SetDataTypeToLong() {this->SetDataType(VTK_LONG);};
00111   void SetDataTypeToUnsignedLong() {this->SetDataType(VTK_UNSIGNED_LONG);};
00112   void SetDataTypeToFloat() {this->SetDataType(VTK_FLOAT);};
00113   void SetDataTypeToDouble() {this->SetDataType(VTK_DOUBLE);};
00115
00118   void *GetVoidPointer(const int id) {return this->Data->GetVoidPointer(id);};
00119
00121   virtual void Squeeze() {this->Data->Squeeze();};
00122
00124   virtual void Reset() {this->Data->Reset();};
00125
00127
00130   virtual void DeepCopy(vtkPoints *ad);
00131   virtual void ShallowCopy(vtkPoints *ad);
00133
00140   unsigned long GetActualMemorySize();
00141
00143   vtkIdType GetNumberOfPoints() { return this->Data->GetNumberOfTuples();};
00144
00146   float *GetPoint(vtkIdType id) { return this->Data->GetTuple(id);};
00147
00149
00150   void GetPoint(vtkIdType id, float x[3]) { this->Data->GetTuple(id,x);};
00151   void GetPoint(vtkIdType id, double x[3]) { this->Data->GetTuple(id,x);};
00153
00155
00158   void SetPoint(vtkIdType id, const float x[3]) { this->Data->SetTuple(id,x);};
00159   void SetPoint(vtkIdType id, const double x[3]) { this->Data->SetTuple(id,x);};
00160   void SetPoint(vtkIdType id, double x, double y, double z);
00162
00164
00166   void InsertPoint(vtkIdType id, const float x[3])
00167     { this->Data->InsertTuple(id,x);};
00168   void InsertPoint(vtkIdType id, const double x[3])
00169     {this->Data->InsertTuple(id,x);};
00170   void InsertPoint(vtkIdType id, double x, double y, double z);
00172
00174
00175   vtkIdType InsertNextPoint(const float x[3]) {
00176     return this->Data->InsertNextTuple(x);};
00177   vtkIdType InsertNextPoint(const double x[3]) {
00178     return this->Data->InsertNextTuple(x);};
00179   vtkIdType InsertNextPoint(double x, double y, double z);
00181
00185   void SetNumberOfPoints(vtkIdType number);
00186
00188   void GetPoints(vtkIdList *ptId, vtkPoints *fp);
00189
00191   virtual void ComputeBounds();
00192
00194   float *GetBounds();
00195
00197   void GetBounds(float bounds[6]);
00198
00199 protected:
00200   vtkPoints(int dataType=VTK_FLOAT);
00201   ~vtkPoints();
00202
00203   float Bounds[6];
00204   vtkTimeStamp ComputeTime; // Time at which bounds computed
00205   vtkDataArray *Data;  // Array which represents data
00206
00207 private:
00208   vtkPoints(const vtkPoints&);  // Not implemented.
00209   void operator=(const vtkPoints&);  // Not implemented.
00210 };
00211
00212 inline void vtkPoints::SetNumberOfPoints(vtkIdType number)
00213 {
00214   this->Data->SetNumberOfComponents(3);
00215   this->Data->SetNumberOfTuples(number);
00216 }
00217
00218 inline void vtkPoints::SetPoint(vtkIdType id, double x, double y, double z)
00219 {
00220   double p[3];
00221   p[0] = x;
00222   p[1] = y;
00223   p[2] = z;
00224   this->Data->SetTuple(id,p);
00225 }
00226
00227 inline void vtkPoints::InsertPoint(vtkIdType id, double x, double y, double z)
00228 {
00229   double p[3];
00230
00231   p[0] = x;
00232   p[1] = y;
00233   p[2] = z;
00234   this->Data->InsertTuple(id,p);
00235 }
00236
00237 inline vtkIdType vtkPoints::InsertNextPoint(double x, double y, double z)
00238 {
00239   double p[3];
00240
00241   p[0] = x;
00242   p[1] = y;
00243   p[2] = z;
00244   return this->Data->InsertNextTuple(p);
00245 }
00246
00247
00248 // These include files are placed here so that if Points.h is included
00249 // all other classes necessary for compilation are also included.
00250 #include "vtkIdList.h"
00251
00252 #endif
00253
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPointSet.h Source File

Common/vtkPointSet.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPointSet.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkPointSet_h
00057 #define __vtkPointSet_h
00058
00059 #include "vtkDataSet.h"
00060 #include "vtkPointLocator.h"
00061
00062 class VTK_COMMON_EXPORT vtkPointSet : public vtkDataSet
00063 {
00064 public:
00065   vtkTypeMacro(vtkPointSet,vtkDataSet);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067
00069   void Initialize();
00070
00072   void CopyStructure(vtkDataSet *pd);
00073
00075
00076   vtkIdType GetNumberOfPoints();
00077   float *GetPoint(vtkIdType ptId) {return this->Points->GetPoint(ptId);};
00078   void GetPoint(vtkIdType ptId, float x[3]) {this->Points->GetPoint(ptId,x);};
00079   vtkIdType FindPoint(float x[3]);
00080   vtkIdType FindPoint(float x, float y, float z) { return this->vtkDataSet::FindPoint(x, y, z);};
00081   vtkIdType FindCell(float x[3], vtkCell *cell, vtkIdType cellId, float tol2,
00082                int& subId, float pcoords[3], float *weights);
00083   vtkIdType FindCell(float x[3], vtkCell *cell, vtkGenericCell *gencell,
00084                vtkIdType cellId, float tol2, int& subId,
00085                float pcoords[3], float *weights);
00087
00089   unsigned long GetMTime();
00090
00092   void ComputeBounds();
00093
00095   void Squeeze();
00096
00098
00099   vtkSetObjectMacro(Points,vtkPoints);
00100   vtkGetObjectMacro(Points,vtkPoints);
00102
00104   void UnRegister(vtkObject *o);
00105
00109   virtual int GetNetReferenceCount();
00110
00116   unsigned long GetActualMemorySize();
00117
00119
00120   void ShallowCopy(vtkDataObject *src);
00121   void DeepCopy(vtkDataObject *src);
00123
00124 protected:
00125   vtkPointSet();
00126   ~vtkPointSet();
00127
00128   vtkPoints *Points;
00129   vtkPointLocator *Locator;
00130
00131 private:
00132   vtkPointSet(const vtkPointSet&);  // Not implemented.
00133   void operator=(const vtkPointSet&);  // Not implemented.
00134 };
00135
00136 inline vtkIdType vtkPointSet::GetNumberOfPoints()
00137 {
00138   if (this->Points)
00139     {
00140     return this->Points->GetNumberOfPoints();
00141     }
00142   else
00143     {
00144     return 0;
00145     }
00146 }
00147
00148
00149 #endif
00150
00151
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPolyData.h Source File

Common/vtkPolyData.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolyData.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00070 #ifndef __vtkPolyData_h
00071 #define __vtkPolyData_h
00072
00073 #include "vtkPointSet.h"
00074 #include "vtkPoints.h"
00075 #include "vtkCellArray.h"
00076 #include "vtkCellTypes.h"
00077 #include "vtkCellLinks.h"
00078
00079 class vtkVertex;
00080 class vtkPolyVertex;
00081 class vtkLine;
00082 class vtkPolyLine;
00083 class vtkTriangle;
00084 class vtkQuad;
00085 class vtkPolygon;
00086 class vtkTriangleStrip;
00087 class vtkEmptyCell;
00088
00089
00090
00091 class VTK_COMMON_EXPORT vtkPolyData : public vtkPointSet
00092 {
00093 public:
00094   static vtkPolyData *New();
00095
00096   vtkTypeMacro(vtkPolyData,vtkPointSet);
00097   void PrintSelf(ostream& os, vtkIndent indent);
00098
00100   vtkDataObject *MakeObject() {return vtkPolyData::New();};
00101
00103   int GetDataObjectType() {return VTK_POLY_DATA;}
00104
00107   void CopyStructure(vtkDataSet *ds);
00108
00110
00111   vtkIdType GetNumberOfCells();
00112   vtkCell *GetCell(vtkIdType cellId);
00113   void GetCell(vtkIdType cellId, vtkGenericCell *cell);
00114   int GetCellType(vtkIdType cellId);
00115   void GetCellBounds(vtkIdType cellId, float bounds[6]);
00116   void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00117                         vtkIdList *cellIds);
00119
00121
00125   void CopyCells(vtkPolyData *pd, vtkIdList *idList,
00126                  vtkPointLocator *locator = NULL);
00128
00130   void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds);
00131
00134   void GetPointCells(vtkIdType ptId, vtkIdList *cellIds);
00135
00137   void ComputeBounds();
00138
00143   void Squeeze();
00144
00146   int GetMaxCellSize();
00147
00149   void SetVerts (vtkCellArray* v);
00150
00153   vtkCellArray *GetVerts();
00154
00156   void SetLines (vtkCellArray* l);
00157
00160   vtkCellArray *GetLines();
00161
00163   void SetPolys (vtkCellArray* p);
00164
00167   vtkCellArray *GetPolys();
00168
00170   void SetStrips (vtkCellArray* s);
00171
00175   vtkCellArray *GetStrips();
00176
00178
00179   vtkIdType GetNumberOfVerts();
00180   vtkIdType GetNumberOfLines();
00181   vtkIdType GetNumberOfPolys();
00182   vtkIdType GetNumberOfStrips();
00184
00189   void Allocate(vtkIdType numCells=1000, int extSize=1000);
00190
00192
00201   void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000,
00202                 int extSize=1000);
00204
00211   int InsertNextCell(int type, int npts, vtkIdType *pts);
00212
00219   int InsertNextCell(int type, vtkIdList *pts);
00220
00223   void Reset();
00224
00226   void BuildCells();
00227
00230   void BuildLinks();
00231
00235   void DeleteCells();
00236
00238   void DeleteLinks();
00239
00241
00242   void GetPointCells(vtkIdType ptId, unsigned short& ncells,
00243                      vtkIdType* &cells);
00245
00247
00250   void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2,
00251                             vtkIdList *cellIds);
00253
00256   void GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType* &pts);
00257
00260   int IsTriangle(int v1, int v2, int v3);
00261
00264   int IsEdge(int v1, int v2);
00265
00268   int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
00269
00275   void ReplaceCell(vtkIdType cellId, int npts, vtkIdType *pts);
00276
00278
00279   void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId,
00280                         vtkIdType newPtId);
00282
00284   void ReverseCell(vtkIdType cellId);
00285
00287
00288   void DeletePoint(vtkIdType ptId);
00289   void DeleteCell(vtkIdType cellId);
00291
00296   int InsertNextLinkedPoint(float x[3], int numLinks);
00297
00301   int InsertNextLinkedCell(int type, int npts, vtkIdType *pts);
00302
00309   void ReplaceLinkedCell(vtkIdType cellId, int npts, vtkIdType *pts);
00310
00316   void RemoveCellReference(vtkIdType cellId);
00317
00323   void AddCellReference(vtkIdType cellId);
00324
00330   void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
00331
00336   void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
00337
00340   void ResizeCellList(vtkIdType ptId, int size);
00341
00343   virtual void Initialize();
00344
00346
00349   void SetUpdateExtent(int piece, int numPieces, int ghostLevel);
00350   void SetUpdateExtent(int piece, int numPieces)
00351     {this->SetUpdateExtent(piece, numPieces, 0);}
00352   void GetUpdateExtent(int &piece, int &numPieces, int &ghostLevel);
00354
00356
00357   vtkGetVector6Macro( UpdateExtent, int );
00359
00361
00365   void SetUpdateExtent( int x1, int x2, int y1, int y2, int z1, int z2 )
00366     { this->vtkPointSet::SetUpdateExtent( x1, x2, y1, y2, z1, z2 ); };
00367   void SetUpdateExtent( int ext[6] )
00368     { this->vtkPointSet::SetUpdateExtent( ext ); };
00370
00372
00374   vtkGetMacro( Piece, int );
00375   vtkGetMacro( NumberOfPieces, int );
00377
00379
00380   vtkGetMacro( GhostLevel, int );
00382
00388   unsigned long GetActualMemorySize();
00389
00391
00392   void ShallowCopy(vtkDataObject *src);
00393   void DeepCopy(vtkDataObject *src);
00395
00398   void RemoveGhostCells(int level);
00399
00400 protected:
00401   vtkPolyData();
00402   ~vtkPolyData();
00403
00404   // constant cell objects returned by GetCell called.
00405   vtkVertex *Vertex;
00406   vtkPolyVertex *PolyVertex;
00407   vtkLine *Line;
00408   vtkPolyLine *PolyLine;
00409   vtkTriangle *Triangle;
00410   vtkQuad *Quad;
00411   vtkPolygon *Polygon;
00412   vtkTriangleStrip *TriangleStrip;
00413   vtkEmptyCell *EmptyCell;
00414
00415   // points inherited
00416   // point data (i.e., scalars, vectors, normals, tcoords) inherited
00417   vtkCellArray *Verts;
00418   vtkCellArray *Lines;
00419   vtkCellArray *Polys;
00420   vtkCellArray *Strips;
00421
00422   // dummy static member below used as a trick to simplify traversal
00423   static vtkCellArray *Dummy;
00424
00425   // supporting structures for more complex topological operations
00426   // built only when necessary
00427   vtkCellTypes *Cells;
00428   vtkCellLinks *Links;
00429
00430   // This method is called during an update.
00431   // If the CropFilter is set, the user reqquested a piece which the
00432   // source cannot generate, then it will break up the
00433   // data set in order to satisfy the request.
00434   virtual void Crop();
00435
00436
00437 private:
00438   // Hide these from the user and the compiler.
00439
00441
00442   void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
00443     {this->GetCellNeighbors(cellId, &ptIds, &cellIds);}
00445
00446 private:
00447   vtkPolyData(const vtkPolyData&);  // Not implemented.
00448   void operator=(const vtkPolyData&);  // Not implemented.
00449 };
00450
00451 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells,
00452                                        vtkIdType* &cells)
00453 {
00454   ncells = this->Links->GetNcells(ptId);
00455   cells = this->Links->GetCells(ptId);
00456 }
00457
00458 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
00459 {
00460   unsigned short int n1;
00461   int i, j, tVerts[3];
00462   vtkIdType *cells, *tVerts2, n2;
00463
00464   tVerts[0] = v1;
00465   tVerts[1] = v2;
00466   tVerts[2] = v3;
00467
00468   for (i=0; i<3; i++)
00469     {
00470     this->GetPointCells(tVerts[i], n1, cells);
00471     for (j=0; j<n1; j++)
00472       {
00473       this->GetCellPoints(cells[j], n2, tVerts2);
00474       if ( (tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] ||
00475             tVerts[0] == tVerts2[2]) &&
00476            (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] ||
00477             tVerts[1] == tVerts2[2]) &&
00478            (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] ||
00479             tVerts[2] == tVerts2[2]) )
00480         {
00481         return 1;
00482         }
00483       }
00484     }
00485   return 0;
00486 }
00487
00488 inline int vtkPolyData::IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
00489 {
00490   vtkIdType *pts, npts;
00491
00492   this->GetCellPoints(cellId, npts, pts);
00493   for (vtkIdType i=0; i < npts; i++)
00494     {
00495     if ( pts[i] == ptId )
00496       {
00497       return 1;
00498       }
00499     }
00500
00501   return 0;
00502 }
00503
00504 inline int vtkPolyData::IsEdge(int p1, int p2)
00505 {
00506   unsigned short int ncells;
00507   int i;
00508   vtkIdType *cells;
00509
00510   this->GetPointCells(p1,ncells,cells);
00511   for (i=0; i < ncells; i++)
00512     {
00513     if ( this->IsPointUsedByCell(p2,cells[i]) )
00514       {
00515       return 1;
00516       }
00517     }
00518
00519   return 0;
00520 }
00521
00522 inline void vtkPolyData::DeletePoint(vtkIdType ptId)
00523 {
00524   this->Links->DeletePoint(ptId);
00525 }
00526
00527 inline void vtkPolyData::DeleteCell(vtkIdType cellId)
00528 {
00529   this->Cells->DeleteCell(cellId);
00530 }
00531
00532 inline void vtkPolyData::RemoveCellReference(vtkIdType cellId)
00533 {
00534   vtkIdType *pts, npts;
00535
00536   this->GetCellPoints(cellId, npts, pts);
00537   for (vtkIdType i=0; i<npts; i++)
00538     {
00539     this->Links->RemoveCellReference(cellId, pts[i]);
00540     }
00541 }
00542
00543 inline void vtkPolyData::AddCellReference(vtkIdType cellId)
00544 {
00545   vtkIdType *pts, npts;
00546
00547   this->GetCellPoints(cellId, npts, pts);
00548   for (vtkIdType i=0; i<npts; i++)
00549     {
00550     this->Links->AddCellReference(cellId, pts[i]);
00551     }
00552 }
00553
00554 inline void vtkPolyData::ResizeCellList(vtkIdType ptId, int size)
00555 {
00556   this->Links->ResizeCellList(ptId,size);
00557 }
00558
00559 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId,
00560                                           vtkIdType newPtId)
00561 {
00562   int i;
00563   vtkIdType *verts, nverts;
00564
00565   this->GetCellPoints(cellId,nverts,verts);
00566   for ( i=0; i < nverts; i++ )
00567     {
00568     if ( verts[i] == oldPtId )
00569       {
00570       verts[i] = newPtId; // this is very nasty! direct write!
00571       return;
00572       }
00573     }
00574 }
00575
00576 #endif
00577
00578
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPolygon.h Source File

Common/vtkPolygon.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolygon.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkPolygon_h
00058 #define __vtkPolygon_h
00059
00060 #include "vtkCell.h"
00061 #include "vtkPoints.h"
00062 #include "vtkLine.h"
00063 #include "vtkTriangle.h"
00064 #include "vtkQuad.h"
00065
00066 class VTK_COMMON_EXPORT vtkPolygon : public vtkCell
00067 {
00068 public:
00069   static vtkPolygon *New();
00070   vtkTypeMacro(vtkPolygon,vtkCell);
00071
00073
00074   vtkCell *MakeObject();
00075   int GetCellType() {return VTK_POLYGON;};
00076   int GetCellDimension() {return 2;};
00077   int GetNumberOfEdges() {return this->GetNumberOfPoints();};
00078   int GetNumberOfFaces() {return 0;};
00079   vtkCell *GetEdge(int edgeId);
00080   vtkCell *GetFace(int) {return 0;};
00081   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00082   void Contour(float value, vtkDataArray *cellScalars,
00083                vtkPointLocator *locator,vtkCellArray *verts,
00084                vtkCellArray *lines, vtkCellArray *polys,
00085                vtkPointData *inPd, vtkPointData *outPd,
00086                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00087   void Clip(float value, vtkDataArray *cellScalars,
00088             vtkPointLocator *locator, vtkCellArray *tris,
00089             vtkPointData *inPd, vtkPointData *outPd,
00090             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00091             int insideOut);
00092   int EvaluatePosition(float x[3], float* closestPoint,
00093                        int& subId, float pcoords[3],
00094                        float& dist2, float *weights);
00095   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00096                         float *weights);
00097   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00098                         float x[3], float pcoords[3], int& subId);
00099   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00100   void Derivatives(int subId, float pcoords[3], float *values,
00101                    int dim, float *derivs);
00103
00105
00106   static void ComputeNormal(vtkPoints *p, int numPts, vtkIdType *pts,
00107                             float n[3]);
00108   static void ComputeNormal(vtkPoints *p, float n[3]);
00110
00114   static void ComputeNormal(int numPts, float *pts, float n[3]);
00115
00117   void ComputeWeights(float x[3], float *weights);
00118
00119
00121
00126   int ParameterizePolygon(float p0[3], float p10[3], float &l10,
00127                           float p20[3], float &l20, float n[3]);
00129
00131
00135   static int PointInPolygon(float x[3], int numPts, float *pts,
00136                             float bounds[6], float n[3]);
00138
00143   int Triangulate(vtkIdList *outTris);
00144
00146
00152   static int IntersectPolygonWithPolygon(int npts, float *pts, float bounds[6],
00153                                          int npts2, float *pts2,
00154                                          float bounds2[3], float tol,
00155                                          float x[3]);
00157
00158 protected:
00159   vtkPolygon();
00160   ~vtkPolygon();
00161
00162   // variables used by instances of this class
00163   float   Tolerance; // Intersection tolerance
00164   int     SuccessfulTriangulation; // Stops recursive tri. if necessary
00165   float   Normal[3]; //polygon normal
00166   vtkIdList *Tris;
00167   vtkTriangle *Triangle;
00168   vtkQuad *Quad;
00169   vtkFloatArray *TriScalars;
00170   vtkLine *Line;
00171
00172   // Helper methods for triangulation------------------------------
00177   int EarCutTriangulation();
00178
00179 private:
00180   vtkPolygon(const vtkPolygon&);  // Not implemented.
00181   void operator=(const vtkPolygon&);  // Not implemented.
00182 };
00183
00184 #endif
00185
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPolyLine.h Source File

Common/vtkPolyLine.h

00001 /*========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolyLine.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkPolyLine_h
00057 #define __vtkPolyLine_h
00058
00059 #include "vtkCell.h"
00060 #include "vtkPoints.h"
00061 #include "vtkCellArray.h"
00062 #include "vtkLine.h"
00063
00064 class VTK_COMMON_EXPORT vtkPolyLine : public vtkCell
00065 {
00066 public:
00067   static vtkPolyLine *New();
00068   vtkTypeMacro(vtkPolyLine,vtkCell);
00069
00075   int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *);
00076
00078
00079   vtkCell *MakeObject();
00080   int GetCellType() {return VTK_POLY_LINE;};
00081   int GetCellDimension() {return 1;};
00082   int GetNumberOfEdges() {return 0;};
00083   int GetNumberOfFaces() {return 0;};
00084   vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;};
00085   vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
00086   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00087   void Contour(float value, vtkDataArray *cellScalars,
00088                vtkPointLocator *locator, vtkCellArray *verts,
00089                vtkCellArray *lines, vtkCellArray *polys,
00090                vtkPointData *inPd, vtkPointData *outPd,
00091                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00092   void Clip(float value, vtkDataArray *cellScalars,
00093             vtkPointLocator *locator, vtkCellArray *lines,
00094             vtkPointData *inPd, vtkPointData *outPd,
00095             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00096             int insideOut);
00097   int EvaluatePosition(float x[3], float* closestPoint,
00098                        int& subId, float pcoords[3],
00099                        float& dist2, float *weights);
00100   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00101                         float *weights);
00102   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00103                         float x[3], float pcoords[3], int& subId);
00104   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00105   void Derivatives(int subId, float pcoords[3], float *values,
00106                    int dim, float *derivs);
00108
00110   int GetParametricCenter(float pcoords[3]);
00111
00112
00113 protected:
00114   vtkPolyLine();
00115   ~vtkPolyLine();
00116
00117   vtkLine *Line;
00118
00119 private:
00120   vtkPolyLine(const vtkPolyLine&);  // Not implemented.
00121   void operator=(const vtkPolyLine&);  // Not implemented.
00122 };
00123
00124 #endif
00125
00126
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPolyVertex.h Source File

Common/vtkPolyVertex.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPolyVertex.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkPolyVertex_h
00057 #define __vtkPolyVertex_h
00058
00059 #include "vtkCell.h"
00060 #include "vtkVertex.h"
00061
00062 class VTK_COMMON_EXPORT vtkPolyVertex : public vtkCell
00063 {
00064 public:
00065   static vtkPolyVertex *New();
00066   vtkTypeMacro(vtkPolyVertex,vtkCell);
00067
00069
00070   vtkCell *MakeObject();
00071   int GetCellType() {return VTK_POLY_VERTEX;};
00072   int GetCellDimension() {return 0;};
00073   int GetNumberOfEdges() {return 0;};
00074   int GetNumberOfFaces() {return 0;};
00075   vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;};
00076   vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
00077   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00078   void Contour(float value, vtkDataArray *cellScalars,
00079                vtkPointLocator *locator, vtkCellArray *verts,
00080                vtkCellArray *lines, vtkCellArray *polys,
00081                vtkPointData *inPd, vtkPointData *outPd,
00082                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00083   void Clip(float value, vtkDataArray *cellScalars,
00084             vtkPointLocator *locator, vtkCellArray *verts,
00085             vtkPointData *inPd, vtkPointData *outPd,
00086             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00087             int insideOut);
00088   int EvaluatePosition(float x[3], float* closestPoint,
00089                        int& subId, float pcoords[3],
00090                        float& dist2, float *weights);
00091   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00092                         float *weights);
00093   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00094                         float x[3], float pcoords[3], int& subId);
00095   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00096   void Derivatives(int subId, float pcoords[3], float *values,
00097                    int dim, float *derivs);
00099
00101   int GetParametricCenter(float pcoords[3]);
00102
00103
00104 protected:
00105   vtkPolyVertex();
00106   ~vtkPolyVertex();
00107
00108   vtkVertex *Vertex;
00109
00110 private:
00111   vtkPolyVertex(const vtkPolyVertex&);  // Not implemented.
00112   void operator=(const vtkPolyVertex&);  // Not implemented.
00113 };
00114
00115 #endif
00116
00117
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPriorityQueue.h Source File

Common/vtkPriorityQueue.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPriorityQueue.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00065 #ifndef __vtkPriorityQueue_h
00066 #define __vtkPriorityQueue_h
00067
00068 #include "vtkObject.h"
00069 #include "vtkIdTypeArray.h"
00070
00071 //BTX
00072 typedef struct _vtkPriorityItem
00073   {
00074   float priority;
00075   vtkIdType id;
00076   } vtkPriorityItem;
00077 //ETX
00078
00079 class VTK_COMMON_EXPORT vtkPriorityQueue : public vtkObject
00080 {
00081 public:
00084   static vtkPriorityQueue *New();
00085
00086   vtkTypeMacro(vtkPriorityQueue,vtkObject);
00087   void PrintSelf(ostream& os, vtkIndent indent);
00088
00090   void Allocate(const vtkIdType sz, const vtkIdType ext=1000);
00091
00094   void Insert(float priority, vtkIdType id);
00095
00100   vtkIdType Pop(vtkIdType location, float &priority);
00101 //ETX
00102
00105   vtkIdType Pop(vtkIdType location=0);
00106
00109   vtkIdType Peek(vtkIdType location, float &priority);
00110 //ETX
00111
00114   vtkIdType Peek(vtkIdType location=0);
00115
00118   float DeleteId(vtkIdType id);
00119
00122   float GetPriority(vtkIdType id);
00123
00125   vtkIdType GetNumberOfItems() {return this->MaxId+1;};
00126
00129   void Reset();
00130
00131 protected:
00132   vtkPriorityQueue();
00133   ~vtkPriorityQueue();
00134
00135   vtkPriorityItem *Resize(const vtkIdType sz);
00136
00137   vtkIdTypeArray *ItemLocation;
00138   vtkPriorityItem *Array;
00139   vtkIdType Size;
00140   vtkIdType MaxId;
00141   vtkIdType Extend;
00142 private:
00143   vtkPriorityQueue(const vtkPriorityQueue&);  // Not implemented.
00144   void operator=(const vtkPriorityQueue&);  // Not implemented.
00145 };
00146
00147 inline float vtkPriorityQueue::DeleteId(vtkIdType id)
00148 {
00149   float priority=VTK_LARGE_FLOAT;
00150   int loc;
00151
00152   if ( id <= this->ItemLocation->GetMaxId() &&
00153   (loc=this->ItemLocation->GetValue(id)) != -1 )
00154     {
00155     this->Pop(loc,priority);
00156     }
00157   return priority;
00158 }
00159
00160 inline float vtkPriorityQueue::GetPriority(vtkIdType id)
00161 {
00162   int loc;
00163
00164   if ( id <= this->ItemLocation->GetMaxId() &&
00165   (loc=this->ItemLocation->GetValue(id)) != -1 )
00166     {
00167     return this->Array[loc].priority;
00168     }
00169   return VTK_LARGE_FLOAT;
00170 }
00171
00172 inline vtkIdType vtkPriorityQueue::Peek(vtkIdType location, float &priority)
00173 {
00174   if ( this->MaxId < 0 )
00175     {
00176     return -1;
00177     }
00178   else
00179     {
00180     priority = this->Array[location].priority;
00181     return this->Array[location].id;
00182     }
00183 }
00184
00185 inline vtkIdType vtkPriorityQueue::Peek(vtkIdType location)
00186 {
00187   if ( this->MaxId < 0 )
00188     {
00189     return -1;
00190     }
00191   else
00192     {
00193     return this->Array[location].id;
00194     }
00195 }
00196
00197 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkProcessObject.h Source File

Common/vtkProcessObject.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProcessObject.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00079 #ifndef __vtkProcessObject_h
00080 #define __vtkProcessObject_h
00081
00082 #include "vtkDataObject.h"
00083
00084 class VTK_COMMON_EXPORT vtkProcessObject : public vtkObject
00085 {
00086 public:
00088   static vtkProcessObject *New();
00089
00090   vtkTypeMacro(vtkProcessObject,vtkObject);
00091   void PrintSelf(ostream& os, vtkIndent indent);
00092
00094   void SetStartMethod(void (*f)(void *), void *arg);
00095
00097   void SetProgressMethod(void (*f)(void *), void *arg);
00098
00100   void SetEndMethod(void (*f)(void *), void *arg);
00101
00103   void SetStartMethodArgDelete(void (*f)(void *));
00104
00106   void SetProgressMethodArgDelete(void (*f)(void *));
00107
00109   void SetEndMethodArgDelete(void (*f)(void *));
00110
00112
00114   vtkSetMacro(AbortExecute,int);
00115   vtkGetMacro(AbortExecute,int);
00116   vtkBooleanMacro(AbortExecute,int);
00118
00120
00121   vtkSetClampMacro(Progress,float,0.0,1.0);
00122   vtkGetMacro(Progress,float);
00124
00128   void UpdateProgress(float amount);
00129
00131
00133   vtkSetStringMacro(ProgressText);
00134   vtkGetStringMacro(ProgressText);
00136
00137   // left public for performance since it is used in inner loops
00138   int AbortExecute;
00139
00141
00143   vtkDataObject **GetInputs() {return this->Inputs;}
00144   vtkGetMacro(NumberOfInputs,int);
00146
00149   void SqueezeInputArray();
00150
00152   void RemoveAllInputs();
00153
00154 protected:
00155   vtkProcessObject();
00156   ~vtkProcessObject();
00157
00158   // Progress/Update handling
00159   unsigned long StartTag;
00160   unsigned long ProgressTag;
00161   unsigned long EndTag;
00162   float Progress;
00163   char  *ProgressText;
00164
00165   int NumberOfInputs;
00166   int NumberOfRequiredInputs;
00167   vtkDataObject **Inputs;     //An array of the inputs to the filter
00168   // Temporary arrays used internally.
00169   // It is only valid after SortInputsByLocality is called.
00170   vtkDataObject **SortedInputs;   // Inputs sorted by locality
00171   // We need a second array for an effficeint search.
00172   // This array is never valid.
00173   vtkDataObject **SortedInputs2;
00174   void SortInputsByLocality();
00175   // A helper method for quicksort.
00176   void SortMerge(vtkDataObject **a1, int l1,
00177                  vtkDataObject **a2, int l2,
00178                  vtkDataObject **results);
00179
00180   // Called to allocate the input array.  Copies old inputs.
00181   void SetNumberOfInputs(int num);
00182
00183   // protected methods for setting inputs.
00184   virtual void SetNthInput(int num, vtkDataObject *input);
00185   virtual void AddInput(vtkDataObject *input);
00186   virtual void RemoveInput(vtkDataObject *input);
00187
00188 private:
00189   vtkProcessObject(const vtkProcessObject&);  // Not implemented.
00190   void operator=(const vtkProcessObject&);  // Not implemented.
00191 };
00192
00193 #endif
00194
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkProcessStatistics.h Source File

Common/vtkProcessStatistics.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProcessStatistics.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00048 #ifndef __vtkProcessStatistics_h
00049 #define __vtkProcessStatistics_h
00050
00051 #include "vtkObject.h"
00052 #include "vtkLine.h"
00053 #include "vtkPixel.h"
00054
00055 class VTK_COMMON_EXPORT vtkProcessStatistics : public vtkObject
00056 {
00057 public:
00059   static vtkProcessStatistics *New();
00060
00061   vtkTypeMacro(vtkProcessStatistics,vtkObject);
00062
00063   int   GetProcessSizeInBytes();
00064   float GetProcessCPUTimeInMilliseconds();
00065
00066 protected:
00067   vtkProcessStatistics();
00068   ~vtkProcessStatistics() {};
00069
00070
00071 private:
00072   vtkProcessStatistics(const vtkProcessStatistics&);  // Not implemented.
00073   void operator=(const vtkProcessStatistics&);  // Not implemented.
00074 };
00075
00076 #endif
00077
00078
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkProp.h Source File

Common/vtkProp.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProp.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00060 #ifndef __vtkProp_h
00061 #define __vtkProp_h
00062
00063 #include "vtkObject.h"
00064 #include "vtkAssemblyPaths.h"
00065
00066 class vtkViewport;
00067 class vtkPropCollection;
00068 class vtkWindow;
00069 class vtkMatrix4x4;
00070
00071 class VTK_COMMON_EXPORT vtkProp : public vtkObject
00072 {
00073 public:
00075   static vtkProp* New();
00076
00077   vtkTypeMacro(vtkProp,vtkObject);
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079
00081
00084   virtual void GetActors(vtkPropCollection *) {}
00085   virtual void GetActors2D(vtkPropCollection *) {}
00086   virtual void GetVolumes(vtkPropCollection *) {}
00088
00090
00091   vtkSetMacro(Visibility, int);
00092   vtkGetMacro(Visibility, int);
00093   vtkBooleanMacro(Visibility, int);
00095
00097
00099   vtkSetMacro(Pickable,int);
00100   vtkGetMacro(Pickable,int);
00101   vtkBooleanMacro(Pickable,int);
00103
00105
00107   void SetPickMethod(void (*f)(void *), void *arg);
00108   void SetPickMethodArgDelete(void (*f)(void *));
00110
00112   virtual void Pick();
00113
00115
00121   vtkSetMacro(Dragable,int);
00122   vtkGetMacro(Dragable,int);
00123   vtkBooleanMacro(Dragable,int);
00125
00130   virtual unsigned long GetRedrawMTime() {return this->GetMTime();}
00131
00134   virtual float *GetBounds() {return NULL;}
00135
00137   virtual void ShallowCopy(vtkProp *prop);
00138
00140
00151   virtual void InitPathTraversal();
00152   virtual vtkAssemblyPath *GetNextPath();
00153   virtual int GetNumberOfPaths() {return 1;}
00155
00157
00160   virtual void PokeMatrix(vtkMatrix4x4 *vtkNotUsed(matrix)) {}
00161   virtual vtkMatrix4x4 *GetMatrix() {return NULL;}
00163
00164 //BTX
00166   /*! WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE
00167       THESE METHODS OUTSIDE OF THE RENDERING PROCESS All concrete
00168       subclasses must be able to render themselves. There are three key
00169       render methods in vtk and they correspond to three different points
00170       in the rendering cycle. Any given prop may implement one or more of
00171       these methods. The first method is intended for rendering all opaque
00172       geometry. The second method is intended for rendering all translucent
00173       geometry. Most volume rendering mappers draw their results during
00174       this second method. The last method is to render any 2D annotation or
00175       overlays. Each of these methods return an integer value indicating
00176       whether or not this render method was applied to this data. */
00177   virtual int RenderOpaqueGeometry(      vtkViewport *) { return 0; }
00178   virtual int RenderTranslucentGeometry( vtkViewport *) { return 0; }
00179   virtual int RenderOverlay(             vtkViewport *) { return 0; }
00181
00186   virtual void ReleaseGraphicsResources(vtkWindow *) {}
00187
00189
00199   virtual float GetEstimatedRenderTime( vtkViewport * )
00200     { return this->EstimatedRenderTime; }
00201   virtual float GetEstimatedRenderTime(){ return this->EstimatedRenderTime; }
00203
00205
00209   virtual void SetEstimatedRenderTime(float t)
00210     {this->EstimatedRenderTime = t; this->SavedEstimatedRenderTime = t;}
00212
00214
00219   virtual void RestoreEstimatedRenderTime()
00220     { this->EstimatedRenderTime = this->SavedEstimatedRenderTime; }
00222
00223
00225
00235   virtual void AddEstimatedRenderTime(float t, vtkViewport *vtkNotUsed(vp))
00236     {this->EstimatedRenderTime+=t;}
00238
00240
00247   virtual void SetAllocatedRenderTime(float t, vtkViewport *vtkNotUsed(v))
00248     {
00249     this->AllocatedRenderTime = t;
00250     this->SavedEstimatedRenderTime = this->EstimatedRenderTime;
00251     this->EstimatedRenderTime = 0.0;
00252     }
00254
00256
00258   vtkGetMacro(AllocatedRenderTime, float);
00260
00262
00266   void SetRenderTimeMultiplier( float t ) { this->RenderTimeMultiplier = t; }
00267   vtkGetMacro(RenderTimeMultiplier, float);
00269
00273   virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00274
00275 //ETX
00276
00277 protected:
00278   vtkProp();
00279   ~vtkProp();
00280
00281   int Visibility;
00282   int Pickable;
00283   unsigned long PickTag;
00284   int Dragable;
00285
00286   float AllocatedRenderTime;
00287   float EstimatedRenderTime;
00288   float SavedEstimatedRenderTime;
00289   float RenderTimeMultiplier;
00290
00291   // support multi-part props and access to paths of prop
00292   // stuff that follows is used to build the assembly hierarchy
00293   vtkAssemblyPaths *Paths;
00294
00295 private:
00296   vtkProp(const vtkProp&);  // Not implemented.
00297   void operator=(const vtkProp&);  // Not implemented.
00298 };
00299
00300 #endif
00301
00302
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPropAssembly.h Source File

Common/vtkPropAssembly.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPropAssembly.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00074 #ifndef __vtkPropAssembly_h
00075 #define __vtkPropAssembly_h
00076
00077 #include "vtkProp.h"
00078
00079 class VTK_COMMON_EXPORT vtkPropAssembly : public vtkProp
00080 {
00081 public:
00082   vtkTypeMacro(vtkPropAssembly,vtkProp);
00083   void PrintSelf(ostream& os, vtkIndent indent);
00084
00086   static vtkPropAssembly *New();
00087
00089   void AddPart(vtkProp *);
00090
00092   void RemovePart(vtkProp *);
00093
00095   vtkPropCollection *GetParts();
00096
00098
00101   int RenderOpaqueGeometry(vtkViewport *ren);
00102   int RenderTranslucentGeometry(vtkViewport *ren);
00103   int RenderOverlay(vtkViewport *);
00105
00109   void ReleaseGraphicsResources(vtkWindow *);
00110
00114   float *GetBounds();
00115
00117   void ShallowCopy(vtkProp *Prop);
00118
00121   unsigned long int GetMTime();
00122
00124
00132   void InitPathTraversal();
00133   vtkAssemblyPath *GetNextPath();
00134   int GetNumberOfPaths();
00136
00137 //BTX
00141   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00142 //ETX
00143
00144 protected:
00145   vtkPropAssembly();
00146   ~vtkPropAssembly();
00147
00148   vtkPropCollection *Parts;
00149   float Bounds[6];
00150
00151   // Support the BuildPaths() method,
00152   vtkTimeStamp PathTime;
00153   void UpdatePaths(); //apply transformations and properties recursively
00154 private:
00155   vtkPropAssembly(const vtkPropAssembly&);  // Not implemented.
00156   void operator=(const vtkPropAssembly&);  // Not implemented.
00157 };
00158
00159 #endif
00160
00161
00162
00163
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPropCollection.h Source File

Common/vtkPropCollection.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPropCollection.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkPropC_h
00058 #define __vtkPropC_h
00059
00060 #include "vtkCollection.h"
00061 #include "vtkProp.h"
00062
00063 class VTK_COMMON_EXPORT vtkPropCollection : public vtkCollection
00064 {
00065  public:
00066   static vtkPropCollection *New();
00067   vtkTypeMacro(vtkPropCollection,vtkCollection);
00068
00070   void AddItem(vtkProp *a);
00071
00073   vtkProp *GetNextProp();
00074
00076   vtkProp *GetLastProp();
00077
00082   int GetNumberOfPaths();
00083
00084 protected:
00085   vtkPropCollection() {};
00086   ~vtkPropCollection() {};
00087
00088
00089 private:
00090   // hide the standard AddItem from the user and the compiler.
00091   void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
00092
00093 private:
00094   vtkPropCollection(const vtkPropCollection&);  // Not implemented.
00095   void operator=(const vtkPropCollection&);  // Not implemented.
00096 };
00097
00098 inline void vtkPropCollection::AddItem(vtkProp *a)
00099 {
00100   this->vtkCollection::AddItem((vtkObject *)a);
00101 }
00102
00103 inline vtkProp *vtkPropCollection::GetNextProp()
00104 {
00105   return static_cast<vtkProp *>(this->GetNextItemAsObject());
00106 }
00107
00108 inline vtkProp *vtkPropCollection::GetLastProp()
00109 {
00110   if ( this->Bottom == NULL )
00111     {
00112     return NULL;
00113     }
00114   else
00115     {
00116     return static_cast<vtkProp *>(this->Bottom->Item);
00117     }
00118 }
00119
00120 #endif
00121
00122
00123
00124
00125
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkProperty2D.h Source File

Common/vtkProperty2D.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProperty2D.h,v $
00005   Language:  C++
00006
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00008 All rights reserved.
00009
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037
00038 =========================================================================*/
00053 #ifndef __vtkProperty2D_h
00054 #define __vtkProperty2D_h
00055
00056 #include "vtkObject.h"
00057
00058 class vtkViewport;
00059
00060 #define VTK_BACKGROUND_LOCATION 0
00061 #define VTK_FOREGROUND_LOCATION 1
00062
00063 class VTK_COMMON_EXPORT vtkProperty2D : public vtkObject
00064 {
00065 public:
00066   vtkTypeMacro(vtkProperty2D,vtkObject);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068
00071   static vtkProperty2D *New();
00072
00074   void DeepCopy(vtkProperty2D *p);
00075
00077
00078   vtkSetVector3Macro(Color, float);
00079   vtkGetVectorMacro(Color, float, 3);
00081
00083
00084   vtkGetMacro(Opacity, float);
00085   vtkSetMacro(Opacity, float);
00087
00089
00091   vtkSetClampMacro(PointSize,float,0,VTK_LARGE_FLOAT);
00092   vtkGetMacro(PointSize,float);
00094
00096
00098   vtkSetClampMacro(LineWidth,float,0,VTK_LARGE_FLOAT);
00099   vtkGetMacro(LineWidth,float);
00101
00103
00106   vtkSetMacro(LineStipplePattern,int);
00107   vtkGetMacro(LineStipplePattern,int);
00109
00111
00114   vtkSetClampMacro(LineStippleRepeatFactor,int,1,VTK_LARGE_INTEGER);
00115   vtkGetMacro(LineStippleRepeatFactor,int);
00117
00119
00125   vtkSetClampMacro( DisplayLocation, int,
00126                     VTK_BACKGROUND_LOCATION, VTK_FOREGROUND_LOCATION );
00127   vtkGetMacro( DisplayLocation, int );
00128   void SetDisplayLocationToBackground()
00129     {this->DisplayLocation = VTK_BACKGROUND_LOCATION;};
00130   void SetDisplayLocationToForeground()
00131     {this->DisplayLocation = VTK_FOREGROUND_LOCATION;};
00133
00134
00136   virtual void Render (vtkViewport* vtkNotUsed(viewport))  {}
00137
00138 protected:
00139   vtkProperty2D();
00140   ~vtkProperty2D();
00141
00142   float Color[3];
00143   float Opacity;
00144   float PointSize;
00145   float LineWidth;
00146   int   LineStipplePattern;
00147   int   LineStippleRepeatFactor;
00148   int   DisplayLocation;
00149 private:
00150   vtkProperty2D(const vtkProperty2D&);  // Not implemented.
00151   void operator=(const vtkProperty2D&);  // Not implemented.
00152 };
00153
00154
00155 #endif
00156
00157
00158
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPyramid.h Source File

Common/vtkPyramid.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPyramid.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkPyramid_h
00058 #define __vtkPyramid_h
00059
00060 #include "vtkCell3D.h"
00061 #include "vtkLine.h"
00062 #include "vtkTriangle.h"
00063 #include "vtkQuad.h"
00064
00065 class vtkUnstructuredGrid;
00066
00067 class VTK_COMMON_EXPORT vtkPyramid : public vtkCell3D
00068 {
00069 public:
00070   vtkTypeMacro(vtkPyramid,vtkCell);
00071
00073   static vtkPyramid *New();
00074
00076
00077   virtual void GetEdgePoints(int edgeId, int* &pts);
00078   virtual void GetFacePoints(int faceId, int* &pts);
00080
00082
00083   vtkCell *MakeObject();
00084   int GetCellType() {return VTK_PYRAMID;}
00085   int GetCellDimension() {return 3;}
00086   int GetNumberOfEdges() {return 8;}
00087   int GetNumberOfFaces() {return 5;}
00088   vtkCell *GetEdge(int edgeId);
00089   vtkCell *GetFace(int faceId);
00090   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00091   void Contour(float value, vtkDataArray *cellScalars,
00092                vtkPointLocator *locator, vtkCellArray *verts,
00093                vtkCellArray *lines, vtkCellArray *polys,
00094                vtkPointData *inPd, vtkPointData *outPd,
00095                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00096   int EvaluatePosition(float x[3], float* closestPoint,
00097                        int& subId, float pcoords[3],
00098                        float& dist2, float *weights);
00099   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00100                         float *weights);
00101   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00102                         float x[3], float pcoords[3], int& subId);
00103   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00104   void Derivatives(int subId, float pcoords[3], float *values,
00105                    int dim, float *derivs);
00107
00109   int GetParametricCenter(float pcoords[3]);
00110
00112
00114   static void InterpolationFunctions(float pcoords[3], float weights[5]);
00115   static void InterpolationDerivs(float pcoords[3], float derivs[15]);
00116   int JacobianInverse(float pcoords[3], double **inverse, float derivs[15]);
00117   static int *GetEdgeArray(int edgeId);
00118   static int *GetFaceArray(int faceId);
00120
00121 protected:
00122   vtkPyramid();
00123   ~vtkPyramid();
00124
00125   vtkLine *Line;
00126   vtkTriangle *Triangle;
00127   vtkQuad *Quad;
00128
00129 private:
00130   vtkPyramid(const vtkPyramid&);  // Not implemented.
00131   void operator=(const vtkPyramid&);  // Not implemented.
00132 };
00133
00134 inline int vtkPyramid::GetParametricCenter(float pcoords[3])
00135 {
00136   pcoords[0] = pcoords[1] = 0.5;
00137   pcoords[2] = 0.333333;
00138   return 0;
00139 }
00140
00141 #endif
00142
00143
00144
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkPythonUtil.h Source File

Common/vtkPythonUtil.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPythonUtil.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040 #include "vtkObject.h"
00041 #include "vtkTimeStamp.h"
00042 #include "Python.h"
00043 #include "vtkCommand.h"
00044
00045 #if defined(WIN32)
00046 #if defined(vtkCommonPython_EXPORTS)
00047   #define VTK_PYTHON_EXPORT __declspec( dllexport )
00048 #else
00049     #define VTK_PYTHON_EXPORT __declspec( dllimport )
00050 #endif
00051 #else
00052   #define VTK_PYTHON_EXPORT
00053 #endif
00054
00055 // This is the VTK/Python 'class,' it contains the method list and a pointer
00056 // to the superclass
00057 typedef vtkObject *(*vtknewfunc)();
00058
00059 typedef struct {
00060   PyObject_HEAD
00061   PyMethodDef *vtk_methods;
00062   vtknewfunc vtk_new;
00063   char *vtk_name;
00064   char *vtk_module;
00065   char *vtk_doc;
00066   PyObject *vtk_bases;
00067 } PyVTKClass;
00068
00069 // This is the VTK/Python 'object,' it contains the python object header
00070 // plus a pointer to the associated vtkObject and PyVTKClass.
00071 typedef struct {
00072   PyObject_HEAD
00073   vtkObject *vtk_ptr;
00074   PyVTKClass *vtk_class;
00075 } PyVTKObject;
00076
00077 // This for objects not derived from vtkObject
00078 typedef struct {
00079   PyObject_HEAD
00080   void *vtk_ptr;
00081   PyMethodDef *vtk_methods;
00082   char *vtk_name;
00083   char *vtk_doc;
00084 } PyVTKSpecialObject;
00085
00086 // Standard methods for all vtk/python objects
00087 extern "C"
00088 {
00089 VTK_PYTHON_EXPORT int PyVTKObject_Check(PyObject *obj);
00090 VTK_PYTHON_EXPORT int PyVTKClass_Check(PyObject *obj);
00091 VTK_PYTHON_EXPORT int PyVTKSpecialObjectCheck(PyObject *obj);
00092 VTK_PYTHON_EXPORT PyObject *PyVTKObject_New(PyObject *vtkclass, vtkObject *ptr);
00093 VTK_PYTHON_EXPORT PyObject *PyVTKClass_New(vtknewfunc constructor, PyMethodDef *methods,
00094                          char *classname, char *modulename, char *docstring[],
00095                          PyObject *base);
00096 VTK_PYTHON_EXPORT PyObject *PyVTKSpecialObject_New(void *ptr, PyMethodDef *methods,
00097                                  char *classname, char *docstring[]);
00098
00099 // this is a special version of ParseTuple that handles both bound
00100 // and unbound method calls for VTK objects
00101 VTK_PYTHON_EXPORT vtkObject *PyArg_VTKParseTuple(PyObject *self, PyObject *args,
00102                                char *format, ...);
00103 }
00104
00105 // Add a PyVTKClass to the type lookup table, this allows us to later
00106 // create object given only the class name.
00107 extern VTK_PYTHON_EXPORT void vtkPythonAddClassToHash(PyObject *obj, char *type);
00108
00109 // Extract the vtkObject from a PyVTKObject.  If the PyObject is not a
00110 // PyVTKObject, or is not a PyVTKObject of the specified type, the python
00111 // error indicator will be set.
00112 // Special behaviour: Py_None is converted to NULL without no error.
00113 extern VTK_PYTHON_EXPORT vtkObject *vtkPythonGetPointerFromObject(PyObject *obj, char *type);
00114
00115 // Convert a vtkObject to a PyVTKObject.  This will first check to see if
00116 // the PyVTKObject already exists, and create a new PyVTKObject if necessary.
00117 // This function also passes ownership of the reference to the PyObject.
00118 // Special behaviour: NULL is converted to Py_None.
00119 extern VTK_PYTHON_EXPORT PyObject *vtkPythonGetObjectFromPointer(vtkObject *ptr);
00120
00121 // Try to convert some PyObject into a PyVTKObject, currently conversion
00122 // is supported for SWIG-style mangled pointer strings.
00123 extern VTK_PYTHON_EXPORT PyObject *vtkPythonGetObjectFromObject(PyObject *arg, const char *type);
00124
00125 // Add and delete PyVTKObject/vtkObject pairs from the wrapper hash table,
00126 // these methods do not change the reference counts of either the vtkObject
00127 // or the PyVTKObject.
00128 extern VTK_PYTHON_EXPORT void vtkPythonAddObjectToHash(PyObject *obj, vtkObject *anInstance);
00129 extern VTK_PYTHON_EXPORT void vtkPythonDeleteObjectFromHash(PyObject *obj);
00130
00131 // Utility functions for creating/usinge SWIG-style mangled pointer strings.
00132 extern VTK_PYTHON_EXPORT char *vtkPythonManglePointer(void *ptr, const char *type);
00133 extern VTK_PYTHON_EXPORT void *vtkPythonUnmanglePointer(char *ptrText, int *len,
00134                                       const char *type);
00135
00136 // check array arguments sent through the wrappers to see if the underlying
00137 // C++ method changed the values, and attempt to modify the original python
00138 // sequence (list or tuple) if so.
00139 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, char *a, int n);
00140 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, unsigned char *a, int n);
00141 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, short *a, int n);
00142 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, unsigned short *a, int n);
00143 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, int *a, int n);
00144 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, unsigned int *a, int n);
00145 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, long *a, int n);
00146 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, unsigned long *a, int n);
00147 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, float *a, int n);
00148 extern VTK_PYTHON_EXPORT int vtkPythonCheckArray(PyObject *args, int i, double *a, int n);
00149
00150 // For use by SetXXMethod() , SetXXMethodArgDelete()
00151 extern VTK_PYTHON_EXPORT void vtkPythonVoidFunc(void *);
00152 extern VTK_PYTHON_EXPORT void vtkPythonVoidFuncArgDelete(void *);
00153
00154 // To allow Python to use the vtkCommand features
00155 class vtkPythonCommand : public vtkCommand
00156 {
00157 public:
00158   static vtkPythonCommand *New() { return new vtkPythonCommand; };
00159
00160   void SetObject(PyObject *o);
00161   void Execute(vtkObject *ptr, unsigned long eventtype, void *);
00162
00163   PyObject *obj;
00164 protected:
00165   vtkPythonCommand();
00166   ~vtkPythonCommand();
00167 };
00168
00169
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkQuad.h Source File

Common/vtkQuad.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuad.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00056 #ifndef __vtkQuad_h
00057 #define __vtkQuad_h
00058
00059 #include "vtkCell.h"
00060 #include "vtkLine.h"
00061
00062 class VTK_COMMON_EXPORT vtkQuad : public vtkCell
00063 {
00064 public:
00065   static vtkQuad *New();
00066   vtkTypeMacro(vtkQuad,vtkCell);
00067
00069
00070   vtkCell *MakeObject();
00071   int GetCellType() {return VTK_QUAD;};
00072   int GetCellDimension() {return 2;};
00073   int GetNumberOfEdges() {return 4;};
00074   int GetNumberOfFaces() {return 0;};
00075   vtkCell *GetEdge(int edgeId);
00076   vtkCell *GetFace(int) {return 0;};
00077   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00078   void Contour(float value, vtkDataArray *cellScalars,
00079                vtkPointLocator *locator, vtkCellArray *verts,
00080                vtkCellArray *lines, vtkCellArray *polys,
00081                vtkPointData *inPd, vtkPointData *outPd,
00082                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00083   int EvaluatePosition(float x[3], float* closestPoint,
00084                        int& subId, float pcoords[3],
00085                        float& dist2, float *weights);
00086   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00087                         float *weights);
00088   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00089                         float x[3], float pcoords[3], int& subId);
00090   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00091   void Derivatives(int subId, float pcoords[3], float *values,
00092                    int dim, float *derivs);
00094
00096
00098   void Clip(float value, vtkDataArray *cellScalars,
00099             vtkPointLocator *locator, vtkCellArray *polys,
00100             vtkPointData *inPd, vtkPointData *outPd,
00101             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00102             int insideOut);
00104
00106
00107   static void InterpolationFunctions(float pcoords[3], float sf[4]);
00108   static void InterpolationDerivs(float pcoords[3], float derivs[8]);
00110
00111
00112 protected:
00113   vtkQuad();
00114   ~vtkQuad();
00115
00116   vtkLine *Line;
00117
00118 private:
00119   vtkQuad(const vtkQuad&);  // Not implemented.
00120   void operator=(const vtkQuad&);  // Not implemented.
00121 };
00122
00123 #endif
00124
00125
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkQuadric.h Source File

Common/vtkQuadric.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadric.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00057 #ifndef __vtkQuadric_h
00058 #define __vtkQuadric_h
00059
00060 #include "vtkImplicitFunction.h"
00061
00062 class VTK_COMMON_EXPORT vtkQuadric : public vtkImplicitFunction
00063 {
00064 public:
00065   vtkTypeMacro(vtkQuadric,vtkImplicitFunction);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067
00069   static vtkQuadric *New();
00070
00072
00073   float EvaluateFunction(float x[3]);
00074   float EvaluateFunction(float x, float y, float z)
00075     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00077
00079   void EvaluateGradient(float x[3], float g[3]);
00080
00082
00083   void SetCoefficients(float a[10]);
00084   void SetCoefficients(float a0, float a1, float a2, float a3, float a4,
00085                        float a5, float a6, float a7, float a8, float a9);
00086   vtkGetVectorMacro(Coefficients,float,10);
00088
00089 protected:
00090   vtkQuadric();
00091   ~vtkQuadric() {};
00092
00093   float Coefficients[10];
00094
00095 private:
00096   vtkQuadric(const vtkQuadric&);  // Not implemented.
00097   void operator=(const vtkQuadric&);  // Not implemented.
00098 };
00099
00100 #endif
00101
00102
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001


Common/vtkRayCastStructures.h Source File

Common/vtkRayCastStructures.h

00001 /*=========================================================================
00002
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRayCastStructures.h,v $
00005   Language:  C++
00006
00007
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen
00009 All rights reserved.
00010
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038
00039 =========================================================================*/
00040
00054 #ifndef __vtkRayCastStructures_h
00055 #define __vtkRayCastStructures_h
00056
00057 typedef struct
00058 {
00059   // These are the input values that define the ray. Depending on
00060   // whether we are casting a WorldRay or a ViewRay, these are in
00061   // world coordinates or view coordinates.
00062   float Origin[3];
00063   float Direction[3];
00064
00065   // The pixel location for the ray that is being cast can be
00066   // important, for example if hardware ray bounding is being used
00067   // and the location in the depth buffer must be matched to this
00068   // ray.
00069   int   Pixel[2];
00070
00071   // The world coordinate location of the camera is important for the
00072   // ray caster to be able to return a Z value for the intersection
00073   float CameraPosition[3];
00074
00075   // This input value defines the size of the image
00076   int   ImageSize[2];
00077
00078   // These are input values for clipping but may be changed
00079   // along the way
00080   float NearClip;
00081   float FarClip;
00082
00083   // These are the return values - RGBA and Z
00084   float Color[4];
00085   float Depth;
00086
00087
00088   // Some additional space that may be useful for the
00089   // specific implementation of the ray caster. This structure
00090   // is a convenient place to put it, since there is one
00091   // per thread so that writing to these locations is safe
00092
00093   // Ray information transformed into local coordinates
00094   float                        TransformedStart[4];
00095   float                        TransformedEnd[4];
00096   float                        TransformedDirection[4];
00097   float                        TransformedIncrement[3];
00098
00099   // The number of steps we want to take if this is
00100   // a ray caster that takes steps
00101   int                          NumberOfStepsToTake;
00102
00103   // The number of steps we actually take if this is
00104   // a ray caster that takes steps
00105   int                          NumberOfStepsTaken;
00106
00107 } VTKRayCastRayInfo;
00108
00109 #endif
Generated on Thu Dec 20 01:04:19 2001 for VTK by doxygen 1.2.11.1 written by Dimitri van Heesch, © 1997-2001