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

193 lines
4.2 KiB
C++

//===========================================================================//
// File: point.hh //
// Project: MUNGA Brick: Math Library //
// Contents: Interface specification of the point class //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 11/19/94 JMA Initial coding. //
//---------------------------------------------------------------------------//
// Copyright (C) 1994-1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(POINT_HPP)
# define POINT_HPP
# if !defined(VECTOR3D_HPP)
# include <vector3d.hpp>
# endif
class Origin;
class Vector4D;
class AffineMatrix;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Point3D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class Point3D:
public Vector3D
{
public:
static const Point3D
Identity;
//
// Constructors
//
Point3D()
{}
Point3D(
Scalar x,
Scalar y,
Scalar z
):
Vector3D(x,y,z)
{}
//
// Assignment operators
//
Point3D&
operator=(const Vector3D& v)
{Vector3D::operator=(v); return *this;}
Point3D&
operator=(const Vector4D& v);
Point3D&
operator=(const Origin &p);
Point3D&
operator=(const AffineMatrix &matrix);
//
// Math operators
//
Point3D&
Negate(const Vector3D &v)
{Vector3D::Negate(v); return *this;}
Point3D&
Add(
const Vector3D& v1,
const Vector3D& v2
)
{Vector3D::Add(v1,v2); return *this;}
Point3D&
operator+=(const Vector3D& v)
{return Add(*this,v);}
Point3D&
Subtract(
const Point3D& p,
const Vector3D& v
)
{Vector3D::Subtract(p,v); return *this;}
Point3D&
operator-=(const Vector3D& v)
{return Subtract(*this,v);}
Scalar
operator*(const Vector3D& v) const
{return Vector3D::operator*(v);}
Point3D&
Multiply(
const Point3D& p,
Scalar scale
)
{Vector3D::Multiply(p,scale); return *this;}
Point3D&
operator*=(Scalar value)
{return Multiply(*this,value);}
Point3D&
Multiply(
const Point3D& p,
const Vector3D& v
)
{Vector3D::Multiply(p,v); return *this;}
Point3D&
operator*=(const Vector3D &v)
{return Multiply(*this,v);}
Point3D&
Divide(
const Vector3D& v,
Scalar scale
)
{Vector3D::Divide(v,scale); return *this;}
Point3D&
operator/=(Scalar value)
{return Divide(*this,value);}
Point3D&
Divide(
const Vector3D& v1,
const Vector3D& v2
)
{Vector3D::Divide(v1,v2); return *this;}
Point3D&
operator/=(const Vector3D &v)
{return Divide(*this,v);}
//
// Transforms
//
Point3D&
Multiply(
const Vector3D &v,
const AffineMatrix &m
)
{Vector3D::Multiply(v,m); return *this;}
Point3D&
Multiply(
const Point3D &p,
const AffineMatrix &m
);
Point3D&
operator*=(const AffineMatrix &m)
{Point3D src(*this); return Multiply(src,m);}
Point3D&
MultiplyByInverse(
const Vector3D &v,
const LinearMatrix &m
)
{Vector3D::MultiplyByInverse(v,m); return *this;}
Point3D&
MultiplyByInverse(
const Point3D &p,
const LinearMatrix &m
);
//
// Miscellaneous functions
//
Point3D&
Combine(
const Vector3D& v1,
Scalar t1,
const Vector3D& v2,
Scalar t2
)
{Vector3D::Combine(v1,t1,v2,t2); return *this;}
//
// Template support functions
//
Point3D&
Lerp(
const Vector3D& v1,
const Vector3D& v2,
Scalar t
)
{Vector3D::Lerp(v1,v2,t); return *this;}
static Logical
TestClass();
};
#endif
#if !defined(AFFNMTRX_HPP)
# include <affnmtrx.hpp>
#endif