Blender V4.3
ply_file_buffer_ascii.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11namespace blender::io::ply {
12
13void FileBufferAscii::write_vertex(float x, float y, float z)
14{
15 write_fstring("{} {} {}", x, y, z);
16}
17
18void FileBufferAscii::write_UV(float u, float v)
19{
20 write_fstring(" {} {}", u, v);
21}
22
24{
25 write_fstring(" {}", v);
26}
27
28void FileBufferAscii::write_vertex_normal(float nx, float ny, float nz)
29{
30 write_fstring(" {} {} {}", nx, ny, nz);
31}
32
34{
35 write_fstring(" {} {} {} {}", r, g, b, a);
36}
37
42
43void FileBufferAscii::write_face(char count, Span<uint32_t> const &vertex_indices)
44{
45 write_fstring("{}", int(count));
46
47 for (const uint32_t v : vertex_indices) {
48 write_fstring(" {}", v);
49 }
51}
52
53void FileBufferAscii::write_edge(int first, int second)
54{
55 write_fstring("{} {}", first, second);
57}
58} // namespace blender::io::ply
unsigned char uchar
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117
void write_UV(float u, float v) override
void write_vertex_color(uchar r, uchar g, uchar b, uchar a) override
void write_vertex_normal(float nx, float ny, float nz) override
void write_edge(int first, int second) override
void write_face(char count, Span< uint32_t > const &vertex_indices) override
void write_vertex(float x, float y, float z) override
void write_fstring(const char *fmt, T &&...args)
local_group_size(16, 16) .push_constant(Type b
int count
unsigned int uint32_t
Definition stdint.h:80