本文整理汇总了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