Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

VEC3D.H

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  VEC3D.H                                                                             */
00003 /*                                                                                      */
00004 /*  Author:                                                                             */
00005 /*  Description: 3D Vector interface                                                    */
00006 /*                                                                                      */
00007 /*  The contents of this file are subject to the Genesis3D Public License               */
00008 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00009 /*  compliance with the License. You may obtain a copy of the License at                */
00010 /*  http://www.genesis3d.com                                                            */
00011 /*                                                                                      */
00012 /*  Software distributed under the License is distributed on an "AS IS"                 */
00013 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00014 /*  the License for the specific language governing rights and limitations              */
00015 /*  under the License.                                                                  */
00016 /*                                                                                      */
00017 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00018 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00019 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00020 /*                                                                                      */
00021 /****************************************************************************************/
00022 #ifndef GE_VEC3D_H
00023 #define GE_VEC3D_H
00024 
00025 #include "basetype.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 typedef struct
00032 {
00033         geFloat X, Y, Z;
00034 } geVec3d;
00035 
00036 #ifndef NDEBUG
00037 GENESISAPI      geFloat GENESISCC   geVec3d_GetElement(geVec3d *V, int Index);
00038 #else
00039         #define geVec3d_GetElement(Vector,Index)  (* ((&((Vector)->X)) +  (Index) ))
00040 #endif
00041 
00042 GENESISAPI void GENESISCC               geVec3d_Set(geVec3d *V, geFloat X, geFloat Y, geFloat Z);
00043 GENESISAPI void GENESISCC               geVec3d_Get(const geVec3d *V, geFloat *X, geFloat *Y, geFloat *Z);
00044 
00045 GENESISAPI geFloat GENESISCC    geVec3d_DotProduct(const geVec3d *V1, const geVec3d *V2);
00046 GENESISAPI void GENESISCC               geVec3d_CrossProduct(const geVec3d *V1, const geVec3d *V2, geVec3d *VResult);
00047 GENESISAPI geBoolean GENESISCC  geVec3d_Compare(const geVec3d *V1, const geVec3d *V2,geFloat tolarance);
00048 GENESISAPI geFloat GENESISCC    geVec3d_Normalize(geVec3d *V1);
00049 GENESISAPI geBoolean GENESISCC  geVec3d_IsNormalized(const geVec3d *V);
00050 GENESISAPI void GENESISCC               geVec3d_Scale(const geVec3d *VSrc, geFloat Scale, geVec3d *VDst);
00051 GENESISAPI geFloat GENESISCC    geVec3d_Length(const geVec3d *V1); 
00052 GENESISAPI geFloat GENESISCC    geVec3d_LengthSquared(const geVec3d *V1);
00053 GENESISAPI void GENESISCC               geVec3d_Subtract(const geVec3d *V1, const geVec3d *V2, geVec3d *V1MinusV2);
00054 GENESISAPI void GENESISCC               geVec3d_Add(const geVec3d *V1, const geVec3d *V2,  geVec3d *VSum);
00055 GENESISAPI void GENESISCC               geVec3d_Copy(const geVec3d *Vsrc, geVec3d *Vdst);
00056 GENESISAPI void GENESISCC               geVec3d_Clear(geVec3d *V);
00057 GENESISAPI void GENESISCC               geVec3d_Inverse(geVec3d *V);
00058 GENESISAPI void GENESISCC               geVec3d_MA(geVec3d *V1, geFloat Scale, const geVec3d *V2, geVec3d *V1PlusV2Scaled);
00059 GENESISAPI void GENESISCC               geVec3d_AddScaled(const geVec3d *V1, const geVec3d *V2, geFloat Scale, geVec3d *V1PlusV2Scaled);
00060 
00061 GENESISAPI geFloat GENESISCC            geVec3d_DistanceBetween(const geVec3d *V1, const geVec3d *V2);  // returns length of V1-V2      
00062 
00063 GENESISAPI geBoolean GENESISCC geVec3d_IsValid(const geVec3d *V);
00064 
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068 
00069 #endif
00070 

Generated on Tue Sep 30 12:36:36 2003 for GTestAndEngine by doxygen 1.3.2