indra_constants.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_INDRA_CONSTANTS_H
00033 #define LL_INDRA_CONSTANTS_H
00034 
00035 #include "stdtypes.h"
00036 #include "lluuid.h"
00037 
00038 // At 45 Hz collisions seem stable and objects seem
00039 // to settle down at a reasonable rate.
00040 // JC 3/18/2003
00041 const F32 HAVOK_TIMESTEP = 1.f / 45.f;
00042 
00043 const F32 COLLISION_TOLERANCE = 0.1f;
00044 
00045 // Time constants
00046 const U32 HOURS_PER_LINDEN_DAY          = 4;    
00047 const U32 DAYS_PER_LINDEN_YEAR          = 11;
00048 
00049 const U32 SEC_PER_LINDEN_DAY            = HOURS_PER_LINDEN_DAY * 60 * 60;
00050 const U32 SEC_PER_LINDEN_YEAR           = DAYS_PER_LINDEN_YEAR * SEC_PER_LINDEN_DAY;
00051 
00052 const F32 REGION_WIDTH_METERS = 256.f;
00053 const S32 REGION_WIDTH_UNITS = 256;
00054 const U32 REGION_WIDTH_U32 = 256;
00055 
00056 // Bits for simulator performance query flags
00057 enum LAND_STAT_FLAGS
00058 {
00059         STAT_FILTER_BY_PARCEL   = 0x00000001,
00060         STAT_FILTER_BY_OWNER    = 0x00000002,
00061         STAT_FILTER_BY_OBJECT   = 0x00000004,
00062         STAT_REQUEST_LAST_ENTRY = 0x80000000,
00063 };
00064 
00065 enum LAND_STAT_REPORT_TYPE
00066 {
00067         STAT_REPORT_TOP_SCRIPTS = 0,
00068         STAT_REPORT_TOP_COLLIDERS
00069 };
00070 
00071 const U32 STAT_FILTER_MASK      = 0x1FFFFFFF;
00072 
00073 // Default maximum number of tasks/prims per region.
00074 const U32 MAX_TASKS_PER_REGION = 15000;
00075 
00076 const   F32     MIN_AGENT_DEPTH                 = 0.30f;
00077 const   F32     DEFAULT_AGENT_DEPTH     = 0.45f;
00078 const   F32     MAX_AGENT_DEPTH                 = 0.60f;
00079 
00080 const   F32     MIN_AGENT_WIDTH                 = 0.40f;
00081 const   F32     DEFAULT_AGENT_WIDTH     = 0.60f;
00082 const   F32     MAX_AGENT_WIDTH                 = 0.80f;
00083 
00084 const   F32     MIN_AGENT_HEIGHT                = 1.3f - 2.0f * COLLISION_TOLERANCE;
00085 const   F32     DEFAULT_AGENT_HEIGHT    = 1.9f;
00086 const   F32     MAX_AGENT_HEIGHT                = 2.65f - 2.0f * COLLISION_TOLERANCE;
00087 
00088 // For linked sets
00089 const S32 MAX_CHILDREN_PER_TASK = 255;
00090 const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 31;
00091 
00092 const S32 MAX_JOINTS_PER_OBJECT = 1;    // limiting to 1 until Havok 2.x
00093 
00094 const   char* const     DEFAULT_DMZ_SPACE_SERVER        = "192.168.0.140";
00095 const   char* const     DEFAULT_DMZ_USER_SERVER         = "192.168.0.140";
00096 const   char* const     DEFAULT_DMZ_DATA_SERVER         = "192.168.0.140";
00097 const   char* const     DEFAULT_DMZ_ASSET_SERVER        = "http://asset.dmz.lindenlab.com:80";
00098 
00099 const   char* const     DEFAULT_AGNI_SPACE_SERVER       = "63.211.139.100";
00100 const   char* const     DEFAULT_AGNI_USER_SERVER        = "63.211.139.100";
00101 const   char* const     DEFAULT_AGNI_DATA_SERVER        = "63.211.139.100";
00102 const   char* const     DEFAULT_AGNI_ASSET_SERVER       = "http://asset.agni.lindenlab.com:80";
00103 
00104 // Information about what ports are for what services is in the wiki Name Space Ports page
00105 const   char* const DEFAULT_LOCAL_ASSET_SERVER  = "http://localhost:12041/asset/tmp";
00106 const   char* const     LOCAL_ASSET_URL_FORMAT          = "http://%s:12041/asset";
00107 
00108 const   U32             DEFAULT_LAUNCHER_PORT                   = 12029;
00109 //const U32             DEFAULT_BIGBOARD_PORT                   = 12030; // Deprecated
00110 //const U32             DEFAULT_QUERYSIM_PORT                   = 12031; // Deprecated
00111 const   U32             DEFAULT_DATA_SERVER_PORT                = 12032;
00112 const   U32             DEFAULT_SPACE_SERVER_PORT               = 12033;
00113 const   U32             DEFAULT_VIEWER_PORT                             = 12034;
00114 const   U32             DEFAULT_SIMULATOR_PORT                  = 12035;
00115 const   U32             DEFAULT_USER_SERVER_PORT                = 12036;
00116 const   U32             DEFAULT_RPC_SERVER_PORT                 = 12037;
00117 const   U32             DEFAULT_LOG_DATA_SERVER_PORT    = 12039;
00118 const   U32             DEFAULT_BACKBONE_PORT                   = 12040;
00119 const   U32             DEFAULT_LOCAL_ASSET_PORT                = 12041;
00120 //const   U32           DEFAULT_BACKBONE_CAP_PORT               = 12042; // Deprecated
00121 const   U32             DEFAULT_CAP_PROXY_PORT                  = 12043;
00122 const   U32             DEFAULT_INV_DATA_SERVER_PORT    = 12044;
00123 const   U32             DEFAULT_CGI_SERVICES_PORT               = 12045;
00124 
00125 // For automatic port discovery when running multiple viewers on one host
00126 const   U32             PORT_DISCOVERY_RANGE_MIN                = 13000;
00127 const   U32             PORT_DISCOVERY_RANGE_MAX                = PORT_DISCOVERY_RANGE_MIN + 50;
00128 
00129 const   char    LAND_LAYER_CODE                                 = 'L';
00130 const   char    WATER_LAYER_CODE                                = 'W';
00131 const   char    WIND_LAYER_CODE                                 = '7';
00132 const   char    CLOUD_LAYER_CODE                                = '8';
00133 
00134 // keys
00135 // Bit masks for various keyboard modifier keys.
00136 const MASK MASK_NONE =                  0x0000;
00137 const MASK MASK_CONTROL =               0x0001;         // Mapped to cmd on Macs
00138 const MASK MASK_ALT =                   0x0002;
00139 const MASK MASK_SHIFT =                 0x0004;
00140 const MASK MASK_NORMALKEYS =    0x0007;     // A real mask - only get the bits for normal modifier keys
00141 const MASK MASK_MAC_CONTROL =   0x0008;         // Un-mapped Ctrl key on Macs, not used on Windows
00142 const MASK MASK_MODIFIERS =             MASK_CONTROL|MASK_ALT|MASK_SHIFT|MASK_MAC_CONTROL;
00143 
00144 // Special keys go into >128
00145 const KEY KEY_SPECIAL = 0x80;   // special keys start here
00146 const KEY KEY_RETURN =  0x81;
00147 const KEY KEY_LEFT =    0x82;
00148 const KEY KEY_RIGHT =   0x83;
00149 const KEY KEY_UP =              0x84;
00150 const KEY KEY_DOWN =    0x85;
00151 const KEY KEY_ESCAPE =  0x86;
00152 const KEY KEY_BACKSPACE =0x87;
00153 const KEY KEY_DELETE =  0x88;
00154 const KEY KEY_SHIFT =   0x89;
00155 const KEY KEY_CONTROL = 0x8A;
00156 const KEY KEY_ALT =             0x8B;
00157 const KEY KEY_HOME =    0x8C;
00158 const KEY KEY_END =             0x8D;
00159 const KEY KEY_PAGE_UP = 0x8E;
00160 const KEY KEY_PAGE_DOWN = 0x8F;
00161 const KEY KEY_HYPHEN = 0x90;
00162 const KEY KEY_EQUALS = 0x91;
00163 const KEY KEY_INSERT = 0x92;
00164 const KEY KEY_CAPSLOCK = 0x93;
00165 const KEY KEY_TAB =             0x94;
00166 const KEY KEY_ADD =     0x95;
00167 const KEY KEY_SUBTRACT =0x96;
00168 const KEY KEY_MULTIPLY =0x97;
00169 const KEY KEY_DIVIDE =  0x98;
00170 const KEY KEY_F1                = 0xA1;
00171 const KEY KEY_F2                = 0xA2;
00172 const KEY KEY_F3                = 0xA3;
00173 const KEY KEY_F4                = 0xA4;
00174 const KEY KEY_F5                = 0xA5;
00175 const KEY KEY_F6                = 0xA6;
00176 const KEY KEY_F7                = 0xA7;
00177 const KEY KEY_F8                = 0xA8;
00178 const KEY KEY_F9                = 0xA9;
00179 const KEY KEY_F10               = 0xAA;
00180 const KEY KEY_F11               = 0xAB;
00181 const KEY KEY_F12               = 0xAC;
00182 
00183 const KEY KEY_PAD_UP            = 0xC0;
00184 const KEY KEY_PAD_DOWN          = 0xC1;
00185 const KEY KEY_PAD_LEFT          = 0xC2;
00186 const KEY KEY_PAD_RIGHT         = 0xC3;
00187 const KEY KEY_PAD_HOME          = 0xC4;
00188 const KEY KEY_PAD_END           = 0xC5;
00189 const KEY KEY_PAD_PGUP          = 0xC6;
00190 const KEY KEY_PAD_PGDN          = 0xC7;
00191 const KEY KEY_PAD_CENTER        = 0xC8; // the 5 in the middle
00192 const KEY KEY_PAD_INS           = 0xC9;
00193 const KEY KEY_PAD_DEL           = 0xCA;
00194 const KEY KEY_PAD_RETURN        = 0xCB;
00195 const KEY KEY_PAD_ADD           = 0xCC; // not used
00196 const KEY KEY_PAD_SUBTRACT      = 0xCD; // not used
00197 const KEY KEY_PAD_MULTIPLY  = 0xCE; // not used
00198 const KEY KEY_PAD_DIVIDE        = 0xCF; // not used
00199 
00200 const KEY KEY_BUTTON0   = 0xD0;
00201 const KEY KEY_BUTTON1   = 0xD1;
00202 const KEY KEY_BUTTON2   = 0xD2;
00203 const KEY KEY_BUTTON3   = 0xD3;
00204 const KEY KEY_BUTTON4   = 0xD4;
00205 const KEY KEY_BUTTON5   = 0xD5;
00206 const KEY KEY_BUTTON6   = 0xD6;
00207 const KEY KEY_BUTTON7   = 0xD7;
00208 const KEY KEY_BUTTON8   = 0xD8;
00209 const KEY KEY_BUTTON9   = 0xD9;
00210 const KEY KEY_BUTTON10  = 0xDA;
00211 const KEY KEY_BUTTON11  = 0xDB;
00212 const KEY KEY_BUTTON12  = 0xDC;
00213 const KEY KEY_BUTTON13  = 0xDD;
00214 const KEY KEY_BUTTON14  = 0xDE;
00215 const KEY KEY_BUTTON15  = 0xDF;
00216 
00217 const KEY KEY_NONE =    0xFF; // not sent from keyboard.  For internal use only.
00218 
00219 const S32 KEY_COUNT = 256;
00220 
00221 
00222 const F32 DEFAULT_WATER_HEIGHT  = 20.0f;
00223 
00224 // Maturity ratings for simulators
00225 const U8 SIM_ACCESS_MIN         = 0;
00226 const U8 SIM_ACCESS_TRIAL       = 7;
00227 const U8 SIM_ACCESS_PG          = 13;
00228 const U8 SIM_ACCESS_MATURE      = 21;
00229 const U8 SIM_ACCESS_DOWN        = 254;
00230 const U8 SIM_ACCESS_MAX         = SIM_ACCESS_MATURE;
00231 
00232 // group constants
00233 const S32 MAX_AGENT_GROUPS = 25;
00234 
00235 // god levels
00236 const U8 GOD_MAINTENANCE = 250;
00237 const U8 GOD_FULL = 200;
00238 const U8 GOD_LIAISON = 150;
00239 const U8 GOD_CUSTOMER_SERVICE = 100;
00240 const U8 GOD_LIKE = 1;
00241 const U8 GOD_NOT = 0;
00242 
00243 // "agent id" for things that should be done to ALL agents
00244 const LLUUID LL_UUID_ALL_AGENTS("44e87126-e794-4ded-05b3-7c42da3d5cdb");
00245 
00246 // Governor Linden's agent id.
00247 const LLUUID GOVERNOR_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
00248 const LLUUID REALESTATE_LINDEN_ID("3d6181b0-6a4b-97ef-18d8-722652995cf1");
00249 // Maintenance's group id.
00250 const LLUUID MAINTENANCE_GROUP_ID("dc7b21cd-3c89-fcaa-31c8-25f9ffd224cd");
00251 
00252 // Flags for kick message
00253 const U32 KICK_FLAGS_DEFAULT    = 0x0;
00254 const U32 KICK_FLAGS_FREEZE             = 1 << 0;
00255 const U32 KICK_FLAGS_UNFREEZE   = 1 << 1;
00256 
00257 const U8 UPD_NONE               = 0x00;
00258 const U8 UPD_POSITION           = 0x01;
00259 const U8 UPD_ROTATION           = 0x02;
00260 const U8 UPD_SCALE              = 0x04;
00261 const U8 UPD_LINKED_SETS        = 0x08;
00262 const U8 UPD_UNIFORM            = 0x10; // used with UPD_SCALE
00263 
00264 // Agent Update Flags (U8)
00265 const U8 AU_FLAGS_NONE                  = 0x00;
00266 const U8 AU_FLAGS_HIDETITLE             = 0x01;
00267 
00268 // start location constants
00269 const U32 START_LOCATION_ID_LAST                = 0;
00270 const U32 START_LOCATION_ID_HOME                = 1;
00271 const U32 START_LOCATION_ID_DIRECT              = 2;    // for direct teleport
00272 const U32 START_LOCATION_ID_PARCEL              = 3;    // for teleports to a parcel
00273 const U32 START_LOCATION_ID_TELEHUB     = 4;    // for teleports to a spawnpoint
00274 const U32 START_LOCATION_ID_URL                 = 5;
00275 const U32 START_LOCATION_ID_COUNT               = 6;
00276 
00277 // group constants
00278 const U32 GROUP_MIN_SIZE = 2;
00279 
00280 // radius within which a chat message is fully audible
00281 const F32 CHAT_WHISPER_RADIUS = 10.f;
00282 const F32 CHAT_NORMAL_RADIUS = 20.f;
00283 const F32 CHAT_SHOUT_RADIUS = 100.f;
00284 const F32 CHAT_MAX_RADIUS = CHAT_SHOUT_RADIUS;
00285 const F32 CHAT_MAX_RADIUS_BY_TWO = CHAT_MAX_RADIUS / 2.f;
00286 
00287 // this times above gives barely audible radius
00288 const F32 CHAT_BARELY_AUDIBLE_FACTOR = 2.0f;
00289 
00290 // distance in front of speaking agent the sphere is centered
00291 const F32 CHAT_WHISPER_OFFSET = 5.f;
00292 const F32 CHAT_NORMAL_OFFSET = 10.f;
00293 const F32 CHAT_SHOUT_OFFSET = 50.f;
00294 
00295 // first clean starts at 3 AM
00296 const S32 SANDBOX_FIRST_CLEAN_HOUR = 3;
00297 // clean every <n> hours
00298 const S32 SANDBOX_CLEAN_FREQ = 12;
00299 
00300 const F32 WIND_SCALE_HACK               = 2.0f; // hack to make wind speeds more realistic
00301 
00302 enum ETerrainBrushType
00303 {
00304         // the valid brush numbers cannot be reordered, because they 
00305         // are used in the binary LSL format as arguments to llModifyLand()
00306         E_LANDBRUSH_LEVEL       = 0,
00307         E_LANDBRUSH_RAISE       = 1,
00308         E_LANDBRUSH_LOWER       = 2,
00309         E_LANDBRUSH_SMOOTH      = 3,
00310         E_LANDBRUSH_NOISE       = 4,
00311         E_LANDBRUSH_REVERT      = 5,
00312         E_LANDBRUSH_INVALID = 6
00313 };
00314 
00315 // media commands
00316 const U32 PARCEL_MEDIA_COMMAND_STOP  = 0;
00317 const U32 PARCEL_MEDIA_COMMAND_PAUSE = 1;
00318 const U32 PARCEL_MEDIA_COMMAND_PLAY  = 2;
00319 const U32 PARCEL_MEDIA_COMMAND_LOOP  = 3;
00320 const U32 PARCEL_MEDIA_COMMAND_TEXTURE = 4;
00321 const U32 PARCEL_MEDIA_COMMAND_URL = 5;
00322 const U32 PARCEL_MEDIA_COMMAND_TIME = 6;
00323 const U32 PARCEL_MEDIA_COMMAND_AGENT = 7;
00324 const U32 PARCEL_MEDIA_COMMAND_UNLOAD = 8;
00325 const U32 PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9;
00326 
00327 // map item types
00328 const U32 MAP_ITEM_TELEHUB = 0x01;
00329 const U32 MAP_ITEM_PG_EVENT = 0x02;
00330 const U32 MAP_ITEM_MATURE_EVENT = 0x03;
00331 const U32 MAP_ITEM_POPULAR = 0x04;
00332 //const U32 MAP_ITEM_AGENT_COUNT = 0x05;
00333 const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
00334 const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
00335 const U32 MAP_ITEM_CLASSIFIED = 0x08;
00336 
00337 // Crash reporter behavior
00338 const char* const CRASH_SETTINGS_FILE = "crash_settings.xml";
00339 const char* const CRASH_BEHAVIOR_SETTING = "CrashBehavior";
00340 const S32 CRASH_BEHAVIOR_ASK = 0;
00341 const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1;
00342 const S32 CRASH_BEHAVIOR_NEVER_SEND = 2;
00343 
00344 // Export/Import return values
00345 const S32 EXPORT_SUCCESS = 0;
00346 const S32 EXPORT_ERROR_PERMISSIONS = -1;
00347 const S32 EXPORT_ERROR_UNKNOWN = -2;
00348 
00349 // This is how long the sim will try to teleport you before giving up.
00350 const F32 TELEPORT_EXPIRY = 15.0f;
00351 // Additional time (in seconds) to wait per attachment
00352 const F32 TELEPORT_EXPIRY_PER_ATTACHMENT = 3.f;
00353 
00354 // The maximum size of an object extra parameters binary (packed) block
00355 #define MAX_OBJECT_PARAMS_SIZE 1024
00356 
00357 const S32 CHAT_CHANNEL_DEBUG = S32_MAX;
00358 
00359 // PLEASE don't add constants here.  Every dev will have to do
00360 // a complete rebuild.  Try to find another shared header file,
00361 // like llregionflags.h, lllslconstants.h, llagentconstants.h,
00362 // or create a new one.  JC
00363 
00364 #endif

Generated on Thu Jul 1 06:08:17 2010 for Second Life Viewer by  doxygen 1.4.7