/[escript]/trunk/pyvisi/py_src/point.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/point.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 943 by jongui, Mon Jan 29 07:22:43 2007 UTC revision 946 by jongui, Wed Jan 31 03:08:04 2007 UTC
# Line 27  class PointSource: Line 27  class PointSource:
27          """          """
28    
29          # Default number of points to generate is 10.          # Default number of points to generate is 10.
30          self.setNumberOfPoints(10)          self.setPointSourceNumberOfPoints(10)
31          # Default center is of the sphere is the center of the data object.          # Default center is of the sphere is the center of the data object.
32          center = self.__object.GetCenter()          center = self.__object.GetCenter()
33          self.setCenter(GlobalPosition(center[0], center[1], center[2]))          self.setPointSourceCenter(GlobalPosition(center[0], center[1], center[2]))
34          # Default radius of the sphere is 0.1.          # Default radius of the sphere is 0.5.
35          self.setPointSourceRadius(0.1)          self.setPointSourceRadius(0.1)
36          self.__vtk_point_source.Update()          self.__vtk_point_source.Update()
37    
# Line 45  class PointSource: Line 45  class PointSource:
45    
46          self.__vtk_point_source.SetRadius(radius)          self.__vtk_point_source.SetRadius(radius)
47    
48      def setCenter(self, position):      def setPointSourceCenter(self, position):
49          """          """
50          Set the center of the sphere.          Set the center of the sphere.
51                    
# Line 55  class PointSource: Line 55  class PointSource:
55    
56          self.__vtk_point_source.SetCenter(position._getGlobalPosition())          self.__vtk_point_source.SetCenter(position._getGlobalPosition())
57    
58      def setNumberOfPoints(self, points):      def setPointSourceNumberOfPoints(self, points):
59          """          """
60          Set the number of points to generate within the sphere.          Set the number of points to generate within the sphere. The larger the
61            number of points, the more streamlines are generated.
62    
63          @type points: Number          @type points: Number
64          @param points: Number of points to generate          @param points: Number of points to generate
# Line 81  class StructuredPoints: Line 82  class StructuredPoints:
82      Class that defines the structured points.      Class that defines the structured points.
83      """      """
84            
85      # NOTE: The algorithm of this class was extracted from Mayavi's source code.      # NOTE: The algorithm of this class was extracted from Mayavi's
86        # online source code.
87      def __init__(self, object):      def __init__(self, object):
88          """          """
89          Initialise the structured points.          Initialise the structured points.
# Line 142  class StructuredPoints: Line 144  class StructuredPoints:
144    
145      def setDimension(self, x, y, z):      def setDimension(self, x, y, z):
146          """          """
147          Set the dimension (number of points) on the x, y and z axes.          Set the dimension (number of points) on the x, y and z axes. The
148            smaller the dimension, the more points are populated.
149    
150          @type x: Number          @type x: Number
151          @param x: Number of points on the x-axis          @param x: Number of points on the x-axis

Legend:
Removed from v.943  
changed lines
  Added in v.946

  ViewVC Help
Powered by ViewVC 1.1.26