Blender V4.3
ply_data.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include <string>
12#include <utility>
13
15#include "BLI_string_ref.hh"
16#include "BLI_vector.hh"
17
18namespace blender::io::ply {
19
21
23 PlyCustomAttribute(const StringRef name_, int64_t size) : name(name_), data(size, 0.0f) {}
24 std::string name;
25 Vector<float> data; /* Any custom PLY attributes are converted to floats. */
26};
27
39
41
43 std::string name;
45 PlyDataTypes count_type = PlyDataTypes::NONE; /* NONE means it's not a list property */
46};
47
48struct PlyElement {
49 std::string name;
50 int count = 0;
52 int stride = 0;
53
54 void calc_stride();
55};
56
61
62} // namespace blender::io::ply
__int64 int64_t
Definition stdint.h:89
PlyCustomAttribute(const StringRef name_, int64_t size)
Definition ply_data.hh:23
Vector< float3 > vertices
Definition ply_data.hh:29
Vector< uint32_t > face_vertices
Definition ply_data.hh:34
Vector< float4 > vertex_colors
Definition ply_data.hh:31
Vector< float3 > vertex_normals
Definition ply_data.hh:30
Vector< std::pair< int, int > > edges
Definition ply_data.hh:33
Vector< PlyCustomAttribute > vertex_custom_attr
Definition ply_data.hh:32
Vector< float2 > uv_coordinates
Definition ply_data.hh:36
Vector< uint32_t > face_sizes
Definition ply_data.hh:35
Vector< PlyProperty > properties
Definition ply_data.hh:51
Vector< PlyElement > elements
Definition ply_data.hh:58