class Eagle::Physics3D::Cuboid

Overview

A box collision shape that rotates with its body.

Defined in:

eagle/physics/physics3d.cr

Constructors

Instance Method Summary

Instance methods inherited from class Eagle::Physics3D::Shape

inertia_factor : Vec3 inertia_factor, local_aabb : AABB local_aabb, offset : Vec3 offset, offset=(offset : Vec3) offset=, volume : Float32 volume

Constructor Detail

def self.cube(size : Number) : Cuboid #

A cube with sides of size.


def self.new(size : Vec3, offset : Vec3 = Vec3::ZERO) #

Creates a box of full size.


Instance Method Detail

def half : Vec3 #

Half the box's size along each axis.


def half=(half : Vec3) #

Half the box's size along each axis.


def inertia_factor : Vec3 #

Inertia per unit mass.


def local_aabb : AABB #

Bounds in local space.


def size : Vec3 #

Full size along each axis.


def volume : Float32 #

Volume.