Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
CastResultStruct.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__CASTRESULTSTRUCT_H
13#define TT_INCLUDE__CASTRESULTSTRUCT_H
14#include "Vector3.h"
15
16struct CastResultStruct
17{
18 CastResultStruct(void) { Reset(); }
19 void Reset(void) { StartBad = false; Fraction = 1.0f; Normal.Set(0,0,0); SurfaceType = 0; ComputeContactPoint = false; ContactPoint.Set(0,0,0); }
20 bool StartBad; // was the inital configuration interpenetrating something?
21 float Fraction; // fraction of the move up until collision
22 Vector3 Normal; // surface normal at the collision point
23 uint32 SurfaceType; // surface type of polygon at collision point (see W3D_SURFACE_TYPES in w3d_file.h)
24 bool ComputeContactPoint; // This signals the collision code to compute the point of collision
25 Vector3 ContactPoint; // This will be set to the point of collision if ComputeContactPoint is true
26}; // 40
27
28#endif