yang-pcg 0.2.0

个人使用地图生成
Documentation
// PCG Point 数据结构

use std::collections::BTreeMap;

use serde::{Deserialize, Serialize};

use crate::model::geometry::{Bounds3, Transform3};

/// UE 侧属性值。
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub enum PropertyValue {
    Bool(bool),
    Int(i64),
    Float(f64),
    String(String),
}

/// UE5 PCG 点数据。
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub struct PcgPoint {
    pub transform: Transform3,
    pub bounds: Bounds3,
    pub density: f32,
    pub seed: u64,
    pub attributes: BTreeMap<String, PropertyValue>,
}