use crate::math::Real;
pub type DebugColor = [f32; 4];
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct DebugRenderStyle {
pub subdivisions: u32,
pub border_subdivisions: u32,
pub collider_dynamic_color: DebugColor,
pub collider_fixed_color: DebugColor,
pub collider_kinematic_color: DebugColor,
pub collider_parentless_color: DebugColor,
pub impulse_joint_anchor_color: DebugColor,
pub impulse_joint_separation_color: DebugColor,
pub multibody_joint_anchor_color: DebugColor,
pub multibody_joint_separation_color: DebugColor,
pub sleep_color_multiplier: DebugColor,
pub sleep_eligible_color_multiplier: DebugColor,
pub disabled_color_multiplier: DebugColor,
pub rigid_body_axes_length: Real,
pub contact_depth_color: DebugColor,
pub contact_normal_color: DebugColor,
pub contact_normal_length: Real,
pub soft_body_element_color: DebugColor,
pub soft_body_slack_color: DebugColor,
pub soft_body_loaded_color: DebugColor,
pub soft_body_frame_color: DebugColor,
pub collider_aabb_color: DebugColor,
pub vertex_pseudo_normal_color: DebugColor,
pub edge_pseudo_normal_color: DebugColor,
pub pseudo_normal_length: Real,
pub volume_contact_normal_color: DebugColor,
pub volume_gradient_color: DebugColor,
}
impl Default for DebugRenderStyle {
fn default() -> Self {
Self {
subdivisions: 20,
border_subdivisions: 5,
collider_dynamic_color: [340.0, 1.0, 0.3, 1.0],
collider_kinematic_color: [20.0, 1.0, 0.3, 1.0],
collider_fixed_color: [30.0, 1.0, 0.4, 1.0],
collider_parentless_color: [30.0, 1.0, 0.4, 1.0],
impulse_joint_anchor_color: [240.0, 0.5, 0.4, 1.0],
impulse_joint_separation_color: [0.0, 0.5, 0.4, 1.0],
multibody_joint_anchor_color: [300.0, 1.0, 0.4, 1.0],
multibody_joint_separation_color: [0.0, 1.0, 0.4, 1.0],
sleep_color_multiplier: [1.0, 1.0, 0.2, 1.0],
sleep_eligible_color_multiplier: [0.35, 1.0, 1.4, 1.0],
disabled_color_multiplier: [0.0, 0.0, 1.0, 1.0],
rigid_body_axes_length: 0.5,
contact_depth_color: [120.0, 1.0, 0.4, 1.0],
contact_normal_color: [0.0, 1.0, 1.0, 1.0],
contact_normal_length: 0.3,
soft_body_element_color: [200.0, 0.8, 0.5, 1.0],
soft_body_slack_color: [220.0, 0.8, 0.5, 1.0],
soft_body_loaded_color: [0.0, 1.0, 0.5, 1.0],
soft_body_frame_color: [40.0, 0.9, 0.6, 1.0],
collider_aabb_color: [124.0, 1.0, 0.4, 1.0],
vertex_pseudo_normal_color: [180.0, 1.0, 0.6, 1.0],
edge_pseudo_normal_color: [280.0, 1.0, 0.6, 1.0],
pseudo_normal_length: 0.2,
volume_contact_normal_color: [0.0, 0.9, 0.35, 1.0],
volume_gradient_color: [270.0, 0.8, 0.3, 1.0],
}
}
}