-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Darius
committed
Mar 15, 2018
0 parents
commit b4ea730
Showing
42 changed files
with
7,496 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/* | ||
* OPCODE - Optimized Collision Detection | ||
* Copyright (C) 2001 Pierre Terdiman | ||
* Homepage: http://www.codercorner.com/Opcode.htm | ||
*/ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* Contains AABB-related code. | ||
* \file OPC_AABB.cpp | ||
* \author Pierre Terdiman | ||
* \date January, 29, 2000 | ||
*/ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* AABB class. | ||
* \class AABB | ||
* \author Pierre Terdiman | ||
* \version 1.0 | ||
*/ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// Precompiled Header | ||
#include "Stdafx.h" | ||
|
||
using namespace Opcode; | ||
|
||
#ifndef __MESHMERIZER_H__ | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
/** | ||
* A method to compute the sum of two AABBs. | ||
* \param aabb [in] the other AABB | ||
* \return Self-Reference | ||
*/ | ||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
AABB& AABB::Add(const AABB& aabb) | ||
{ | ||
// Compute new min & max values | ||
Point Min; GetMin(Min); | ||
Point Tmp; aabb.GetMin(Tmp); | ||
Min.Min(Tmp); | ||
|
||
Point Max; GetMax(Max); | ||
aabb.GetMax(Tmp); | ||
Max.Max(Tmp); | ||
|
||
// Update this | ||
SetMinMax(Min, Max); | ||
return *this; | ||
} | ||
|
||
#endif // __MESHMERIZER_H__ |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.