Sha256: 80d9c90ce19d3dc2dbd021a594966db9130f531595755e189bcc71f0c42d224b

Contents?: true

Size: 1.97 KB

Versions: 39

Compression:

Stored size: 1.97 KB

Contents

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


#include <rays/coord.h>


namespace Rays
{


	struct Point : public Coord3
	{

		typedef Point This;

		typedef Coord3 Super;

		Point (coord value = 0);

		Point (coord x, coord y, coord z = 0);

		This dup () const;

		This& reset (coord value = 0);

		This& reset (coord x, coord y, coord z = 0);

		This& move_to (coord x, coord y, coord z = 0);

		This& move_to (const This& point);

		This& move_by (coord x, coord y, coord z = 0);

		This& move_by (const This& point);

		void rotate (float degree);

		coord length () const;

		This normal () const;

		void normalize ();

		This operator - () const;

		This& operator += (coord       rhs);

		This& operator += (const This& rhs);

		This& operator -= (coord       rhs);

		This& operator -= (const This& rhs);

		This& operator *= (coord       rhs);

		This& operator *= (const This& rhs);

		This& operator /= (coord       rhs);

		This& operator /= (const This& rhs);

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

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

		friend This operator + (coord       lhs, const This& rhs);

		friend This operator + (const This& lhs, coord       rhs);

		friend This operator + (const This& lhs, const This& rhs);

		friend This operator - (coord       lhs, const This& rhs);

		friend This operator - (const This& lhs, coord       rhs);

		friend This operator - (const This& lhs, const This& rhs);

		friend This operator * (coord       lhs, const This& rhs);

		friend This operator * (const This& lhs, coord       rhs);

		friend This operator * (const This& lhs, const This& rhs);

		friend This operator / (coord       lhs, const This& rhs);

		friend This operator / (const This& lhs, coord       rhs);

		friend This operator / (const This& lhs, const This& rhs);

	};// Point


	coord dot (const Point& p1, const Point& p2);

	Point cross (const Point& p1, const Point& p2);


}// Rays


#endif//EOH

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
rays-0.3 include/rays/point.h
rays-0.2.1 include/rays/point.h
rays-0.2 include/rays/point.h
rays-0.1.49 include/rays/point.h
rays-0.1.48 include/rays/point.h
rays-0.1.47 include/rays/point.h
rays-0.1.46 include/rays/point.h
rays-0.1.45 include/rays/point.h
rays-0.1.44 include/rays/point.h
rays-0.1.43 include/rays/point.h
rays-0.1.42 include/rays/point.h
rays-0.1.40 include/rays/point.h
rays-0.1.39 include/rays/point.h
rays-0.1.38 include/rays/point.h
rays-0.1.37 include/rays/point.h
rays-0.1.36 include/rays/point.h
rays-0.1.35 include/rays/point.h
rays-0.1.34 include/rays/point.h
rays-0.1.33 include/rays/point.h
rays-0.1.32 include/rays/point.h