Files
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
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>
2026-07-02 13:21:58 -05:00

111 lines
2.8 KiB
C++

//===========================================================================//
// File: extntbox.hh //
// Project: MUNGA Brick: Math Library //
// Contents: Interface specification of bounding box class //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 01/07/95 JMA Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1994-1995 Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(EXTNTBOX_HPP)
# define EXTNTBOX_HPP
# if !defined(SCALAR_HPP)
# include <scalar.hpp>
# endif
class Vector3D;
class NotationFile;
//~~~~~~~~~~~~~~~~~~~~~~~~~ ExtentBox ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class ExtentBox
{
public:
#if defined(USE_SIGNATURE)
friend int
Is_Signature_Bad(const volatile ExtentBox *);
#endif
Scalar
minX,
maxX,
minY,
maxY,
minZ,
maxZ;
ExtentBox() {}
ExtentBox(
const Vector3D &min,
const Vector3D &max
);
ExtentBox(const ExtentBox &box);
const Scalar&
operator[](int index) const
{Check(this); return (&minX)[index];}
Scalar&
operator[](int index)
{Check(this); return (&minX)[index];}
ExtentBox&
Intersect(
const ExtentBox &box_1,
const ExtentBox &box_2
);
Vector3D*
Constrain(Vector3D *point) const;
Logical
Contains(const Vector3D &point) const;
Logical
Contains(const ExtentBox &box) const;
Logical
Intersects(const ExtentBox &box) const;
Logical
TestInstance() const;
static Logical
TestClass();
friend ostream&
operator<<(
ostream& stream,
const ExtentBox& e
);
};
//~~~~~~~~~~~~~~~~~~~~~~~~~ ExtentBox functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void
Convert_From_Ascii(
const char *str,
ExtentBox *extent_box
);
inline MemoryStream&
MemoryStream_Read(
MemoryStream* stream,
ExtentBox *output
)
{return stream->ReadBytes(output, sizeof(*output));}
inline MemoryStream&
MemoryStream_Write(
MemoryStream* stream,
const ExtentBox *input
)
{return stream->WriteBytes(input, sizeof(*input));}
ExtentBox *
MakeExistanceBoxStream(
NotationFile *notation_file,
int *size
);
#endif