Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Point3< T > Class Template Reference

#include <vecmath.h>

Inheritance diagram for Point3< T >:

Inheritance graph
Collaboration diagram for Point3< T >:

Collaboration graph
List of all members.

Public Member Functions

distanceFromOrigin () const
distanceFromOriginSquared () const
distanceTo (const Point3 &) const
distanceToSquared (const Point3 &) const
Point3operator *= (T)
Point3operator+= (const Vector3< T > &)
Point3operator-= (const Vector3< T > &)
T & operator[] (int) const
 Point3 (T *)
 Point3 (T, T, T)
 Point3 (const Point3 &)
 Point3 ()

Public Attributes

x
y
z

template<class T>
class Point3< T >


Constructor & Destructor Documentation

template<class T>
Point3< T >::Point3  )  [inline]
 

Definition at line 321 of file vecmath.h.

00321                                     : x(0), y(0), z(0)
00322 {
00323 }

template<class T>
Point3< T >::Point3 const Point3< T > &   )  [inline]
 

Definition at line 325 of file vecmath.h.

00325                                                       :
00326     x(p.x), y(p.y), z(p.z)
00327 {
00328 }

template<class T>
Point3< T >::Point3 ,
,
[inline]
 

Definition at line 330 of file vecmath.h.

00330                                                     : x(_x), y(_y), z(_z)
00331 {
00332 }

template<class T>
Point3< T >::Point3 T *   )  [inline]
 

Definition at line 334 of file vecmath.h.

00334                                         : x(p[0]), y(p[1]), z(p[2])
00335 {
00336 }


Member Function Documentation

template<class T>
T Point3< T >::distanceFromOrigin  )  const [inline]
 

Definition at line 421 of file vecmath.h.

References sqrt(), Point3< T >::x, Point3< T >::y, and Point3< T >::z.

Referenced by buildGalacticForms(), StarDatabase::createStar(), SynchronousOrbit::getBoundingRadius(), Observer::getSelectionLongLat(), InitializeForms(), StarRenderer::process(), Renderer::render(), renderEclipseShadows(), Galaxy::renderGalaxyPointSprites(), Renderer::renderLocations(), CelestialBrowser::slotRefresh(), and EclipseFinder::testEclipse().

00422 {
00423     return (T) sqrt(x * x + y * y + z * z);
00424 }

template<class T>
T Point3< T >::distanceFromOriginSquared  )  const [inline]
 

Definition at line 426 of file vecmath.h.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00427 {
00428     return x * x + y * y + z * z;
00429 }

template<class T>
T Point3< T >::distanceTo const Point3< T > &   )  const [inline]
 

Definition at line 407 of file vecmath.h.

References sqrt(), Point3< T >::x, Point3< T >::y, and Point3< T >::z.

Referenced by Renderer::labelStars(), BrighterStarPredicate::operator()(), CloseDSOPicker::process(), LODSphereMesh::renderPatches(), and StarBrowserCompareFunc().

00408 {
00409     return (T) sqrt((p.x - x) * (p.x - x) +
00410                     (p.y - y) * (p.y - y) +
00411                     (p.z - z) * (p.z - z));
00412 }

template<class T>
T Point3< T >::distanceToSquared const Point3< T > &   )  const [inline]
 

Definition at line 414 of file vecmath.h.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00415 {
00416     return ((p.x - x) * (p.x - x) +
00417             (p.y - y) * (p.y - y) +
00418             (p.z - z) * (p.z - z));
00419 }

template<class T>
Point3< T > & Point3< T >::operator *=  )  [inline]
 

Definition at line 365 of file vecmath.h.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00366 {
00367     x *= s; y *= s; z *= s;
00368     return *this;
00369 }

template<class T>
Point3< T > & Point3< T >::operator+= const Vector3< T > &   )  [inline]
 

Definition at line 353 of file vecmath.h.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00354 {
00355     x += v.x; y += v.y; z += v.z;
00356     return *this;
00357 }

template<class T>
Point3< T > & Point3< T >::operator-= const Vector3< T > &   )  [inline]
 

Definition at line 359 of file vecmath.h.

References Point3< T >::x, Point3< T >::y, and Point3< T >::z.

00360 {
00361     x -= v.x; y -= v.y; z -= v.z;
00362     return *this;
00363 }

template<class T>
T & Point3< T >::operator[] int   )  const [inline]
 

Definition at line 341 of file vecmath.h.

00342 {
00343     // Not portable--I'll write a new version when I try to compile on a
00344     // platform where it bombs.
00345     return ((T*) this)[n];
00346 }


Member Data Documentation

template<class T>
T Point3< T >::x
 

Definition at line 62 of file vecmath.h.

