objectTypes.h
Engine/source/T3D/objectTypes.h
Public Enumerations
SceneObjectTypeMasks { STATIC_COLLISION_TYPEMASK = (StaticShapeObjectType | EntityObjectType) DAMAGEABLE_TYPEMASK = ( PlayerObjectType | EntityObjectType | VehicleObjectType ) SHADOW_TYPEMASK = ( StaticShapeObjectType | DynamicShapeObjectType | EntityObjectType) CULLING_INCLUDE_TYPEMASK = ( GameBaseObjectType | StaticShapeObjectType | DynamicShapeObjectType | EntityObjectType | ZoneObjectType | LightObjectType ) CULLING_EXCLUDE_TYPEMASK = ( TerrainObjectType | EnvironmentObjectType ) DEFAULT_RENDER_TYPEMASK = ( EnvironmentObjectType | TerrainObjectType | WaterObjectType | StaticShapeObjectType | DynamicShapeObjectType | LightObjectType | GameBaseObjectType | TriggerObjectType | EntityObjectType) EDITOR_RENDER_TYPEMASK = U32( -1 ) OUTDOOR_OBJECT_TYPEMASK = ( TerrainObjectType | EnvironmentObjectType ) }
SceneObjectTypes { DefaultObjectType = 0 StaticObjectType = BIT( 0 ) EnvironmentObjectType = BIT( 1 ) TerrainObjectType = BIT( 2 ) WaterObjectType = BIT( 3 ) TriggerObjectType = BIT( 4 ) MarkerObjectType = BIT( 5 ) LightObjectType = BIT( 6 ) ZoneObjectType = BIT( 7 ) StaticShapeObjectType = BIT( 8 ) DynamicShapeObjectType = BIT( 9 ) GameBaseObjectType = BIT( 10 ) GameBaseHiFiObjectType = BIT( 11 ) ShapeBaseObjectType = BIT( 12 ) CameraObjectType = BIT( 13 ) PlayerObjectType = BIT( 14 ) ItemObjectType = BIT( 15 ) VehicleObjectType = BIT( 16 ) VehicleBlockerObjectType = BIT( 17 ) ProjectileObjectType = BIT( 18 ) ExplosionObjectType = BIT( 19 ) CorpseObjectType = BIT( 20 ) DebrisObjectType = BIT( 21 ) PhysicalZoneObjectType = BIT( 22 ) EntityObjectType = BIT(23) }
Types used for SceneObject type masks (SceneObject::mTypeMask)
Detailed Description
Public Enumerations
SceneObjectTypeMasks
Enumerator
- STATIC_COLLISION_TYPEMASK = (StaticShapeObjectType | EntityObjectType)
- DAMAGEABLE_TYPEMASK = ( PlayerObjectType | EntityObjectType | VehicleObjectType )
- SHADOW_TYPEMASK = ( StaticShapeObjectType | DynamicShapeObjectType | EntityObjectType)
Typemask for objects that should be rendered into shadow passes.
These should be all objects that are either meant to receive or cast shadows or both.
- CULLING_INCLUDE_TYPEMASK = ( GameBaseObjectType | StaticShapeObjectType | DynamicShapeObjectType | EntityObjectType | ZoneObjectType | LightObjectType )
Typemask for objects that should be subjected to more fine-grained culling tests.
Anything that is trivial rendering stuff or doesn't render except when in the editor should be excluded here.
Also, objects that do their own culling internally (terrains, forests, etc.) should be excluded.
- CULLING_EXCLUDE_TYPEMASK = ( TerrainObjectType | EnvironmentObjectType )
Mask for objects that should be specifically excluded from zone culling.
- DEFAULT_RENDER_TYPEMASK = ( EnvironmentObjectType | TerrainObjectType | WaterObjectType | StaticShapeObjectType | DynamicShapeObjectType | LightObjectType | GameBaseObjectType | TriggerObjectType | EntityObjectType)
Default object type mask to use for render queries.
- EDITOR_RENDER_TYPEMASK = U32( -1 )
Typemask to use for rendering when inside the editor.
- OUTDOOR_OBJECT_TYPEMASK = ( TerrainObjectType | EnvironmentObjectType )
All objects that fit this type mask will be exclusively assigned to the outdoor (root) zone and not be assigned to individual interior objects.
note:
Terrains have their own means for rendering inside interior zones.
SceneObjectTypes
Enumerator
- DefaultObjectType = 0
Default value for type masks.
- StaticObjectType = BIT( 0 )
Any kind of SceneObject that is not supposed to change transforms except during editing (or not at all).
- EnvironmentObjectType = BIT( 1 )
Environment objects such as clouds, skies, forests, etc.
- TerrainObjectType = BIT( 2 )
A terrain object.
see:- WaterObjectType = BIT( 3 )
An object defining a water volume.
see:- TriggerObjectType = BIT( 4 )
An object defining an invisible trigger volume.
see:- MarkerObjectType = BIT( 5 )
An object defining an invisible marker.
see:- LightObjectType = BIT( 6 )
A light emitter.
see:- ZoneObjectType = BIT( 7 )
An object that manages zones.
This is automatically set by SceneZoneSpaceManager when a SceneZoneSpace registers zones. Should not be manually set.
see:- StaticShapeObjectType = BIT( 8 )
Any object that defines one or more solid, renderable static geometries that should be included in collision and raycasts.
Use this mask to find objects that are part of the static level geometry.
note:
If you set this, you will also want to set StaticObjectType.
- DynamicShapeObjectType = BIT( 9 )
Any object that defines one or more solid, renderable dynamic geometries that should be included in collision and raycasts.
Use this mask to find objects that are part of the dynamic game geometry.
- GameBaseObjectType = BIT( 10 )
Any GameBase-derived object.
see:- GameBaseHiFiObjectType = BIT( 11 )
An object that uses hifi networking.
- ShapeBaseObjectType = BIT( 12 )
Any ShapeBase-derived object.
see:- CameraObjectType = BIT( 13 )
A camera object.
see:- PlayerObjectType = BIT( 14 )
A human or AI player object.
see:- ItemObjectType = BIT( 15 )
An item pickup.
see:- VehicleObjectType = BIT( 16 )
A vehicle.
see:- VehicleBlockerObjectType = BIT( 17 )
An object that blocks vehicles.
see:- ProjectileObjectType = BIT( 18 )
A weapon projectile.
see:- ExplosionObjectType = BIT( 19 )
An explosion object.
see:- CorpseObjectType = BIT( 20 )
A dead player.
This is dynamically set and unset.
see:- DebrisObjectType = BIT( 21 )
A debris object.
see:- PhysicalZoneObjectType = BIT( 22 )
A volume that asserts forces on player objects.
see:- EntityObjectType = BIT(23)
Types used for SceneObject type masks (SceneObject::mTypeMask)
note:If a new object type is added, don't forget to add it to RegisterGameFunctions().
1 2//----------------------------------------------------------------------------- 3// Copyright (c) 2012 GarageGames, LLC 4// 5// Permission is hereby granted, free of charge, to any person obtaining a copy 6// of this software and associated documentation files (the "Software"), to 7// deal in the Software without restriction, including without limitation the 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9// sell copies of the Software, and to permit persons to whom the Software is 10// furnished to do so, subject to the following conditions: 11// 12// The above copyright notice and this permission notice shall be included in 13// all copies or substantial portions of the Software. 14// 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21// IN THE SOFTWARE. 22//----------------------------------------------------------------------------- 23 24#ifndef _OBJECTTYPES_H_ 25#define _OBJECTTYPES_H_ 26 27#include "platform/types.h" 28 29/// Types used for SceneObject type masks (SceneObject::mTypeMask) 30/// 31/// @note If a new object type is added, don't forget to add it to 32/// RegisterGameFunctions(). 33enum SceneObjectTypes 34{ 35 /// @name Types used by the SceneObject class 36 /// @{ 37 38 /// Default value for type masks. 39 DefaultObjectType = 0, 40 41 /// @} 42 43 /// @name Basic Engine Types 44 /// @{ 45 46 /// Any kind of SceneObject that is not supposed to change transforms 47 /// except during editing (or not at all). 48 StaticObjectType = BIT( 0 ), 49 50 /// Environment objects such as clouds, skies, forests, etc. 51 EnvironmentObjectType = BIT( 1 ), 52 53 /// A terrain object. 54 /// @see TerrainBlock 55 TerrainObjectType = BIT( 2 ), 56 57 /// An object defining a water volume. 58 /// @see WaterObject 59 WaterObjectType = BIT( 3 ), 60 61 /// An object defining an invisible trigger volume. 62 /// @see Trigger 63 TriggerObjectType = BIT( 4 ), 64 65 /// An object defining an invisible marker. 66 /// @see MissionMarker 67 MarkerObjectType = BIT( 5 ), 68 69 /// A light emitter. 70 /// @see LightBase 71 LightObjectType = BIT( 6 ), 72 73 /// An object that manages zones. This is automatically set by 74 /// SceneZoneSpaceManager when a SceneZoneSpace registers zones. Should 75 /// not be manually set. 76 /// 77 /// @see SceneZoneSpace 78 /// @see SceneZoneSpaceManager 79 ZoneObjectType = BIT( 7 ), 80 81 /// Any object that defines one or more solid, renderable static geometries that 82 /// should be included in collision and raycasts. 83 /// 84 /// Use this mask to find objects that are part of the static level geometry. 85 /// 86 /// @note If you set this, you will also want to set StaticObjectType. 87 StaticShapeObjectType = BIT( 8 ), 88 89 /// Any object that defines one or more solid, renderable dynamic geometries that 90 /// should be included in collision and raycasts. 91 /// 92 /// Use this mask to find objects that are part of the dynamic game geometry. 93 DynamicShapeObjectType = BIT( 9 ), 94 95 /// @} 96 97 /// @name Game Types 98 /// @{ 99 100 /// Any GameBase-derived object. 101 /// @see GameBase 102 GameBaseObjectType = BIT( 10 ), 103 104 /// An object that uses hifi networking. 105 GameBaseHiFiObjectType = BIT( 11 ), 106 107 /// Any ShapeBase-derived object. 108 /// @see ShapeBase 109 ShapeBaseObjectType = BIT( 12 ), 110 111 /// A camera object. 112 /// @see Camera 113 CameraObjectType = BIT( 13 ), 114 115 /// A human or AI player object. 116 /// @see Player 117 PlayerObjectType = BIT( 14 ), 118 119 /// An item pickup. 120 /// @see Item 121 ItemObjectType = BIT( 15 ), 122 123 /// A vehicle. 124 /// @see Vehicle 125 VehicleObjectType = BIT( 16 ), 126 127 /// An object that blocks vehicles. 128 /// @see VehicleBlocker 129 VehicleBlockerObjectType = BIT( 17 ), 130 131 /// A weapon projectile. 132 /// @see Projectile 133 ProjectileObjectType = BIT( 18 ), 134 135 /// An explosion object. 136 /// @see Explosion 137 ExplosionObjectType = BIT( 19 ), 138 139 /// A dead player. This is dynamically set and unset. 140 /// @see Player 141 CorpseObjectType = BIT( 20 ), 142 143 /// A debris object. 144 /// @see Debris 145 DebrisObjectType = BIT( 21 ), 146 147 /// A volume that asserts forces on player objects. 148 /// @see PhysicalZone 149 PhysicalZoneObjectType = BIT( 22 ), 150 151 EntityObjectType = BIT(23), 152 /// @} 153}; 154 155enum SceneObjectTypeMasks : U32 156{ 157 STATIC_COLLISION_TYPEMASK = (StaticShapeObjectType | 158 EntityObjectType), 159 160 DAMAGEABLE_TYPEMASK = ( PlayerObjectType | 161 EntityObjectType | 162 VehicleObjectType ), 163 164 /// Typemask for objects that should be rendered into shadow passes. 165 /// These should be all objects that are either meant to receive or cast 166 /// shadows or both. 167 SHADOW_TYPEMASK = ( StaticShapeObjectType | 168 DynamicShapeObjectType | 169 EntityObjectType), 170 171 /// Typemask for objects that should be subjected to more fine-grained 172 /// culling tests. Anything that is trivial rendering stuff or doesn't 173 /// render except when in the editor should be excluded here. 174 /// 175 /// Also, objects that do their own culling internally (terrains, forests, etc.) 176 /// should be excluded. 177 CULLING_INCLUDE_TYPEMASK = ( GameBaseObjectType | // Includes most other renderable types; but broader than we ideally want. 178 StaticShapeObjectType | 179 DynamicShapeObjectType | 180 EntityObjectType | 181 ZoneObjectType | 182 LightObjectType ), // This improves the result of zone traversals. 183 184 /// Mask for objects that should be specifically excluded from zone culling. 185 CULLING_EXCLUDE_TYPEMASK = ( TerrainObjectType | 186 EnvironmentObjectType ), 187 188 /// Default object type mask to use for render queries. 189 DEFAULT_RENDER_TYPEMASK = ( EnvironmentObjectType | 190 TerrainObjectType | 191 WaterObjectType | 192 StaticShapeObjectType | 193 DynamicShapeObjectType | 194 LightObjectType | // Flares. 195 GameBaseObjectType | 196 TriggerObjectType | 197 EntityObjectType), 198 199 /// Typemask to use for rendering when inside the editor. 200 EDITOR_RENDER_TYPEMASK = U32( -1 ), 201 202 /// All objects that fit this type mask will be exclusively assigned to the outdoor (root) 203 /// zone and not be assigned to individual interior objects. 204 /// 205 /// @note Terrains have their own means for rendering inside interior zones. 206 OUTDOOR_OBJECT_TYPEMASK = ( TerrainObjectType | 207 EnvironmentObjectType ) 208}; 209 210#endif 211
