Archival snapshot of the Virtual World Entertainment Tesla cockpit software, 1994-1996: MUNGA engine and L4 pod layer source (Borland C++ 5.0), BT/RP game code, and game content (models, audio, maps, gauges, Division renderer data). Includes third-party libraries: Division dVS/DPL graphics, HMI SOS audio, WATTCP networking. Files are preserved byte-for-byte (.gitattributes disables all line-ending conversion). README.md documents the layout, target hardware, and toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
//=======================================================================//
|
|
// File: sphere.hpp //
|
|
// Project: Architecture //
|
|
// Author: J.M. Albertson //
|
|
//-----------------------------------------------------------------------//
|
|
// Copyright (C) 1994-1995, Virtual World Entertainments, //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//=======================================================================//
|
|
|
|
#if !defined(SPHERE_HPP)
|
|
# define SPHERE_HPP
|
|
|
|
# if !defined(POINT3D_HPP)
|
|
# include <point3d.hpp>
|
|
# endif
|
|
|
|
class Plane;
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sphere ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class Sphere SIGNATURED
|
|
{
|
|
public:
|
|
Point3D
|
|
center;
|
|
Scalar
|
|
radius;
|
|
|
|
Sphere()
|
|
{}
|
|
Sphere(
|
|
const Point3D &A_Point,
|
|
Scalar Radius
|
|
):
|
|
center(A_Point),
|
|
radius(Radius)
|
|
{}
|
|
Sphere(
|
|
Scalar X,
|
|
Scalar Y,
|
|
Scalar Z,
|
|
Scalar Radius
|
|
):
|
|
center(X,Y,Z),
|
|
radius(Radius)
|
|
{}
|
|
|
|
//
|
|
// Intersection functions
|
|
//
|
|
Logical
|
|
Contains(const Point3D &point) const;
|
|
Logical
|
|
Intersects(const Sphere &sphere) const;
|
|
Logical
|
|
Intersects(const Plane &plane) const;
|
|
|
|
friend ostream&
|
|
operator<<(ostream& Stream, const Sphere &A_Sphere);
|
|
};
|
|
|
|
#endif
|