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>
71 lines
1.6 KiB
C++
71 lines
1.6 KiB
C++
//=======================================================================//
|
|
// File: line.hpp //
|
|
// Project: Architecture //
|
|
// Author: J.M. Albertson //
|
|
//-----------------------------------------------------------------------//
|
|
// Copyright (C) 1994-1995, Virtual World Entertainments, //
|
|
// PROPRIETARY AND CONFIDENTIAL //
|
|
//=======================================================================//
|
|
|
|
#if !defined(LINE_HPP)
|
|
# define LINE_HPP
|
|
|
|
# if !defined(RAY_HPP)
|
|
# include <ray.hpp>
|
|
# endif
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Line3D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class Line:
|
|
public Ray
|
|
{
|
|
public:
|
|
Scalar
|
|
length;
|
|
|
|
Line() {}
|
|
Line(
|
|
const Ray &ray,
|
|
Scalar length
|
|
):
|
|
Ray(ray),
|
|
length(length)
|
|
{}
|
|
Line(
|
|
const Point3D &start,
|
|
const UnitVector &direction,
|
|
Scalar length
|
|
):
|
|
Ray(start,direction),
|
|
length(length)
|
|
{}
|
|
|
|
void
|
|
FindEnd(Point3D *result)
|
|
{Check(this); Check_Pointer(result); Ray::Project(length, result);}
|
|
|
|
//
|
|
// Assignment operators
|
|
//
|
|
Line&
|
|
operator=(const Vector3D &vector);
|
|
Line&
|
|
operator=(const Point3D &point);
|
|
//
|
|
// Ray intersection functions
|
|
//
|
|
Scalar
|
|
DistanceTo(
|
|
const Plane &plane,
|
|
Scalar *product
|
|
) const;
|
|
Scalar
|
|
DistanceTo(
|
|
const Sphere &sphere,
|
|
Scalar *penetration
|
|
) const;
|
|
|
|
};
|
|
|
|
#endif
|