True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

CollisionConstants.h

00001 //---------------------------------------------------------------------------------
00002 // File Name: CollisionConstants.h
00003 // Description: Internal physics file
00004 //
00005 // Copyright (C) 2004 - 2006 True Axis Pty Ltd, Australia. 
00006 // All Rights Reserved.
00007 //
00008 // History:
00009 //      Created File.
00010 //---------------------------------------------------------------------------------
00011 
00012 #ifndef TA_COLLISIONCONSTANTS_H
00013 #define TA_COLLISIONCONSTANTS_H
00014 
00015 #ifndef TA_VECTOR_H
00016 #include "../Common/Vector.h"
00017 #endif // TA_VECTOR_H
00018 
00019 namespace TA
00020 {
00021 
00022 const int k_nMaxNumVerticesInPolygon = 31;
00023 const float k_fBoundingBoxError = 0.01f;
00024 
00025 extern float g_fSolverScale;
00026 
00027 namespace CollisionConstants
00028 {
00029 
00030 //---------------------------------------------------------------------------------
00031 //---------------------------------------------------------------------------------
00032 inline bool IsZero(const Vec3& v3A)
00033 {
00034     return v3A.GetMagnitude() < 0.01f * 0.01f;
00035 }
00036 
00037 //---------------------------------------------------------------------------------
00038 //---------------------------------------------------------------------------------
00039 inline bool PointsAreCoincident(const Vec3& v3A, const Vec3& v3B)
00040 {
00041     return IsZero(v3B - v3A);
00042 }
00043 
00044 }
00045 
00046 }
00047 
00048 #endif // TA_COLLISIONCONSTANTS_H


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.