Code Search for Developers
 
 
  

geom4d.h from Boson at Krugle


Show geom4d.h syntax highlighted

#ifndef GFXGEOM4D_INCLUDED
#define GFXGEOM4D_INCLUDED
#if !defined(__GNUC__)
#  pragma once
#endif

/************************************************************************

  Handy 4D geometrical primitives

  $Id: geom4d.h 6292 2005-07-01 20:09:07Z abmann $

 ************************************************************************/

template<class Vec>
inline Vec tet_raw_normal(const Vec& v1, const Vec& v2, const Vec& v3, const Vec& v4)
{
	return cross(v2-v1, v3-v1, v4-v1);
}


template<class Vec>
inline Vec tet_normal(const Vec& v1, const Vec& v2, const Vec& v3, const Vec& v4)
{
	Vec n = tet_raw_normal(v1, v2, v3, v4);
	unitize(n);
    return n;
}

// GFXGEOM4D_INCLUDED
#endif




See more files for this project here

Boson

Boson is an OpenGL real-time strategy game. It is designed to run on Unix (Linux) computers, and is built on top of the KDE, Qt and kdegames libraries.

Project homepage: http://sourceforge.net/projects/boson
Programming language(s): C,C++
License: other

  arcball.h
  array.h
  baseball.h
  geom3d.h
  geom4d.h
  gfx.h
  gl.h
  glext.h
  gltools.h
  gui.h
  intvec.h
  mat2.h
  mat3.h
  mat4.h
  mfc.h
  quat.h
  raster.h
  script.h
  symmat3.h
  symmat4.h
  trackball.h
  vec2.h
  vec3.h
  vec4.h
  wintools.h