Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/bevy_geometry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "bevy_geometry"
version = "0.4.0"
authors = [
"Bevy Contributors <[email protected]>",
"Aevyrie Roessler <[email protected]>",
]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy_math = { path = "../bevy_math", version = "0.4.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.4.0" }
28 changes: 28 additions & 0 deletions crates/bevy_geometry/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use bevy_math::{Quat, Vec3};

pub trait Primitive3d {}

#[derive(Copy, Clone, PartialEq, Debug)]
pub struct Sphere {
pub origin: Vec3,
pub radius: f32,
}

#[derive(Copy, Clone, PartialEq, Debug)]
pub struct Box {
pub maximums: Vec3,
pub minimums: Vec3,
pub orientation: Quat,
}

#[derive(Copy, Clone, PartialEq, Debug)]
pub struct AxisAlignedBox {
pub maximums: Vec3,
pub minimums: Vec3,
}

#[derive(Copy, Clone, PartialEq, Debug)]
pub struct Plane {
pub point: Vec3,
pub normal: Vec3,
}
7 changes: 4 additions & 3 deletions crates/bevy_internal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ categories = ["game-engines", "graphics", "gui", "rendering"]

[features]
wgpu_trace = ["bevy_wgpu/trace"]
trace = [ "bevy_app/trace", "bevy_ecs/trace" ]
trace_chrome = [ "bevy_log/tracing-chrome" ]
trace = ["bevy_app/trace", "bevy_ecs/trace"]
trace_chrome = ["bevy_log/tracing-chrome"]

# Image format support for texture loading (PNG and HDR are enabled by default)
hdr = ["bevy_render/hdr"]
Expand Down Expand Up @@ -49,6 +49,7 @@ bevy_core = { path = "../bevy_core", version = "0.4.0" }
bevy_derive = { path = "../bevy_derive", version = "0.4.0" }
bevy_diagnostic = { path = "../bevy_diagnostic", version = "0.4.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.4.0" }
bevy_geometry = { path = "../bevy_geometry", version = "0.4.0" }
bevy_input = { path = "../bevy_input", version = "0.4.0" }
bevy_log = { path = "../bevy_log", version = "0.4.0" }
bevy_math = { path = "../bevy_math", version = "0.4.0" }
Expand All @@ -72,4 +73,4 @@ bevy_winit = { path = "../bevy_winit", optional = true, version = "0.4.0" }
bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.4.0" }

[target.'cfg(target_os = "android")'.dependencies]
ndk-glue = {version = "0.2", features = ["logger"]}
ndk-glue = { version = "0.2", features = ["logger"] }
5 changes: 5 additions & 0 deletions crates/bevy_internal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ pub mod ecs {
pub use bevy_ecs::*;
}

pub mod geometry {
//! Geometric primitives
pub use bevy_geometry::*;
}

pub mod input {
//! Resources and events for inputs, e.g. mouse/keyboard, touch, gamepads, etc.
pub use bevy_input::*;
Expand Down
1 change: 1 addition & 0 deletions tools/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ crates=(
bevy_wgpu
bevy_internal
bevy_dylib
bevy_geometry
)

cd crates
Expand Down