Sha256: 60bf551ee8a936d0fb8a5b6a5d7b49587cc24e349a2f9f53674413157428690a

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

// -*- c++ -*-
#pragma once
#ifndef __RAYS_BOUNDS_H__
#define __RAYS_BOUNDS_H__


#include <rays/defs.h>
#include <rays/point.h>


namespace Rays
{


	struct Bounds
	{

		typedef Bounds This;

		coord x, y, z, width, height, depth;

		Bounds (coord size = 0);

		Bounds (                           coord width, coord height, coord depth = 0);

		Bounds (coord x, coord y,          coord width, coord height);

		Bounds (coord x, coord y, coord z, coord width, coord height, coord depth);

		Bounds dup () const;

		Bounds& set (coord size = 0);

		Bounds& set (                           coord width, coord height, coord depth = 0);

		Bounds& set (coord x, coord y,          coord width, coord height);

		Bounds& set (coord x, coord y, coord z, coord width, coord height, coord depth);

		bool get (coord* x, coord* y, coord* width, coord* height) const;

		bool get (coord* x, coord* y, coord* z, coord* width, coord* height, coord* depth) const;

		void set_left (coord left);

		coord    left () const;

		void set_right (coord right);

		coord    right () const;

		void set_top (coord top);

		coord    top () const;

		void set_bottom (coord bottom);

		coord    bottom () const;

		void set_back (coord back);

		coord    back () const;

		void set_front (coord front);

		coord    front () const;

		      Point& position ();

		const Point& position () const;

		      Point& size ();

		const Point& size () const;

		      coord* array ();

		const coord* array () const;

		operator bool () const;

		bool operator ! () const;

		friend bool operator == (const Bounds& lhs, const Bounds& rhs);

		friend bool operator != (const Bounds& lhs, const Bounds& rhs);

	};// Bounds


}// Rays


#endif//EOH

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rays-0.1.6 include/rays/bounds.h
rays-0.1.5 include/rays/bounds.h
rays-0.1.4 include/rays/bounds.h