use serde::{Deserialize, Serialize};
use crate::{impl_visitable_noop, Quaternion, Vector3};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub enum AttachPointType {
Origin,
Child,
Left,
Right,
Top,
Bottom,
Front,
Back,
Alignment,
Maximum,
Minimum,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
pub enum AttachPointRepresentation {
Standard,
Ghost,
Ghost2,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "schema", schemars(deny_unknown_fields))]
#[serde(rename_all = "camelCase")]
pub struct AttachPoint {
#[serde(rename = "type")]
pub kind: AttachPointType,
pub key: String,
pub foreign: String,
pub tags: Option<Vec<String>>,
pub point: Vector3,
pub rotation: Quaternion,
pub enabled: bool,
pub representation: AttachPointRepresentation,
}
impl_visitable_noop!(AttachPoint);