Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
coltype.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/coltype.h $*
26 * *
27 * Original Author:: Greg Hjelstrom *
28 * *
29 * Author : Kenny Mitchell *
30 * *
31 * $Modtime:: 07/01/02 12:45p $*
32 * *
33 * $Revision:: 2 $*
34 * *
35 * 07/01/02 KM Coltype enum change to avoid MAX conflicts *
36 *---------------------------------------------------------------------------------------------*
37 * Functions: *
38 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
39
40
41#if defined(_MSC_VER)
42#pragma once
43#endif
44
45
46#ifndef COLTYPE_H
47#define COLTYPE_H
48
49
51//
52// Collision 'Types'
53//
54// This enum defines the collision type bit-field that is used in render object
55// collision detection.
56//
57// The collision type field in a collision or intersection test is used as a
58// low-level collision mask. It will be 'AND'ed with the collision type of
59// the render object and will ignore the object unless the result is
60// non-zero. In Commando, we use this to implement separate collision
61// representations for "physical" collisions versus "projectile"
62// collisions. I.e. we use a very simple mesh for the character's
63// physical collision and a more complex set of meshes for checking whether
64// a bullet hits a person. This masking system is not meant to be a general
65// "collision grouping" system. You should use a higher level system for doing
66// things like making bullets ignore each other, etc.
67//
68// One more wrinkle to the system: The collision type in the render obj
69// will always have the LSB set (COLL_TYPE_ALL) so that you can always
70// do queries against every piece of geometry in a render obj if desired.
71//
73enum
74{
75 COLL_TYPE_ALL = 0x01, // perform this test against *EVERYTHING*
76 COLL_TYPE_0 = 0x02, // perform this test against type 0 collision objects
77 COLL_TYPE_1 = 0x04, // perform this test against type 1 collision objects
83
84 COLL_TYPE_PHYSICAL = COLL_TYPE_0, // physics collisions
85 COLL_TYPE_PROJECTILE = COLL_TYPE_1, // projectile collisions
86 COLL_TYPE_VIS = COLL_TYPE_2, // "vis node" detection
87 COLL_TYPE_CAMERA = COLL_TYPE_3, // camera collision (99% should match physical setting)
88 COLL_TYPE_VEHICLE = COLL_TYPE_4, // vehicles will collide with physical and this.
89};
90
91
92
93#endif
94
@ COLL_TYPE_2
Definition coltype.h:78
@ COLL_TYPE_ALL
Definition coltype.h:75
@ COLL_TYPE_1
Definition coltype.h:77
@ COLL_TYPE_CAMERA
Definition coltype.h:87
@ COLL_TYPE_5
Definition coltype.h:81
@ COLL_TYPE_PROJECTILE
Definition coltype.h:85
@ COLL_TYPE_PHYSICAL
Definition coltype.h:84
@ COLL_TYPE_4
Definition coltype.h:80
@ COLL_TYPE_6
Definition coltype.h:82
@ COLL_TYPE_0
Definition coltype.h:76
@ COLL_TYPE_3
Definition coltype.h:79
@ COLL_TYPE_VEHICLE
Definition coltype.h:88
@ COLL_TYPE_VIS
Definition coltype.h:86