Quake 4 integrated with DoomRTX

This commit is contained in:
Justin Marshall
2026-05-09 22:10:40 -07:00
parent 8c4a087aa9
commit d37f87e493
436 changed files with 277587 additions and 10254 deletions
+65
View File
@@ -76,6 +76,23 @@ public:
idBounds & IntersectSelf( const idBounds &a ); // intersect this bounds with the given bounds
idBounds Expand( const float d ) const; // return bounds expanded in all directions with the given value
idBounds & ExpandSelf( const float d ); // expand bounds in all directions with the given value
#ifdef QUAKE4
// RAVEN BEGIN
// jscott: for BSE
idBounds & ExpandSelf( const idVec3 &d ); // expand bounds in all directions by the given vector
float ShortestDistance( const idVec3 &point ) const;
bool Contains( const idBounds &a ) const;
// jscott: for material types
int GetLargestAxis( void ) const;
// abahr: can be used to get width of bounds
idVec3 FindEdgePoint( const idVec3 &dir ) const;
idVec3 FindEdgePoint( const idVec3 &start, const idVec3 &dir ) const;
idVec3 FindVectorToEdge( const idVec3 &dir ) const;
idVec3 FindVectorToEdge( const idVec3 &start, const idVec3 &dir ) const;
// RAVEN END
#endif
idBounds Translate( const idVec3 &translation ) const; // return translated bounds
idBounds & TranslateSelf( const idVec3 &translation ); // translate this bounds
idBounds Rotate( const idMat3 &rotation ) const; // return rotated bounds
@@ -107,7 +124,11 @@ public:
void AxisProjection( const idVec3 &dir, float &min, float &max ) const;
void AxisProjection( const idVec3 &origin, const idMat3 &axis, const idVec3 &dir, float &min, float &max ) const;
#ifdef QUAKE4
public:
#else
private:
#endif
idVec3 b[2];
};
@@ -331,6 +352,50 @@ ID_INLINE idBounds &idBounds::ExpandSelf( const float d ) {
return *this;
}
#ifdef QUAKE4
// RAVEN BEGIN
// jscott: for BSE
ID_INLINE idBounds &idBounds::ExpandSelf( const idVec3 &d ) {
b[0][0] -= d[0];
b[0][1] -= d[1];
b[0][2] -= d[2];
b[1][0] += d[0];
b[1][1] += d[1];
b[1][2] += d[2];
return *this;
}
ID_INLINE bool idBounds::Contains( const idBounds &a ) const {
int i;
for ( i = 0; i < 3; i++ ) {
if ( a[1][i] > b[1][i] ) {
return false;
}
if ( a[0][i] < b[0][i] ) {
return false;
}
}
return true;
}
// jscott: for material types
ID_INLINE int idBounds::GetLargestAxis( void ) const {
idVec3 work = b[1] - b[0];
int axis = 0;
if ( work[1] > work[0] ) {
axis = 1;
}
if ( work[2] > work[axis] ) {
axis = 2;
}
return axis;
}
// RAVEN END
#endif
ID_INLINE idBounds idBounds::Translate( const idVec3 &translation ) const {
return idBounds( b[0] + translation, b[1] + translation );
}