當前位置: 首頁>>代碼示例>>Python>>正文


Python GeomVertexWriter.setData3f方法代碼示例

本文整理匯總了Python中pandac.PandaModules.GeomVertexWriter.setData3f方法的典型用法代碼示例。如果您正苦於以下問題:Python GeomVertexWriter.setData3f方法的具體用法?Python GeomVertexWriter.setData3f怎麽用?Python GeomVertexWriter.setData3f使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pandac.PandaModules.GeomVertexWriter的用法示例。


在下文中一共展示了GeomVertexWriter.setData3f方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _set_z_on_shaft

# 需要導入模塊: from pandac.PandaModules import GeomVertexWriter [as 別名]
# 或者: from pandac.PandaModules.GeomVertexWriter import setData3f [as 別名]
 def _set_z_on_shaft(self, z):
     for vdata in self.shaft_vdata:
         reader = GeomVertexReader(vdata, 'vertex')
         writer = GeomVertexWriter(vdata, 'vertex')
         while not reader.isAtEnd():
             v = reader.getData3f()
             if v[2] > 0:
                 writer.setData3f(v[0],v[1],z)
             else:
                 writer.setData3f(v) # I have to call the writer setData method in any case 
開發者ID:JingLu92,項目名稱:pyff,代碼行數:12,代碼來源:Arrow.py

示例2: set_bar_height

# 需要導入模塊: from pandac.PandaModules import GeomVertexWriter [as 別名]
# 或者: from pandac.PandaModules.GeomVertexWriter import setData3f [as 別名]
 def set_bar_height(self, height):
     """ Sets the height of the bar to the given value. The given height should be between 0 and 1. """
     reader = GeomVertexReader(self.bar_vdata, 'vertex')
     writer = GeomVertexWriter(self.bar_vdata, 'vertex')
     while not reader.isAtEnd():
         v = reader.getData3f()
         if v[2] > 0:
             writer.setData3f(v[0],v[1],height)
         else:
             writer.setData3f(v) # I have to call the writer setData method in any case 
開發者ID:JingLu92,項目名稱:pyff,代碼行數:12,代碼來源:ControlSignalBar.py

示例3: scale_vertices

# 需要導入模塊: from pandac.PandaModules import GeomVertexWriter [as 別名]
# 或者: from pandac.PandaModules.GeomVertexWriter import setData3f [as 別名]
    def scale_vertices(self, multiplier):
        """
        Scale the working vertices as the given multiplier to the original
        vertices.

        @type multiplier: number
        @param multiplier: Coefficient to apply to original vertices.
        """

        for i,geom in self.__get_geoms():
            orig_vdata = self.orig_vertices[i]
            working_vdata = self.working_vertices[i]

            reader = GeomVertexReader(orig_vdata, 'vertex')
            writer = GeomVertexWriter(working_vdata, 'vertex')

            while not reader.isAtEnd():
                data = reader.getData3f()
                writer.setData3f(data[0] * multiplier,
                                 data[1] * multiplier,
                                 data[2] * multiplier)
開發者ID:smoluf,項目名稱:orbitalindustry,代碼行數:23,代碼來源:mesh.py

示例4: _set_threshold

# 需要導入模塊: from pandac.PandaModules import GeomVertexWriter [as 別名]
# 或者: from pandac.PandaModules.GeomVertexWriter import setData3f [as 別名]
 def _set_threshold(self, vdata, t_value):
     reader = GeomVertexReader(vdata, 'vertex')
     writer = GeomVertexWriter(vdata, 'vertex')
     while not reader.isAtEnd():
         v = reader.getData3f()
         writer.setData3f(v[0],v[1],t_value+self.padding)
開發者ID:JingLu92,項目名稱:pyff,代碼行數:8,代碼來源:ControlSignalBar.py


注:本文中的pandac.PandaModules.GeomVertexWriter.setData3f方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。