当前位置: 首页>>代码示例>>Python>>正文


Python GeomVertexFormat.getV3n3c4t2方法代码示例

本文整理汇总了Python中panda3d.core.GeomVertexFormat.getV3n3c4t2方法的典型用法代码示例。如果您正苦于以下问题:Python GeomVertexFormat.getV3n3c4t2方法的具体用法?Python GeomVertexFormat.getV3n3c4t2怎么用?Python GeomVertexFormat.getV3n3c4t2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在panda3d.core.GeomVertexFormat的用法示例。


在下文中一共展示了GeomVertexFormat.getV3n3c4t2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: myNormalize

# 需要导入模块: from panda3d.core import GeomVertexFormat [as 别名]
# 或者: from panda3d.core.GeomVertexFormat import getV3n3c4t2 [as 别名]
from panda3d.core import Geom, GeomNode, GeomTriangles, GeomVertexData
from panda3d.core import GeomVertexFormat, GeomVertexWriter
from panda3d.core import Material, NodePath, Shader, Texture, TextureStage
from panda3d.core import VBase4, Vec3


def myNormalize(myVec):
    myVec.normalize()
    return myVec


format = GeomVertexFormat.getV3n3c4t2()
vdata = GeomVertexData("quadFace", format, Geom.UHDynamic)
vertex = GeomVertexWriter(vdata, "vertex")
normal = GeomVertexWriter(vdata, "normal")
color = GeomVertexWriter(vdata, "color")
texcoord = GeomVertexWriter(vdata, "texcoord")


def create_mesh(parentnp, debug=False, invert=False):
    """This creates a simple 17x17 grid mesh for the sides of our cube.
    The ultimate goal is to use a LOD system, probably based on quadtrees.
    If debug is true then we get a color gradiant on our vertexes."""
    x = -1.0
    y = -1.0
    vertex_count = 0
    u = 0.0
    v = 0.0

    WIDTH_STEP = 2 / 16.0
开发者ID:croxis,项目名称:apollo,代码行数:32,代码来源:surface_mesh.py


注:本文中的panda3d.core.GeomVertexFormat.getV3n3c4t2方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。