Files
CydandClaude Opus 4.8 4abbf8879f Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet',
built on the MUNGA engine and its L4 (Win32/DirectX) platform layer:

- MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend
- RP / RP_L4: Red Planet game logic and Win32 application
- DivLoader, Setup1: asset loader and installer project
- lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies

Removed stale Subversion metadata and added .gitignore/.gitattributes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:59:51 -05:00

60 lines
1.4 KiB
C++

#pragma once
#include "scalar.h"
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 std::ostream& operator<<(std::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);