Referenced by addStars(), childIndex(), SampledOrbit::computePosition(), JPLEphOrbit::computePosition(), AxisAlignedBox::contains(), Convert3DSMesh(), StarDatabase::createStar(), Point3< T >::distanceFromOrigin(), Point3< T >::distanceFromOriginSquared(), Point3< T >::distanceTo(), Point3< T >::distanceToSquared(), dsoStraddlesNodesPredicate(), DumpOldStarDatabase(), AxisAlignedBox::empty(), AxisAlignedBox::getCenter(), Universe::getNearestSolarSystem(), Universe::getNearStars(), Star::getPosition(), Selection::getPosition(), Observer::getSelectionLongLat(), AxisAlignedBox::include(), InitializeForms(), Renderer::labelStars(), StarDatabase::loadOldFormatBinary(), Point3< T >::operator *=(), operator!=(), PointTexCoordComparator::operator()(), PointComparator::operator()(), SolarSystemPredicate::operator()(), BrighterStarPredicate::operator()(), CloserStarPredicate::operator()(), Point3< T >::operator+=(), Point3< T >::operator-=(), operator==(), Universe::pickDeepSkyObject(), Universe::pickStar(), DSOPicker::process(), StarPicker::process(), DSORenderer::process(), StarRenderer::process(), Renderer::render(), Renderer::renderBodyAsParticle(), Renderer::renderCometTail(), Renderer::renderDeepSkyObjects(), renderEclipseShadows(), Renderer::renderEllipsoidAtmosphere(), Renderer::renderObject(), Renderer::renderOrbit(), Renderer::renderOrbits(), LODSphereMesh::renderPatches(), Renderer::renderPlanetarySystem(), Renderer::renderStars(), CelestialBrowser::slotRefresh(), DynamicOctree< OBJ, PREC >::split(), starOrbitStraddlesNodes(), starOrbitStraddlesNodesPredicate(), FrameOfReference::toUniversal(), WriteFavoritesList(), and WriteStarDatabase().

template<class T>
T Point3< T >::y
 

Definition at line 62 of file vecmath.h.

Referenced by addStars(), childIndex(), SampledOrbit::computePosition(), JPLEphOrbit::computePosition(), AxisAlignedBox::contains(), Convert3DSMesh(), StarDatabase::createStar(), Point3< T >::distanceFromOrigin(), Point3< T >::distanceFromOriginSquared(), Point3< T >::distanceTo(), Point3< T >::distanceToSquared(), dsoStraddlesNodesPredicate(), DumpOldStarDatabase(), AxisAlignedBox::empty(), AxisAlignedBox::getCenter(), Universe::getNearestSolarSystem(), Universe::getNearStars(), Star::getPosition(), Selection::getPosition(), Observer::getSelectionLongLat(), AxisAlignedBox::include(), InitializeForms(), Renderer::labelStars(), StarDatabase::loadOldFormatBinary(), Point3< T >::operator *=(), operator!=(), PointTexCoordComparator::operator()(), PointComparator::operator()(), SolarSystemPredicate::operator()(), BrighterStarPredicate::operator()(), CloserStarPredicate::operator()(), Point3< T >::operator+=(), Point3< T >::operator-=(), operator==(), Universe::pickDeepSkyObject(), Universe::pickStar(), DSOPicker::process(), StarPicker::process(), DSORenderer::process(), StarRenderer::process(), Renderer::render(), Renderer::renderBodyAsParticle(), Renderer::renderCometTail(), Renderer::renderDeepSkyObjects(), renderEclipseShadows(), Renderer::renderEllipsoidAtmosphere(), Renderer::renderObject(), Renderer::renderOrbit(), Renderer::renderOrbits(), LODSphereMesh::renderPatches(), Renderer::renderPlanetarySystem(), Renderer::renderStars(), CelestialBrowser::slotRefresh(), DynamicOctree< OBJ, PREC >::split(), starOrbitStraddlesNodes(), starOrbitStraddlesNodesPredicate(), FrameOfReference::toUniversal(), WriteFavoritesList(), and WriteStarDatabase().

template<class T>
T Point3< T >::z
 

Definition at line 62 of file vecmath.h.

Referenced by addStars(), childIndex(), SampledOrbit::computePosition(), JPLEphOrbit::computePosition(), AxisAlignedBox::contains(), Convert3DSMesh(), StarDatabase::createStar(), Point3< T >::distanceFromOrigin(), Point3< T >::distanceFromOriginSquared(), Point3< T >::distanceTo(), Point3< T >::distanceToSquared(), dsoStraddlesNodesPredicate(), DumpOldStarDatabase(), AxisAlignedBox::empty(), AxisAlignedBox::getCenter(), Universe::getNearestSolarSystem(), Universe::getNearStars(), Star::getPosition(), Selection::getPosition(), Observer::getSelectionLongLat(), AxisAlignedBox::include(), InitializeForms(), Renderer::labelStars(), StarDatabase::loadOldFormatBinary(), Point3< T >::operator *=(), operator!=(), PointTexCoordComparator::operator()(), PointComparator::operator()(), SolarSystemPredicate::operator()(), BrighterStarPredicate::operator()(), CloserStarPredicate::operator()(), Point3< T >::operator+=(), Point3< T >::operator-=(), operator==(), Universe::pickDeepSkyObject(), Universe::pickStar(), DSOPicker::process(), StarPicker::process(), DSORenderer::process(), StarRenderer::process(), Renderer::render(), Renderer::renderBodyAsParticle(), Renderer::renderCometTail(), Renderer::renderDeepSkyObjects(), renderEclipseShadows(), Renderer::renderEllipsoidAtmosphere(), Renderer::renderObject(), Renderer::renderOrbit(), Renderer::renderOrbits(), LODSphereMesh::renderPatches(), Renderer::renderPlanetarySystem(), Renderer::renderStars(), CelestialBrowser::slotRefresh(), DynamicOctree< OBJ, PREC >::split(), starOrbitStraddlesNodes(), starOrbitStraddlesNodesPredicate(), FrameOfReference::toUniversal(), WriteFavoritesList(), and WriteStarDatabase().


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:31 2006 for Celestia by  doxygen 1.4.1