当前位置: 首页>>代码示例>>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;未经允许,请勿转载。