Primitive¶
-
class
pyrender.Primitive(positions, normals=None, tangents=None, texcoord_0=None, texcoord_1=None, color_0=None, joints_0=None, weights_0=None, indices=None, material=None, mode=None, targets=None, poses=None)[source]¶ Bases:
objectA primitive object which can be rendered.
Parameters: - positions ((n, 3) float) – XYZ vertex positions.
- normals ((n, 3) float) – Normalized XYZ vertex normals.
- tangents ((n, 4) float) – XYZW vertex tangents where the w component is a sign value (either +1 or -1) indicating the handedness of the tangent basis.
- texcoord_0 ((n, 2) float) – The first set of UV texture coordinates.
- texcoord_1 ((n, 2) float) – The second set of UV texture coordinates.
- color_0 ((n, 4) float) – RGBA vertex colors.
- joints_0 ((n, 4) float) – Joint information.
- weights_0 ((n, 4) float) – Weight information for morphing.
- indices ((m, 3) int) – Face indices for triangle meshes or fans.
- material (
Material) – The material to apply to this primitive when rendering. - mode (int) –
The type of primitives to render, one of the following:
0: POINTS1: LINES2: LINE_LOOP3: LINE_STRIP4: TRIANGLES5: TRIANGLES_STRIP6: TRIANGLES_FAN
- targets ((k,) int) – Morph target indices.
- poses ((x,4,4), float) – Array of 4x4 transformation matrices for instancing this object.
Attributes Summary
boundsbuf_flagsThe flags for the render buffer. centroidThe centroid of the primitive’s AABB. color_0RGBA vertex colors. extentsThe lengths of the axes of the primitive’s AABB. indicesFace indices for triangle meshes or fans. is_transparentIf True, the mesh is partially-transparent. joints_0Joint information. materialThe material for this primitive. modeThe type of primitive to render. normalsNormalized XYZ vertex normals. posesHomogenous transforms for instancing this primitive. positionsXYZ vertex positions. scaleThe length of the diagonal of the primitive’s AABB. tangentsXYZW vertex tangents. targetsMorph target indices. texcoord_0The first set of UV texture coordinates. texcoord_1The second set of UV texture coordinates. weights_0Weight information for morphing. Methods Summary
delete()Attributes Documentation
-
bounds¶
Methods Documentation