00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GE_EXTBOX_H
00023 #define GE_EXTBOX_H
00024
00025 #include "basetype.h"
00026 #include "vec3d.h"
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032 typedef struct geExtBox
00033 {
00034 geVec3d Min;
00035 geVec3d Max;
00036 } geExtBox;
00037
00038
00039 void GENESISCC geExtBox_Set ( geExtBox *B,
00040 geFloat X1, geFloat Y1, geFloat Z1,
00041 geFloat X2, geFloat Y2, geFloat Z2 );
00042
00043
00044 geBoolean GENESISCC geExtBox_IsValid( const geExtBox *B );
00045
00046
00047 void GENESISCC geExtBox_SetToPoint ( geExtBox *B, const geVec3d *Point );
00048
00049
00050 void GENESISCC geExtBox_ExtendToEnclose( geExtBox *B, const geVec3d *Point );
00051
00052
00053
00054
00055
00056
00057
00058 geBoolean GENESISCC geExtBox_Intersection ( const geExtBox *B1, const geExtBox *B2, geExtBox *Result );
00059
00060
00061 void GENESISCC geExtBox_Union ( const geExtBox *B1, const geExtBox *B2, geExtBox *Result );
00062
00063 geBoolean GENESISCC geExtBox_ContainsPoint ( const geExtBox *B, const geVec3d *Point );
00064
00065 void GENESISCC geExtBox_GetTranslation ( const geExtBox *B, geVec3d *pCenter );
00066 void GENESISCC geExtBox_SetTranslation ( geExtBox *B, const geVec3d *pCenter );
00067 void GENESISCC geExtBox_Translate ( geExtBox *B, geFloat DX, geFloat DY, geFloat DZ );
00068
00069 void GENESISCC geExtBox_GetScaling ( const geExtBox *B, geVec3d *pScale );
00070 void GENESISCC geExtBox_SetScaling ( geExtBox *B, const geVec3d *pScale );
00071 void GENESISCC geExtBox_Scale ( geExtBox *B, geFloat DX, geFloat DY,geFloat DZ );
00072
00073
00074 void GENESISCC geExtBox_LinearSweep( const geExtBox *BoxToSweep,
00075 const geVec3d *StartPoint,
00076 const geVec3d *EndPoint,
00077 geExtBox *EnclosingBox );
00078
00079
00080
00081
00082
00083
00084 geBoolean GENESISCC geExtBox_RayCollision( const geExtBox *B, const geVec3d *Start, const geVec3d *End,
00085 geFloat *T, geVec3d *Normal );
00086
00087 #ifdef __cplusplus
00088 }
00089 #endif
00090
00091
00092
00093 #endif
00094