repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
standbyme/jvm-rs
https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/access_flags.rs
src/rtda/heap/access_flags.rs
pub const ACC_PUBLIC: u16 = 0x0001; pub const ACC_PRIVATE: u16 = 0x0002; pub const ACC_PROTECTED: u16 = 0x0004; pub const ACC_STATIC: u16 = 0x0008; pub const ACC_FINAL: u16 = 0x0010; pub const ACC_SUPER: u16 = 0x0020; pub const ACC_SYNCHRONIZED: u16 = 0x0020; pub const ACC_VOLATILE: u16 = 0x0040; pub const ACC_BRIDGE: ...
rust
MIT
ebdc07e9049d84688effdccec03a0a5b0aeda0bb
2026-01-04T20:23:41.645579Z
false
standbyme/jvm-rs
https://github.com/standbyme/jvm-rs/blob/ebdc07e9049d84688effdccec03a0a5b0aeda0bb/src/rtda/heap/class_member.rs
src/rtda/heap/class_member.rs
use classfile::member_info::MemberInfo; use rtda::heap::access_flags::*; #[derive(Debug)] pub struct ClassMember { pub access_flags: u16, pub name: String, pub descriptor: String, } impl ClassMember { pub fn new(member_info: &MemberInfo) -> ClassMember { let MemberInfo { access_fla...
rust
MIT
ebdc07e9049d84688effdccec03a0a5b0aeda0bb
2026-01-04T20:23:41.645579Z
false
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/feed.rs
src/feed.rs
use anyhow::{Context, Result}; use chrono::{DateTime, Utc}; use feed_rs::parser; use serde::{Deserialize, Serialize}; use std::collections::HashSet; use std::time::Duration; use uuid::Uuid; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Feed { pub url: String, pub title: String, pub items: Vec<...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
false
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/config.rs
src/config.rs
use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; use std::fs; use std::path::{Path, PathBuf}; /// Main configuration structure for Feedr #[derive(Clone, Debug, Serialize, Deserialize, Default)] pub struct Config { #[serde(default)] pub general: GeneralConfig, #[serde(default)] pub ne...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
false
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/app.rs
src/app.rs
use crate::config::Config; use crate::feed::{Feed, FeedCategory, FeedItem}; use crate::ui::extract_domain; use anyhow::Result; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::fs; use std::path::{Path, PathBuf}; use std::time::Instant; #[derive(Clone, Debug, Def...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
true
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/lib.rs
src/lib.rs
pub mod app; pub mod config; pub mod feed; pub mod tui; pub mod ui;
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
false
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/ui.rs
src/ui.rs
use crate::app::{App, CategoryAction, InputMode, TimeFilter, View}; use crate::config::Theme; use html2text::from_read; use ratatui::{ backend::Backend, layout::{Alignment, Constraint, Direction, Layout, Rect}, style::{Color, Modifier, Style}, symbols::{self}, text::{Line, Span, Text}, widgets::...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
true
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/main.rs
src/main.rs
use anyhow::Result; use clap::Parser; use feedr::app::App; use feedr::tui; #[derive(Parser)] #[command(name = "feedr")] #[command(version = env!("CARGO_PKG_VERSION"))] #[command(about = "A feature-rich terminal-based RSS/Atom feed reader written in Rust")] #[command( long_about = "Feedr is a modern terminal-based ...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
false
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/src/tui.rs
src/tui.rs
use crate::app::{App, CategoryAction, InputMode, TimeFilter, View}; use crate::ui; use anyhow::Result; use crossterm::{ event::{ self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode, KeyEventKind, KeyModifiers, }, execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScre...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
true
bahdotsh/feedr
https://github.com/bahdotsh/feedr/blob/55a6dfcd6421a77155609754f14543c4dd8402de/tests/integration_test.rs
tests/integration_test.rs
use feedr::feed::Feed; #[test] fn test_rss_feed_parsing() { // Test with a known RSS feed match Feed::from_url("https://news.ycombinator.com/rss") { Ok(feed) => { assert!(!feed.title.is_empty()); assert!(!feed.items.is_empty()); println!("RSS feed parsed successfully...
rust
MIT
55a6dfcd6421a77155609754f14543c4dd8402de
2026-01-04T20:23:30.329827Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/lib.rs
ghx_proc_gen/src/lib.rs
#![warn(missing_docs)] //! A library for 2D & 3D procedural generation with Model synthesis/Wave function Collapse. //! Also provide grid utilities to manipulate 2d & 3d grid data. use generator::model::{ModelIndex, ModelRotation, ModelVariantIndex}; use ghx_grid::grid::GridIndex; pub use ghx_grid; /// Model synthe...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator.rs
ghx_proc_gen/src/generator.rs
use core::fmt; use std::{collections::HashMap, sync::Arc}; #[cfg(feature = "bevy")] use bevy::ecs::component::Component; use ghx_grid::{ coordinate_system::CoordinateSystem, grid::{Grid, GridData, NodeRef}, }; use crate::{GeneratorError, NodeIndex, NodeSetError}; use self::{ builder::{GeneratorBuilder, ...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/builder.rs
ghx_proc_gen/src/generator/builder.rs
use std::{marker::PhantomData, sync::Arc}; use ghx_grid::{ coordinate_system::CoordinateSystem, grid::{Grid, GridData, NodeRef}, }; use crate::{GeneratorBuilderError, NodeIndex}; use super::{ model::ModelVariantIndex, node_heuristic::NodeSelectionHeuristic, observer::{GenerationUpdate, QueuedObse...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/observer.rs
ghx_proc_gen/src/generator/observer.rs
use super::{model::ModelInstance, GeneratedNode, Generator}; #[cfg(feature = "bevy")] use bevy::ecs::component::Component; use ghx_grid::{ coordinate_system::CoordinateSystem, grid::{Grid, GridData}, }; /// Update sent by a [`crate::generator::Generator`] #[derive(Clone, Copy, Debug)] pub enum GenerationUpdat...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/internal_generator.rs
ghx_proc_gen/src/generator/internal_generator.rs
use std::sync::Arc; use bitvec::{bitvec, order::LocalBits, slice::IterOnes, vec::BitVec}; use ghx_grid::{ coordinate_system::CoordinateSystem, direction::DirectionTrait, grid::{Grid, GridData, NodeRef}, }; use ndarray::{Array, Ix3}; use rand::{ distributions::{Distribution, WeightedIndex}, rngs::St...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/node_heuristic.rs
ghx_proc_gen/src/generator/node_heuristic.rs
use ghx_grid::coordinate_system::CoordinateSystem; use rand::{rngs::StdRng, Rng}; use crate::NodeIndex; use super::rules::Rules; /// Defines a heuristic for the choice of a node to generate. For some given Rules, each heuristic will lead to different visual results and different failure rates. #[derive(Copy, Clone, ...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/model.rs
ghx_proc_gen/src/generator/model.rs
use std::{borrow::Cow, collections::HashSet, fmt, marker::PhantomData}; use ghx_grid::{ cartesian::coordinates::{Cartesian2D, Cartesian3D}, coordinate_system::CoordinateSystem, direction::{Direction, DirectionTrait}, }; #[cfg(feature = "debug-traces")] use tracing::warn; #[cfg(feature = "bevy")] use bevy:...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/rules.rs
ghx_proc_gen/src/generator/rules.rs
use std::{ collections::{BTreeSet, HashMap, HashSet}, fmt, marker::PhantomData, }; use ghx_grid::{ cartesian::coordinates::{Cartesian2D, Cartesian3D}, coordinate_system::CoordinateSystem, direction::{Direction, DirectionTrait}, }; use ndarray::{Array, Ix1, Ix2}; #[cfg(feature = "models-names")...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/ghx_proc_gen/src/generator/socket.rs
ghx_proc_gen/src/generator/socket.rs
use std::collections::{HashMap, HashSet}; use ghx_grid::cartesian::coordinates::{Cartesian2D, Cartesian3D}; use super::model::{ModelRotation, ModelTemplate, ALL_MODEL_ROTATIONS}; /// Id of a possible connection type pub(crate) type SocketId = u64; /// Used to create one or more [`Socket`]. Created sockets can then ...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/lib.rs
bevy_ghx_proc_gen/src/lib.rs
#![warn(missing_docs)] //! This library encapsulates (and re-exports) the "ghx_proc_gen" library for 2D & 3D procedural generation with Model synthesis/Wave function Collapse, for a Bevy usage. //! Also provide grid utilities to manipulate & debug 2d & 3d grid data with Bevy. use bevy::{ ecs::{ bundle::Bu...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/simple_plugin.rs
bevy_ghx_proc_gen/src/simple_plugin.rs
use std::marker::PhantomData; use bevy::{ app::{App, Plugin, PluginGroup, PluginGroupBuilder, Update}, ecs::{ entity::Entity, query::Added, schedule::IntoScheduleConfigs, system::{Commands, Query, ResMut}, }, platform::collections::HashSet, prelude::Resource, }; #[c...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/assets.rs
bevy_ghx_proc_gen/src/assets.rs
use std::{ collections::HashMap, ops::{Deref, DerefMut}, }; use bevy::{ecs::system::EntityCommands, math::Vec3}; use ghx_proc_gen::{ generator::model::{ModelIndex, ModelRotation}, ghx_grid::cartesian::coordinates::GridDelta, }; /// Defines a struct which can spawn components on an Entity (for example,...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/spawner_plugin.rs
bevy_ghx_proc_gen/src/spawner_plugin.rs
use std::{marker::PhantomData, sync::Arc}; use bevy::{ app::{App, Plugin}, ecs::{ component::Component, query::Without, system::{Commands, Query}, world::OnAdd, }, math::Vec3, platform::collections::HashSet, prelude::{Children, Entity, Trigger, With}, render:...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/default_bundles.rs
bevy_ghx_proc_gen/src/default_bundles.rs
use bevy::{ asset::Handle, ecs::system::EntityCommands, image::Image, math::{Quat, Vec3}, pbr::{Material, MeshMaterial3d, StandardMaterial}, prelude::Mesh3d, render::mesh::Mesh, scene::{Scene, SceneRoot}, sprite::Sprite, transform::components::Transform, utils::default, }; us...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/debug_plugin/cursor.rs
bevy_ghx_proc_gen/src/debug_plugin/cursor.rs
use std::{fmt, marker::PhantomData, time::Duration}; use bevy::{ app::{App, Plugin, PostUpdate, PreUpdate, Startup, Update}, color::{palettes::css::GREEN, Color}, ecs::{ component::Component, entity::Entity, event::EventWriter, name::Name, query::{Changed, With, With...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/debug_plugin/egui_editor.rs
bevy_ghx_proc_gen/src/debug_plugin/egui_editor.rs
use bevy::{ app::{App, Update}, ecs::{ event::{Event, EventReader, EventWriter}, query::With, resource::Resource, schedule::IntoScheduleConfigs, system::{Query, Res, ResMut}, }, input::{mouse::MouseButton, ButtonInput}, }; #[cfg(feature = "log")] use bevy::log::w...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/debug_plugin/generation.rs
bevy_ghx_proc_gen/src/debug_plugin/generation.rs
use std::{marker::PhantomData, time::Duration}; use bevy::{ app::{App, Plugin, Update}, color::{palettes::css::RED, Color}, ecs::{ entity::Entity, event::EventWriter, query::{With, Without}, schedule::IntoScheduleConfigs, system::{Commands, Query, Res, ResMut}, }...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/debug_plugin/mod.rs
bevy_ghx_proc_gen/src/debug_plugin/mod.rs
use std::marker::PhantomData; use bevy::{ app::{App, Plugin, PluginGroup, PluginGroupBuilder}, color::{Alpha, Color}, ecs::resource::Resource, input::keyboard::KeyCode, }; use bevy_ghx_grid::ghx_grid::coordinate_system::CoordinateSystem; use cursor::ProcGenDebugCursorPlugin; use generation::{Generatio...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_ghx_proc_gen/src/debug_plugin/picking.rs
bevy_ghx_proc_gen/src/debug_plugin/picking.rs
use bevy::{ app::{App, Plugin, PostUpdate, Startup, Update}, asset::{Assets, Handle}, color::{Alpha, Color}, ecs::{ component::Component, entity::Entity, event::{Event, EventReader, EventWriter}, hierarchy::ChildOf, query::{Changed, With, Without}, resourc...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/examples/unicode-terrain.rs
examples/unicode-terrain.rs
use std::{ io::{stdin, stdout, Write}, thread, time, }; use ghx_proc_gen::{ generator::{ model::{ModelCollection, ModelInstance}, node_heuristic::NodeSelectionHeuristic, observer::QueuedStatefulObserver, rules::RulesBuilder, socket::{SocketCollection, SocketsCartesia...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/examples/chessboard.rs
examples/chessboard.rs
use std::error::Error; use ghx_proc_gen::{ generator::{ builder::GeneratorBuilder, model::ModelCollection, rules::RulesBuilder, socket::{SocketCollection, SocketsCartesian2D}, }, ghx_grid::cartesian::{ coordinates::{Cartesian2D, CartesianPosition}, grid::Cart...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/pillars/rules.rs
bevy_examples/pillars/rules.rs
use bevy_examples::utils::ModelAssetDef; use bevy_ghx_proc_gen::proc_gen::{ generator::{ model::ModelCollection, socket::{SocketCollection, SocketsCartesian3D}, }, ghx_grid::cartesian::coordinates::Cartesian3D, }; pub(crate) fn rules_and_assets() -> ( Vec<Vec<ModelAssetDef>>, ModelC...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/pillars/pillars.rs
bevy_examples/pillars/pillars.rs
use std::{f32::consts::PI, sync::Arc}; use bevy::{ app::{App, Startup}, asset::{AssetServer, Assets, Handle}, color::{ palettes::css::{GRAY, ORANGE_RED}, Color, }, core_pipeline::core_3d::Camera3d, ecs::name::Name, log::LogPlugin, math::{EulerRot, Quat, Vec3}, pbr::{...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/src/lib.rs
bevy_examples/src/lib.rs
pub mod anim; pub mod plugin; pub mod utils;
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/src/utils.rs
bevy_examples/src/utils.rs
use bevy::{ asset::{Asset, AssetServer, Handle}, ecs::system::Res, math::Vec3, prelude::EntityCommands, }; use bevy_ghx_proc_gen::{ assets::{BundleInserter, ModelAsset, ModelsAssets}, proc_gen::ghx_grid::cartesian::coordinates::GridDelta, }; /// Used to define an asset (not yet loaded) for a m...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/src/anim.rs
bevy_examples/src/anim.rs
use bevy::{ ecs::{ component::Component, entity::Entity, resource::Resource, system::{Commands, Query, Res}, }, math::Vec3, time::Time, transform::components::Transform, }; /// Used for the examples #[derive(Component, Clone, Resource)] pub struct SpawningScaleAnimat...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/src/plugin.rs
bevy_examples/src/plugin.rs
use std::marker::PhantomData; use bevy::{ app::{App, Plugin, PreUpdate, Startup, Update}, color::{ palettes::css::{GREEN, YELLOW_GREEN}, Alpha, Color, }, ecs::{ component::Component, event::Events, query::With, schedule::IntoScheduleConfigs, syste...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/chessboard/chessboard.rs
bevy_examples/chessboard/chessboard.rs
use bevy::prelude::*; use bevy_ghx_proc_gen::{ assets::ModelsAssets, bevy_ghx_grid::ghx_grid::cartesian::coordinates::CartesianPosition, default_bundles::PbrMesh, proc_gen::{ generator::{ builder::GeneratorBuilder, model::ModelCollection, rules::RulesBuilder,...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/canyon/canyon.rs
bevy_examples/canyon/canyon.rs
use std::f32::consts::PI; use bevy::{ color::palettes::css::{GRAY, ORANGE_RED}, log::LogPlugin, pbr::DirectionalLightShadowMap, prelude::*, }; use bevy_editor_cam::{prelude::EditorCam, DefaultEditorCamPlugins}; use bevy_examples::{ anim::SpawningScaleAnimation, plugin::ProcGenExamplesPlugin, utils...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/canyon/rules.rs
bevy_examples/canyon/rules.rs
use bevy::{ecs::component::Component, math::Vec3}; use bevy_examples::utils::ModelAssetDef; use bevy_ghx_proc_gen::proc_gen::{ generator::{ model::{ModelCollection, ModelInstance, ModelRotation}, socket::{Socket, SocketCollection, SocketsCartesian3D}, }, ghx_grid::cartesian::coordinates::{Ca...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/tile-layers/rules.rs
bevy_examples/tile-layers/rules.rs
use bevy_examples::utils::ModelAssetDef; use bevy_ghx_proc_gen::{ bevy_ghx_grid::ghx_grid::direction::Direction, proc_gen::{ generator::{ model::{ModelCollection, ModelRotation}, socket::{Socket, SocketCollection, SocketsCartesian3D}, }, ghx_grid::cartesian::coor...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
Henauxg/ghx_proc_gen
https://github.com/Henauxg/ghx_proc_gen/blob/8a0e7c7dc435c1927cc51893bfd55c3b1d777241/bevy_examples/tile-layers/tile-layers.rs
bevy_examples/tile-layers/tile-layers.rs
use bevy::{ app::{App, PluginGroup, Startup}, asset::{AssetServer, Handle}, color::Color, ecs::system::{Commands, Res}, image::Image, log::LogPlugin, math::Vec3, prelude::Camera2d, render::texture::ImagePlugin, transform::components::Transform, utils::default, DefaultPlug...
rust
Apache-2.0
8a0e7c7dc435c1927cc51893bfd55c3b1d777241
2026-01-04T20:23:43.614602Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/prelude.rs
src/prelude.rs
//! Prelude provides all the traits of the library in a convenient form pub use crate::bound::{PlaneBound, Relation}; pub use crate::traits::*; pub use crate::volume::{Aabb, MinMax};
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/lib.rs
src/lib.rs
#![crate_type = "rlib"] #![crate_type = "dylib"] #![forbid(unsafe_code, unstable_features)] #![deny( missing_docs, missing_copy_implementations, missing_debug_implementations, trivial_casts, unused_import_braces, unused_qualifications, rust_2018_compatibility, rust_2018_idioms, nonst...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/contact.rs
src/contact.rs
//! Collision contact manifold use cgmath::prelude::*; /// Collision strategy to use for collisions. /// /// This is used both to specify what collision strategy to use for each shape, and also each /// found contact will have this returned on it, detailing what data is relevant in the /// [`Contact`](struct.Contact....
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/plane.rs
src/plane.rs
use std::fmt; use cgmath::prelude::*; use cgmath::{ulps_eq, ulps_ne}; use cgmath::{AbsDiffEq, RelativeEq, UlpsEq}; use cgmath::{BaseFloat, Point3, Vector3, Vector4}; use crate::prelude::*; use crate::Ray3; /// A 3-dimensional plane formed from the equation: `A*x + B*y + C*z - D = 0`. /// /// # Fields /// /// - `n`: ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/ray.rs
src/ray.rs
//! Generic rays use core::fmt; use std::marker::PhantomData; use cgmath::prelude::*; use cgmath::{BaseFloat, BaseNum}; use cgmath::{Point2, Point3}; use cgmath::{Vector2, Vector3}; use crate::traits::{Continuous, ContinuousTransformed, Discrete, DiscreteTransformed}; /// A generic ray starting at `origin` and exte...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/bound.rs
src/bound.rs
//! Generic spatial bounds. use cgmath::BaseFloat; use cgmath::Matrix4; use cgmath::{EuclideanSpace, Point3}; use std::{cmp, fmt}; use crate::frustum::Frustum; use crate::plane::Plane; /// Spatial relation between two objects. #[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialOrd, PartialEq)] #[repr(u8)] pub enum R...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/line.rs
src/line.rs
//! Line segments use std::fmt; use std::marker::PhantomData; use cgmath::prelude::*; use cgmath::{BaseFloat, BaseNum}; use cgmath::{Point2, Point3}; use cgmath::{Vector2, Vector3}; use crate::prelude::*; use crate::Ray2; /// A generic directed line segment from `origin` to `dest`. #[derive(Copy, Clone, PartialEq)]...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/traits.rs
src/traits.rs
use cgmath::prelude::*; use cgmath::BaseNum; /// An intersection test with a result. /// /// An example would be a Ray vs AABB intersection test that returns a Point in space. /// pub trait Continuous<RHS> { /// Result returned by the intersection test type Result; /// Intersection test fn intersectio...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/frustum.rs
src/frustum.rs
//! View frustum for visibility determination use crate::bound::*; use crate::Plane; use cgmath::BaseFloat; use cgmath::Point3; use cgmath::{Matrix, Matrix4}; use cgmath::{Ortho, Perspective, PerspectiveFov}; /// View frustum, used for frustum culling #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr( feature =...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/primitive2.rs
src/primitive/primitive2.rs
//! Wrapper enum for 2D primitives use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Vector2}; use crate::prelude::*; use crate::primitive::{Circle, ConvexPolygon, Particle2, Rectangle, Square}; use crate::{Aabb2, Line2, Ray2}; /// Wrapper enum for 2D primitives, that also implements the `Primitive` trait, mak...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/rectangle.rs
src/primitive/rectangle.rs
//! Rectangle primitive use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Vector2}; use crate::prelude::*; use crate::primitive::util::get_max_point; use crate::{Aabb2, Ray2}; /// Rectangle primitive. /// /// Have a cached set of corner points to speed up computation. #[derive(Debug, Clone, PartialEq)] #[cfg_a...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/polygon.rs
src/primitive/polygon.rs
//! Convex polygon primitive use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Vector2}; use crate::prelude::*; use crate::primitive::util::{get_bound, get_max_point}; use crate::{Aabb2, Line2, Ray2}; /// Convex polygon primitive. /// /// Can contain any number of vertices, but a high number of vertices will /...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/cuboid.rs
src/primitive/cuboid.rs
use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::primitive::util::get_max_point; use crate::volume::Sphere; use crate::{Aabb3, Ray3}; /// Cuboid primitive. /// /// Have a cached set of corner points to speed up computation. #[derive(Debug, Clone, PartialEq)] #[cfg_at...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/util.rs
src/primitive/util.rs
//! Utilities //! use std::ops::Neg; use crate::{Aabb, Ray3}; use cgmath::num_traits::Float; use cgmath::prelude::*; use cgmath::{BaseFloat, BaseNum, Vector2}; pub(crate) fn get_max_point<'a, P: 'a, T, I>(vertices: I, direction: &P::Diff, transform: &T) -> P where P: EuclideanSpace, P::Scalar: BaseFloat, ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/polyhedron.rs
src/primitive/polyhedron.rs
use std::cmp::Ordering; use std::collections::HashMap; use bit_set::BitSet; use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::primitive::util::barycentric_point; use crate::volume::Sphere; use crate::{Aabb3, Plane, Ray3}; #[derive(Debug, Clone, PartialEq)] #[cfg_attr...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/circle.rs
src/primitive/circle.rs
//! Circle primitive use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Vector2}; use crate::prelude::*; use crate::{Aabb2, Ray2}; /// Circle primitive #[derive(Debug, Clone, PartialEq)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate") )] pub struct Circle<...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/cylinder.rs
src/primitive/cylinder.rs
use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::primitive::util::cylinder_ray_quadratic_solve; use crate::volume::Sphere; use crate::{Aabb3, Ray3}; /// Cylinder primitive /// Cylinder body is aligned with the Y axis, with local origin in the center of the cylinders....
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/mod.rs
src/primitive/mod.rs
//! Collision primitives pub use self::capsule::Capsule; pub use self::circle::Circle; pub use self::cuboid::{Cube, Cuboid}; pub use self::cylinder::Cylinder; pub use self::particle::*; pub use self::polygon::ConvexPolygon; pub use self::polyhedron::ConvexPolyhedron; pub use self::primitive2::Primitive2; pub use self:...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/quad.rs
src/primitive/quad.rs
//! Rectangular plane primitive use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector2, Vector3}; use crate::prelude::*; use crate::primitive::util::get_max_point; use crate::{Aabb3, Ray3, Sphere}; /// Rectangular plane primitive. Will lie on the xy plane when not transformed. /// /// Have a cached set of c...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/particle.rs
src/primitive/particle.rs
//! Particle primitive use std::marker; use std::ops::Range; use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Point3}; use crate::prelude::*; use crate::Ray; /// Represents a particle in space. /// /// Only have implementations of intersection tests for movement, /// using `(Particle, Range<P>)` where `P` is...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/line.rs
src/primitive/line.rs
use cgmath::{BaseFloat, InnerSpace, Point2, Transform, Vector2}; use crate::line::Line2; use crate::traits::{ComputeBound, Primitive}; use crate::Aabb2; impl<S> Primitive for Line2<S> where S: BaseFloat, { type Point = Point2<S>; fn support_point<T>(&self, direction: &Vector2<S>, transform: &T) -> Self::...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/primitive3.rs
src/primitive/primitive3.rs
//! Wrapper enum for 3D primitives use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::primitive::{ Capsule, ConvexPolyhedron, Cube, Cuboid, Cylinder, Particle3, Quad, Sphere, }; use crate::{Aabb3, Ray3}; /// Wrapper enum for 3D primitives, that also implements the...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/capsule.rs
src/primitive/capsule.rs
use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::primitive::util::cylinder_ray_quadratic_solve; use crate::volume::Sphere; use crate::{Aabb3, Ray3}; /// Capsule primitive /// Capsule body is aligned with the Y axis, with local origin in the center of the capsule. #[d...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/primitive/sphere.rs
src/primitive/sphere.rs
use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::{Aabb3, Ray3}; /// Sphere primitive #[derive(Debug, Clone, PartialEq)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate") )] pub struct Sphere<S> { /// Radius of...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/mod.rs
src/algorithm/mod.rs
//! Collision detection algorithms pub mod broad_phase; pub mod minkowski;
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/broad_phase/dbvt.rs
src/algorithm/broad_phase/dbvt.rs
//! [`Dynamic Bounding Volume Tree`](../../dbvt/struct.DynamicBoundingVolumeTree.html) accelerated //! broad phase collision detection algorithm use std::cmp::Ordering; use crate::dbvt::{DiscreteVisitor, DynamicBoundingVolumeTree, TreeValue}; use crate::prelude::*; /// [`Dynamic Bounding Volume Tree`](../../dbvt/str...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/broad_phase/mod.rs
src/algorithm/broad_phase/mod.rs
//! Broad phase collision detection algorithms pub use self::brute_force::BruteForce; pub use self::dbvt::DbvtBroadPhase; pub use self::sweep_prune::{SweepAndPrune, SweepAndPrune2, SweepAndPrune3, Variance}; mod brute_force; mod dbvt; mod sweep_prune;
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/broad_phase/brute_force.rs
src/algorithm/broad_phase/brute_force.rs
use crate::prelude::*; /// Broad phase collision detection brute force implementation. /// /// Will simply do bounding box intersection tests for all shape combinations. #[derive(Debug, Default, Copy, Clone)] pub struct BruteForce; impl BruteForce { /// Find all potentially colliding pairs of shapes. /// ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/broad_phase/sweep_prune.rs
src/algorithm/broad_phase/sweep_prune.rs
pub use self::variance::Variance; use std::cmp::Ordering; use cgmath::num_traits::NumCast; use self::variance::{Variance2, Variance3}; use crate::prelude::*; /// Broad phase sweep and prune algorithm for 2D, see /// [SweepAndPrune](struct.SweepAndPrune.html) for more information. pub type SweepAndPrune2<S, B> = Swe...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/mod.rs
src/algorithm/minkowski/mod.rs
//! Algorithms using the Minkowski Sum/Difference pub use self::epa::{EPA, EPA2, EPA3}; pub use self::gjk::{SimplexProcessor, GJK, GJK2, GJK3}; use std::ops::{Neg, Sub}; use crate::prelude::*; use cgmath::prelude::*; mod epa; mod gjk; /// Minkowski Sum/Difference support point #[derive(Clone, Debug, Copy)] pub str...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/epa/epa2d.rs
src/algorithm/minkowski/epa/epa2d.rs
use std::marker; use cgmath::assert_ulps_ne; use cgmath::num_traits::NumCast; use cgmath::prelude::*; use cgmath::{BaseFloat, Point2, Vector2}; use super::*; use crate::prelude::*; use crate::primitive::util::triple_product; use crate::{CollisionStrategy, Contact}; /// EPA algorithm implementation for 2D. Only to be...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/epa/epa3d.rs
src/algorithm/minkowski/epa/epa3d.rs
use std::marker; use cgmath::num_traits::NumCast; use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use super::SupportPoint; use super::*; use crate::prelude::*; use crate::primitive::util::barycentric_vector; use crate::{CollisionStrategy, Contact}; /// EPA algorithm implementation for 3D. Only to b...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/epa/mod.rs
src/algorithm/minkowski/epa/mod.rs
//! Expanding Polytope Algorithm pub use self::epa2d::EPA2; pub use self::epa3d::EPA3; mod epa2d; mod epa3d; use cgmath::prelude::*; use super::SupportPoint; use crate::prelude::*; use crate::Contact; pub const EPA_TOLERANCE: f32 = 0.00001; pub const MAX_ITERATIONS: u32 = 100; /// Expanding Polytope Algorithm bas...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/gjk/mod.rs
src/algorithm/minkowski/gjk/mod.rs
//! GJK distance/collision detection algorithm. For now only have implementation of collision //! detection, not distance computation. pub use self::simplex::SimplexProcessor; use std::cmp::Ordering; use std::ops::{Neg, Range}; use cgmath::num_traits::NumCast; use cgmath::prelude::*; use cgmath::BaseFloat; use cgmat...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/gjk/simplex/simplex3d.rs
src/algorithm/minkowski/gjk/simplex/simplex3d.rs
use std::marker; use std::ops::Neg; use cgmath::num_traits::cast; use cgmath::prelude::*; use cgmath::ulps_eq; use cgmath::{BaseFloat, Point3, Vector3}; use super::{Simplex, SimplexProcessor}; use crate::primitive::util::{barycentric_vector, get_closest_point_on_edge}; /// Simplex processor implementation for 3D. On...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/gjk/simplex/simplex2d.rs
src/algorithm/minkowski/gjk/simplex/simplex2d.rs
use std::marker; use std::ops::Neg; use cgmath::prelude::*; use cgmath::ulps_eq; use cgmath::{BaseFloat, Point2, Vector2}; use super::{Simplex, SimplexProcessor}; use crate::primitive::util::{get_closest_point_on_edge, triple_product}; /// Simplex processor implementation for 2D. Only to be used in [`GJK`](struct.GJ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/algorithm/minkowski/gjk/simplex/mod.rs
src/algorithm/minkowski/gjk/simplex/mod.rs
pub use self::simplex2d::SimplexProcessor2; pub use self::simplex3d::SimplexProcessor3; mod simplex2d; mod simplex3d; use cgmath::prelude::*; use smallvec::SmallVec; use crate::algorithm::minkowski::SupportPoint; pub type Simplex<P> = SmallVec<[SupportPoint<P>; 5]>; /// Defined a simplex processor for use in GJK. ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/dbvt/visitor.rs
src/dbvt/visitor.rs
//! Concrete visitor implementations for use with //! [`query`](struct.DynamicBoundingVolumeTree.html#method.query). //! use std::marker::PhantomData; use cgmath::BaseFloat; use super::{TreeValue, Visitor}; use crate::prelude::*; use crate::{Frustum, PlaneBound, Relation}; /// Visitor for doing continuous intersect...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/dbvt/wrapped.rs
src/dbvt/wrapped.rs
use std::fmt::Debug; use cgmath::{EuclideanSpace, Zero}; use super::TreeValue; use crate::{Bound, HasBound}; /// Value together with bounding volume, for use with DBVT. #[derive(Debug, Clone)] pub struct TreeValueWrapped<V, B> where B: Bound, <B::Point as EuclideanSpace>::Diff: Debug, { /// The value ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/dbvt/util.rs
src/dbvt/util.rs
//! Utilities for use with //! [`DynamicBoundingVolumeTree`](struct.DynamicBoundingVolumeTree.html). //! use std::marker::PhantomData; use cgmath::prelude::*; use cgmath::BaseFloat; use super::{ContinuousVisitor, DynamicBoundingVolumeTree, TreeValue, Visitor}; use crate::prelude::*; use crate::Ray; struct RayCloses...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/dbvt/mod.rs
src/dbvt/mod.rs
//! A [dynamic bounding volume tree implementation](struct.DynamicBoundingVolumeTree.html), //! index based (not pointer based). //! //! The following invariants are true: //! //! * A branch node must have exactly two children. //! * Only leaf nodes contain user data. //! //! Internal nodes may have incorrect bounding ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
true
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/cylinder.rs
src/volume/cylinder.rs
//! Oriented bounding cylinder use cgmath::Point3; use cgmath::Vector3; /// Bounding cylinder #[derive(Copy, Clone, PartialEq, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate") )] pub struct Cylinder<S> { /// Center point pub center: Point3<S>, ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/mod.rs
src/volume/mod.rs
pub use self::aabb::*; pub use self::cylinder::Cylinder; pub use self::obb::*; pub use self::sphere::*; mod aabb; mod cylinder; mod obb; mod sphere;
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/obb.rs
src/volume/obb.rs
//! Oriented bounding boxes use std::marker::PhantomData; use cgmath::{Point2, Point3}; use cgmath::{Vector2, Vector3}; /// Generic object bounding box, centered on `center`, aligned with `axis`, /// and with size `extents`. #[derive(Copy, Clone, PartialEq, Debug)] #[cfg_attr( feature = "serde", derive(Seria...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/sphere.rs
src/volume/sphere.rs
//! Bounding sphere use cgmath::prelude::*; use cgmath::{BaseFloat, Point3, Vector3}; use crate::prelude::*; use crate::{Aabb3, Line3, Plane, Ray3}; /// Bounding sphere. #[derive(Copy, Clone, PartialEq, Debug)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), serde(crate = "serde_crate") )]...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/aabb/aabb3.rs
src/volume/aabb/aabb3.rs
//! Axis aligned bounding box for 2D. //! use std::fmt; use cgmath::prelude::*; use cgmath::{BaseFloat, BaseNum, Point3, Vector3}; use super::{max, min}; use crate::prelude::*; use crate::{Line3, Plane, Ray3, Sphere}; /// A three-dimensional AABB, aka a rectangular prism. #[derive(Copy, Clone, PartialEq)] #[cfg_att...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/aabb/mod.rs
src/volume/aabb/mod.rs
//! Axis-aligned bounding boxes //! //! An AABB is a geometric object which encompasses a set of points and is not //! rotated. It is either a rectangle or a rectangular prism (depending on the //! dimension) where the slope of every line is either 0 or undefined. These //! are useful for very cheap collision detection...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/src/volume/aabb/aabb2.rs
src/volume/aabb/aabb2.rs
//! Axis aligned bounding box for 2D. //! use std::fmt; use cgmath::prelude::*; use cgmath::{BaseFloat, BaseNum, Point2, Vector2}; use super::{max, min}; use crate::prelude::*; use crate::{Line2, Ray2}; /// A two-dimensional AABB, aka a rectangle. #[derive(Copy, Clone, PartialEq)] #[cfg_attr( feature = "serde",...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/serde.rs
tests/serde.rs
#![cfg(feature = "serde")] use cgmath::Point1; use serde_crate::Serialize; fn has_serialize<S: Serialize>() -> bool { true } #[test] fn test_feature_enabled() { assert!(has_serialize::<Point1<f32>>()); }
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/aabb.rs
tests/aabb.rs
use cgmath::InnerSpace; use cgmath::{Point2, Point3}; use cgmath::{Vector2, Vector3}; use collision::{Aabb, Aabb2, Aabb3}; use collision::{Contains, Continuous, Discrete, SurfaceArea, Union}; use collision::{Line2, Line3, Ray2, Ray3, Sphere}; use collision::{Plane, PlaneBound, Ray, Relation}; #[test] fn test_general()...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/dbvt.rs
tests/dbvt.rs
use cgmath::prelude::*; use cgmath::{Deg, PerspectiveFov, Point2, Point3, Vector2, Vector3}; use collision::dbvt::*; use collision::prelude::*; use collision::{Aabb2, Aabb3, Frustum, Projection, Ray2, Relation}; use rand::Rng; #[derive(Debug, Clone)] struct Value2 { pub id: u32, pub aabb: Aabb2<f32>, fat_a...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/plane.rs
tests/plane.rs
use cgmath::*; use collision::*; #[test] fn test_from_points() { assert_eq!( Plane::from_points( Point3::new(5.0f64, 0.0f64, 5.0f64), Point3::new(5.0f64, 5.0f64, 5.0f64), Point3::new(5.0f64, 0.0f64, -1.0f64), ), Some(Plane::from_abcd(-1.0f64, 0.0f64, 0.0f...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/bound.rs
tests/bound.rs
use collision::PlaneBound; fn _box(_: Box<dyn PlaneBound<f32>>) {} #[test] fn bound_box() {}
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/point.rs
tests/point.rs
use cgmath::assert_ulps_eq; use cgmath::{Point3, Vector3}; use collision::{Continuous, Plane, PlaneBound, Ray3, Relation}; #[test] fn test_homogeneous() { let p = Point3::new(1.0f64, 2.0f64, 3.0f64); assert_ulps_eq!(p, &Point3::from_homogeneous(p.to_homogeneous())); } #[test] fn test_bound() { let point =...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/sphere.rs
tests/sphere.rs
use cgmath::*; use collision::*; #[test] fn test_intersection() { let sphere = Sphere { center: Point3::new(0f64, 0f64, 0f64), radius: 1f64, }; let r0 = Ray::new( Point3::new(0f64, 0f64, 5f64), Vector3::new(0f64, 0f64, -5f64).normalize(), ); let r1 = Ray::new( ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/tests/frustum.rs
tests/frustum.rs
use cgmath::{PerspectiveFov, Point3, Rad}; use collision::{Projection, Relation, Sphere}; #[test] fn test_contains() { let frustum = PerspectiveFov { fovy: Rad(1f32), aspect: 1f32, near: 1f32, far: 10f32, } .to_frustum(); assert_eq!( frustum.contains(&Sphere { ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/benches/dbvt.rs
benches/dbvt.rs
#![feature(test)] extern crate test; use cgmath::prelude::*; use cgmath::{Point2, Vector2}; use collision::dbvt::*; use collision::prelude::*; use collision::{Aabb2, Ray2}; use rand::Rng; use test::Bencher; #[derive(Debug, Clone)] struct Value { pub id: u32, pub aabb: Aabb2<f32>, fat_aabb: Aabb2<f32>, } ...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false
rustgd/collision-rs
https://github.com/rustgd/collision-rs/blob/29090c42a1716d80c1a4fb12e4e1dc2d9c18580e/benches/polyhedron.rs
benches/polyhedron.rs
#![feature(test)] extern crate test; use cgmath::prelude::*; use cgmath::{Decomposed, Point3, Quaternion, Vector3}; use collision::prelude::*; use collision::primitive::ConvexPolyhedron; use genmesh::generators::{IndexedPolygon, SharedVertex, SphereUV}; use genmesh::Triangulate; use rand::Rng; use test::{black_box, B...
rust
Apache-2.0
29090c42a1716d80c1a4fb12e4e1dc2d9c18580e
2026-01-04T20:23:49.286122Z
false