All Projects → octoon → engine

octoon / engine

Licence: MIT license
An easy-to-use, cross-platform, graphics render library written entirely in rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to engine

RayTracing
Realtime GPU Path tracer based on OpenCL and OpenGL
Stars: ✭ 120 (+361.54%)
Mutual labels:  render, pbr
react-smart-key
Pass anything as key without re-renders
Stars: ✭ 17 (-34.62%)
Mutual labels:  render
three-render-objects
Easy way to render ThreeJS objects with built-in interaction defaults
Stars: ✭ 33 (+26.92%)
Mutual labels:  render
render react
Pre-render and mount React components from Ruby
Stars: ✭ 14 (-46.15%)
Mutual labels:  render
paper-terminal
Print Markdown to a paper in your terminal
Stars: ✭ 33 (+26.92%)
Mutual labels:  render
DuBLF DuBlast
Quick Playblast tool for Blender
Stars: ✭ 18 (-30.77%)
Mutual labels:  render
radar
OpenGL 4 PBR engine
Stars: ✭ 25 (-3.85%)
Mutual labels:  pbr
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+803.85%)
Mutual labels:  pbr
redcube
JS renderer based on GLTF to WebGPU or WebGL backends.
Stars: ✭ 86 (+230.77%)
Mutual labels:  pbr
Vanilla-Raytraced
Official repository of Vanilla Raytraced resources pack.
Stars: ✭ 25 (-3.85%)
Mutual labels:  pbr
PlenOctrees NeRF-SH
PlenOctree Extraction algorithm
Stars: ✭ 48 (+84.62%)
Mutual labels:  render
harfang3d
HARFANG 3D source code public repository
Stars: ✭ 173 (+565.38%)
Mutual labels:  pbr
limitless-engine
OpenGL C++ Graphics Engine
Stars: ✭ 95 (+265.38%)
Mutual labels:  pbr
django-quick-start
Deploy a Django app on Render
Stars: ✭ 17 (-34.62%)
Mutual labels:  render
cc0-textures
Torrent downloads of free, CC0 licensed, PBR textures
Stars: ✭ 54 (+107.69%)
Mutual labels:  pbr
react-translations-provider
React render props component for setting translations
Stars: ✭ 35 (+34.62%)
Mutual labels:  render
smallpt
☀️ The Rosetta smallpt (small path tracing) project
Stars: ✭ 68 (+161.54%)
Mutual labels:  pbr
taichi pt
progressive path tracer written in taichi
Stars: ✭ 20 (-23.08%)
Mutual labels:  pbr
phoenix example
An example Phoenix app with one-click deployments to different cloud services.
Stars: ✭ 62 (+138.46%)
Mutual labels:  render
django-renderpdf
📄 A Django app to render django templates as PDF files.
Stars: ✭ 37 (+42.31%)
Mutual labels:  render

octoon-math

octoon-math is designed for rust developers working on games and compute graphics

Usage

Add this to your Cargo.toml:

[dependencies]
octoon-math = { version = "0.1", features = ["serialize"] }

Examples

extern crate octoon_math;

use octoon_math::*;
use octoon_math::consts::*;

fn main()
{
// new float2
    let a = float2::new(1.0,0.0);
    let b = float!(0.0,1.0); // same as float2::new

// new float3
    let c = float3::new(1.0,0.0,0.0);
    let d = float!(0.0,1.0,0.0); // same as float3::new

// new float4
    let e = float4::new(1.0,0.0,0.0,0.0);
    let f = float!(0.0,1.0,0.0,0.0); // same as float4::new

// new array
	let x = 0.5;
	let y = 0.5;
	let z = 0.5;

	let vertices:Vec<float3> = vec![
		float!(-x,-y,-z), float!( x,-y,-z), float!( x, y,-z), float!(-x, y,-z), 
		float!(-x,-y, z), float!( x,-y, z), float!( x, y, z), float!(-x, y, z),
		float!(-x,-y,-z), float!(-x, y,-z), float!(-x, y, z), float!(-x,-y, z),
		float!( x,-y,-z), float!( x, y,-z), float!( x, y, z), float!( x,-y, z), 
		float!(-x,-y,-z), float!(-x,-y, z), float!( x,-y, z), float!( x,-y,-z),
		float!(-x, y,-z), float!(-x, y, z), float!( x, y, z), float!( x, y,-z), 
	];

// operators
	let ab = a.dot(b);
	let cd = c.cross(d);
	let ef = e.lerp(f, 0.5);
	let len = a.length();

// consts
	let pi = f32::pi();
	let pi2 = f32::pi2();
	let pi4 = f32::pi4();
	let one = float2::one();
	let zero = float2::zero();
	let unitx = float3::unit_x(); // say: float3::new(1.0, 0.0, 0.0)
	let unity = float3::unit_y(); // say: float3::new(0.0, 1.0, 0.0)
	let unitz = float3::unit_z(); // say: float3::new(0.0, 0.0, 1.0)
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].