Add constants and float data type
This commit is contained in:
parent
97bc0d3a5f
commit
13ff5231b0
4 changed files with 840 additions and 3 deletions
727
lib/omv/types/constants.dart
Normal file
727
lib/omv/types/constants.dart
Normal file
|
@ -0,0 +1,727 @@
|
|||
import 'package:libac_dart/omv/types/rotation.dart';
|
||||
import 'package:libac_dart/omv/types/string.dart';
|
||||
import 'package:libac_dart/omv/types/float.dart';
|
||||
import 'package:libac_dart/omv/types/vector.dart';
|
||||
|
||||
import 'key.dart';
|
||||
|
||||
const int TRUE = 1;
|
||||
const int FALSE = 0;
|
||||
|
||||
const int DENSITY = 1;
|
||||
const int FRICTION = 2;
|
||||
const int GRAVITY_MULTIPLIER = 8;
|
||||
const int RESTITUTION = 4;
|
||||
|
||||
const int AGENT = 1;
|
||||
const int ACTIVE = 2;
|
||||
const int PASSIVE = 4;
|
||||
const int SCRIPTED = 8;
|
||||
|
||||
const int ANIM_ON = 1;
|
||||
const int LOOP = 2;
|
||||
const int REVERSE = 4;
|
||||
const int PING_PONG = 8;
|
||||
const int SMOOTH = 16;
|
||||
const int ROTATE = 32;
|
||||
const int SCALE = 64;
|
||||
|
||||
const int ALL_SIDES = -1;
|
||||
|
||||
const int DEBUG_CHANNEL = 2147483647;
|
||||
final string EOF = string("\n\n\n");
|
||||
|
||||
const int AGENT_FLYING = 1;
|
||||
const int AGENT_ATTACHMENTS = 2;
|
||||
const int AGENT_SCRIPTED = 4;
|
||||
const int AGENT_MOUSELOOK = 8;
|
||||
const int AGENT_SITTING = 16;
|
||||
const int AGENT_ON_OBJECT = 32;
|
||||
const int AGENT_AWAY = 64;
|
||||
const int AGENT_WALKING = 128;
|
||||
const int AGENT_IN_AIR = 256;
|
||||
const int AGENT_TYPING = 512;
|
||||
const int AGENT_CROUCHING = 1024;
|
||||
const int AGENT_BUSY = 2048;
|
||||
const int AGENT_ALWAYS_RUN = 4096;
|
||||
const int AGENT_AUTOPILOT = 0x2000;
|
||||
const int AGENT_BY_LEGACY_NAME = 0x1;
|
||||
const int AGENT_BY_USERNAME = 0x10;
|
||||
|
||||
const int AGENT_LIST_PARCEL = 0x01;
|
||||
const int AGENT_LIST_PARCEL_OWNER = 0x02;
|
||||
const int AGENT_LIST_REGION = 0x04;
|
||||
|
||||
const int ATTACH_AVATAR_CENTER = 40;
|
||||
const int ATTACH_BACK = 9;
|
||||
const int ATTACH_CHEST = 1;
|
||||
const int ATTACH_CHIN = 12;
|
||||
const int ATTACH_HEAD = 2;
|
||||
const int ATTACH_LSHOULDER = 3;
|
||||
const int ATTACH_RSHOULDER = 4;
|
||||
const int ATTACH_LHAND = 5;
|
||||
const int ATTACH_RHAND = 6;
|
||||
const int ATTACH_LFOOT = 7;
|
||||
const int ATTACH_RFOOT = 8;
|
||||
const int ATTACH_PELVIS = 10;
|
||||
const int ATTACH_MOUTH = 11;
|
||||
const int ATTACH_NECK = 39;
|
||||
const int ATTACH_LEAR = 13;
|
||||
const int ATTACH_LEFT_PEC = 29;
|
||||
const int ATTACH_REAR = 14;
|
||||
const int ATTACH_LEYE = 15;
|
||||
const int ATTACH_REYE = 16;
|
||||
const int ATTACH_NOSE = 17;
|
||||
const int ATTACH_RUARM = 18;
|
||||
const int ATTACH_RLARM = 19;
|
||||
const int ATTACH_LUARM = 20;
|
||||
const int ATTACH_LLARM = 21;
|
||||
const int ATTACH_RHIP = 22;
|
||||
const int ATTACH_RIGHT_PEC = 30;
|
||||
const int ATTACH_RULEG = 23;
|
||||
const int ATTACH_RLLEG = 24;
|
||||
const int ATTACH_LHIP = 25;
|
||||
const int ATTACH_LULEG = 26;
|
||||
const int ATTACH_LLLEG = 27;
|
||||
const int ATTACH_BELLY = 28;
|
||||
const int ATTACH_RPEC = 29;
|
||||
const int ATTACH_LPEC = 30;
|
||||
|
||||
const int ATTACH_HUD_CENTER_2 = 31;
|
||||
const int ATTACH_HUD_TOP_RIGHT = 32;
|
||||
const int ATTACH_HUD_TOP_CENTER = 33;
|
||||
const int ATTACH_HUD_TOP_LEFT = 34;
|
||||
const int ATTACH_HUD_CENTER_1 = 35;
|
||||
const int ATTACH_HUD_BOTTOM_LEFT = 36;
|
||||
const int ATTACH_HUD_BOTTOM = 37;
|
||||
const int ATTACH_HUD_BOTTOM_RIGHT = 38;
|
||||
|
||||
const int AVOID_NONE = 0;
|
||||
const int AVOID_CHARACTERS = 1;
|
||||
const int AVOID_DYNAMIC_OBSTACLES = 2;
|
||||
|
||||
const int CAMERA_PITCH = 0;
|
||||
const int CAMERA_FOCUS_OFFSET = 1;
|
||||
const int CAMERA_POSITION_LAG = 5;
|
||||
const int CAMERA_FOCUS_LAG = 6;
|
||||
const int CAMERA_DISTANCE = 7;
|
||||
const int CAMERA_BEHINDNESS_ANGLE = 8;
|
||||
const int CAMERA_BEHINDNESS_LAG = 9;
|
||||
const int CAMERA_POSITION_THRESHOLD = 10;
|
||||
const int CAMERA_FOCUS_THRESHOLD = 11;
|
||||
const int CAMERA_ACTIVE = 12;
|
||||
const int CAMERA_POSITION = 13;
|
||||
const int CAMERA_FOCUS = 17;
|
||||
const int CAMERA_FOCUS_LOCKED = 22;
|
||||
const int CAMERA_POSITION_LOCKED = 21;
|
||||
|
||||
const int CHANGED_INVENTORY = 1;
|
||||
const int CHANGED_COLOR = 2;
|
||||
const int CHANGED_SHAPE = 4;
|
||||
const int CHANGED_SCALE = 8;
|
||||
const int CHANGED_TEXTURE = 16;
|
||||
const int CHANGED_LINK = 32;
|
||||
const int CHANGED_ALLOWED_DROP = 64;
|
||||
const int CHANGED_OWNER = 128;
|
||||
const int CHANGED_REGION = 256;
|
||||
const int CHANGED_TELEPORT = 512;
|
||||
const int CHANGED_REGION_START = 1024;
|
||||
const int CHANGED_MEDIA = 2048;
|
||||
|
||||
const int CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES = 14;
|
||||
const int CHARACTER_AVOIDANCE_MODE = 5;
|
||||
const int CHARACTER_CMD_JUMP = 0x01;
|
||||
const int CHARACTER_CMD_STOP = 0x00;
|
||||
const int CHARACTER_DESIRED_SPEED = 1;
|
||||
const int CHARACTER_LENGTH = 3;
|
||||
const int CHARACTER_TYPE = 6;
|
||||
const int CHARACTER_MAX_ACCEL = 8;
|
||||
const int CHARACTER_MAX_DECEL = 9;
|
||||
const int CHARACTER_MAX_SPEED = 13;
|
||||
const int CHARACTER_MAX_TURN_RADIUS = 10;
|
||||
const int CHARACTER_ORIENTATION = 4;
|
||||
const int CHARACTER_RADIUS = 2;
|
||||
const int CHARACTER_STAY_WITHIN_PARCEL = 15;
|
||||
const int CHARACTER_TYPE_A = 0;
|
||||
const int CHARACTER_TYPE_B = 1;
|
||||
const int CHARACTER_TYPE_C = 2;
|
||||
const int CHARACTER_TYPE_D = 3;
|
||||
const int CHARACTER_TYPE_NONE = 4;
|
||||
|
||||
const int CLICK_ACTION_NONE = 0;
|
||||
const int CLICK_ACTION_TOUCH = 0;
|
||||
const int CLICK_ACTION_SIT = 1;
|
||||
const int CLICK_ACTION_BUY = 2;
|
||||
const int CLICK_ACTION_PAY = 3;
|
||||
const int CLICK_ACTION_OPEN = 4;
|
||||
const int CLICK_ACTION_PLAY = 5;
|
||||
const int CLICK_ACTION_OPEN_MEDIA = 6;
|
||||
|
||||
final string CONTENT_TYPE_ATOM = string("application/atom+xml");
|
||||
final string CONTENT_TYPE_FORM = string("application/x-www-form-urlencoded");
|
||||
final string CONTENT_TYPE_HTML = string("text/html");
|
||||
final string CONTENT_TYPE_JSON = string("application/json");
|
||||
final string CONTENT_TYPE_LLSD = string("application/llsd+xml");
|
||||
final string CONTENT_TYPE_RSS = string("application/rss+xml");
|
||||
final string CONTENT_TYPE_TEXT = string("text/plain");
|
||||
final string CONTENT_TYPE_XHTML = string("application/xhtml+xml");
|
||||
final string CONTENT_TYPE_XML = string("application/xml");
|
||||
|
||||
const int CONTROL_FWD = 1;
|
||||
const int CONTROL_BACK = 2;
|
||||
const int CONTROL_LEFT = 4;
|
||||
const int CONTROL_RIGHT = 8;
|
||||
const int CONTROL_ROT_LEFT = 256;
|
||||
const int CONTROL_ROT_RIGHT = 512;
|
||||
const int CONTROL_UP = 16;
|
||||
const int CONTROL_DOWN = 32;
|
||||
const int CONTROL_LBUTTON = 268435456;
|
||||
const int CONTROL_ML_LBUTTON = 1073741824;
|
||||
|
||||
const int DATA_ONLINE = 1;
|
||||
const int DATA_NAME = 2;
|
||||
const int DATA_BORN = 3;
|
||||
const int DATA_RATING = 4;
|
||||
|
||||
const int DATA_SIM_POS = 5;
|
||||
const int DATA_SIM_STATUS = 6;
|
||||
const int DATA_SIM_RATING = 7;
|
||||
|
||||
const int DATA_PAYINFO = 8;
|
||||
|
||||
const int ERR_GENERIC = -1;
|
||||
const int ERR_MALFORMED_PARAMS = -3;
|
||||
const int ERR_PARCEL_PERMISSIONS = -2;
|
||||
const int ERR_RUNTIME_PERMISSIONS = -4;
|
||||
const int ERR_THROTTLED = -5;
|
||||
|
||||
const int ESTATE_ACCESS_ALLOWED_AGENT_ADD = 4;
|
||||
const int ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 8;
|
||||
const int ESTATE_ACCESS_ALLOWED_GROUP_ADD = 16;
|
||||
const int ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 32;
|
||||
const int ESTATE_ACCESS_BANNED_AGENT_ADD = 64;
|
||||
const int ESTATE_ACCESS_BANNED_AGENT_REMOVE = 128;
|
||||
|
||||
const int FORCE_DIRECT_PATH = 1;
|
||||
|
||||
const int HTTP_BODY_MAXLENGTH = 2;
|
||||
const int HTTP_BODY_TRUNCATED = 0;
|
||||
const int HTTP_METHOD = 0;
|
||||
const int HTTP_MIMETYPE = 1;
|
||||
const int HTTP_PRAGMA_NO_CACHE = 6;
|
||||
const int HTTP_VERBOSE_THROTTLE = 4;
|
||||
const int HTTP_VERIFY_CERT = 3;
|
||||
|
||||
const int HORIZONTAL = 1;
|
||||
|
||||
const int INVENTORY_ALL = -1;
|
||||
const int INVENTORY_NONE = -1;
|
||||
const int INVENTORY_TEXTURE = 0;
|
||||
const int INVENTORY_SOUND = 1;
|
||||
const int INVENTORY_LANDMARK = 3;
|
||||
const int INVENTORY_CLOTHING = 5;
|
||||
const int INVENTORY_OBJECT = 6;
|
||||
const int INVENTORY_NOTECARD = 7;
|
||||
const int INVENTORY_SCRIPT = 10;
|
||||
const int INVENTORY_BODYPART = 13;
|
||||
const int INVENTORY_ANIMATION = 20;
|
||||
const int INVENTORY_GESTURE = 21;
|
||||
|
||||
const int JSON_APPEND = -1;
|
||||
final string JSON_ARRAY = string("\uFDD2");
|
||||
final string JSON_DELETE = string("\uFDD8");
|
||||
final string JSON_FALSE = string("\uFDD7");
|
||||
final string JSON_INVALID = string("\uFDD0");
|
||||
final string JSON_NULL = string("\uFDD5");
|
||||
final string JSON_NUMBER = string("\uFDD3");
|
||||
final string JSON_OBJECT = string("\uFDD1");
|
||||
final string JSON_STRING = string("\uFDD4");
|
||||
final string JSON_TRUE = string("\uFDD6");
|
||||
|
||||
const int KFM_CMD_PAUSE = 2;
|
||||
const int KFM_CMD_PLAY = 0;
|
||||
const int KFM_CMD_STOP = 1;
|
||||
const int KFM_COMMAND = 0;
|
||||
const int KFM_DATA = 2;
|
||||
const int KFM_FORWARD = 0;
|
||||
const int KFM_LOOP = 1;
|
||||
const int KFM_MODE = 1;
|
||||
const int KFM_PING_PONG = 2;
|
||||
const int KFM_REVERSE = 2;
|
||||
const int KFM_ROTATION = 1;
|
||||
const int KFM_TRANSLATION = 2;
|
||||
|
||||
const int LAND_LEVEL = 0;
|
||||
const int LAND_RAISE = 1;
|
||||
const int LAND_LOWER = 2;
|
||||
const int LAND_SMOOTH = 3;
|
||||
const int LAND_NOISE = 4;
|
||||
const int LAND_REVERT = 5;
|
||||
|
||||
const int LAND_LARGE_BRUSH = 3;
|
||||
const int LAND_MEDIUM_BRUSH = 2;
|
||||
const int LAND_SMALL_BRUSH = 1;
|
||||
|
||||
const int LINK_ROOT = 1;
|
||||
const int LINK_SET = -1;
|
||||
const int LINK_ALL_OTHERS = -2;
|
||||
const int LINK_ALL_CHILDREN = -3;
|
||||
const int LINK_THIS = -4;
|
||||
|
||||
const int LIST_STAT_RANGE = 0;
|
||||
const int LIST_STAT_MIN = 1;
|
||||
const int LIST_STAT_MAX = 2;
|
||||
const int LIST_STAT_MEAN = 3;
|
||||
const int LIST_STAT_MEDIAN = 4;
|
||||
const int LIST_STAT_STD_DEV = 5;
|
||||
const int LIST_STAT_SUM = 6;
|
||||
const int LIST_STAT_SUM_SQUARES = 7;
|
||||
const int LIST_STAT_NUM_COUNT = 8;
|
||||
const int LIST_STAT_GEOMETRIC_MEAN = 9;
|
||||
|
||||
const int MASK_BASE = 0;
|
||||
const int MASK_EVERYONE = 3;
|
||||
const int MASK_GROUP = 2;
|
||||
const int MASK_NEXT = 4;
|
||||
const int MASK_OWNER = 1;
|
||||
|
||||
const int OBJECT_ATTACHED_POINT = 19;
|
||||
const int OBJECT_CHARACTER_TIME = 17;
|
||||
const int OBJECT_NAME = 1;
|
||||
const int OBJECT_DESC = 2;
|
||||
const int OBJECT_POS = 3;
|
||||
const int OBJECT_ROOT = 18;
|
||||
const int OBJECT_ROT = 4;
|
||||
const int OBJECT_VELOCITY = 5;
|
||||
const int OBJECT_OWNER = 6;
|
||||
const int OBJECT_PATHFINDING_TYPE = 20;
|
||||
const int OBJECT_GROUP = 7;
|
||||
const int OBJECT_CREATOR = 8;
|
||||
const int OBJECT_PHYSICS = 21;
|
||||
const int OBJECT_PHANTOM = 22;
|
||||
const int OBJECT_TEMP_ON_REZ = 23;
|
||||
|
||||
const int OBJECT_STREAMING_COST = 15;
|
||||
const int OBJECT_PHYSICS_COST = 16;
|
||||
const int OBJECT_SERVER_COST = 14;
|
||||
const int OBJECT_PRIM_EQUIVALENCE = 13;
|
||||
|
||||
const int OBJECT_RUNNING_SCRIPT_COUNT = 9;
|
||||
const int OBJECT_SCRIPT_MEMORY = 11;
|
||||
const int OBJECT_SCRIPT_TIME = 12;
|
||||
const int OBJECT_TOTAL_SCRIPT_COUNT = 10;
|
||||
const int OBJECT_UNKNOWN_DETAIL = -1;
|
||||
|
||||
const int OPT_AVATAR = 1;
|
||||
const int OPT_CHARACTER = 2;
|
||||
const int OPT_EXCLUSION_VOLUME = 6;
|
||||
const int OPT_LEGACY_LINKSET = 0;
|
||||
const int OPT_MATERIAL_VOLUME = 5;
|
||||
const int OPT_OTHER = -1;
|
||||
const int OPT_STATIC_OBSTACLE = 4;
|
||||
const int OPT_WALKABLE = 3;
|
||||
|
||||
const int OBJECT_RETURN_PARCEL = 1;
|
||||
const int OBJECT_RETURN_PARCEL_OWNER = 2;
|
||||
const int OBJECT_RETURN_REGION = 4;
|
||||
|
||||
const int PARCEL_COUNT_TOTAL = 0;
|
||||
const int PARCEL_COUNT_OWNER = 1;
|
||||
const int PARCEL_COUNT_GROUP = 2;
|
||||
const int PARCEL_COUNT_OTHER = 3;
|
||||
const int PARCEL_COUNT_SELECTED = 4;
|
||||
const int PARCEL_COUNT_TEMP = 5;
|
||||
|
||||
const int PARCEL_DETAILS_AREA = 4;
|
||||
const int PARCEL_DETAILS_DESC = 1;
|
||||
const int PARCEL_DETAILS_GROUP = 3;
|
||||
const int PARCEL_DETAILS_ID = 5;
|
||||
const int PARCEL_DETAILS_NAME = 0;
|
||||
const int PARCEL_DETAILS_OWNER = 2;
|
||||
const int PARCEL_DETAILS_SEE_AVATARS = 6;
|
||||
|
||||
const int PARCEL_FLAG_ALLOW_FLY = 0x0000001;
|
||||
const int PARCEL_FLAG_ALLOW_SCRIPTS = 0x0000002;
|
||||
const int PARCEL_FLAG_ALLOW_LANDMARK = 0x0000008;
|
||||
const int PARCEL_FLAG_ALLOW_TERRAFORM = 0x0000010;
|
||||
const int PARCEL_FLAG_ALLOW_DAMAGE = 0x0000020;
|
||||
const int PARCEL_FLAG_ALLOW_CREATE_OBJECTS = 0x0000040;
|
||||
const int PARCEL_FLAG_USE_ACCESS_GROUP = 0x0000100;
|
||||
const int PARCEL_FLAG_USE_ACCESS_LIST = 0x0000200;
|
||||
const int PARCEL_FLAG_USE_BAN_LIST = 0x0000400;
|
||||
const int PARCEL_FLAG_USE_LAND_PASS_LIST = 0x0000800;
|
||||
const int PARCEL_FLAG_LOCAL_SOUND_ONLY = 0x0008000;
|
||||
const int PARCEL_FLAG_RESTRICT_PUSHOBJECT = 0x0200000;
|
||||
const int PARCEL_FLAG_ALLOW_GROUP_SCRIPTS = 0x2000000;
|
||||
|
||||
const int PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS = 0x4000000;
|
||||
const int PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY = 0x8000000;
|
||||
const int PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY = 0x10000000;
|
||||
|
||||
const int PARCEL_MEDIA_COMMAND_STOP = 0;
|
||||
const int PARCEL_MEDIA_COMMAND_PAUSE = 1;
|
||||
const int PARCEL_MEDIA_COMMAND_PLAY = 2;
|
||||
const int PARCEL_MEDIA_COMMAND_LOOP = 3;
|
||||
const int PARCEL_MEDIA_COMMAND_TEXTURE = 4;
|
||||
const int PARCEL_MEDIA_COMMAND_URL = 5;
|
||||
const int PARCEL_MEDIA_COMMAND_TIME = 6;
|
||||
const int PARCEL_MEDIA_COMMAND_AGENT = 7;
|
||||
const int PARCEL_MEDIA_COMMAND_UNLOAD = 8;
|
||||
const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9;
|
||||
|
||||
const int PARCEL_MEDIA_COMMAND_TYPE = 10;
|
||||
const int PARCEL_MEDIA_COMMAND_SIZE = 11;
|
||||
const int PARCEL_MEDIA_COMMAND_DESC = 12;
|
||||
const int PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
|
||||
|
||||
const int PAY_DEFAULT = -2;
|
||||
const int PAY_HIDE = -1;
|
||||
|
||||
const int PAYMENT_INFO_ON_FILE = 1;
|
||||
const int PAYMENT_INFO_USED = 2;
|
||||
|
||||
const int PERM_ALL = 2147483647;
|
||||
const int PERM_COPY = 32768;
|
||||
const int PERM_MODIFY = 16384;
|
||||
const int PERM_MOVE = 524288;
|
||||
const int PERM_TRANSFER = 8192;
|
||||
|
||||
const int PERMISSION_DEBIT = 2;
|
||||
const int PERMISSION_TAKE_CONTROLS = 4;
|
||||
const int PERMISSION_REMAP_CONTROLS = 8;
|
||||
const int PERMISSION_TRIGGER_ANIMATION = 16;
|
||||
const int PERMISSION_ATTACH = 32;
|
||||
const int PERMISSION_RELEASE_OWNERSHIP = 64;
|
||||
const int PERMISSION_CHANGE_LINKS = 128;
|
||||
const int PERMISSION_CHANGE_JOINTS = 256;
|
||||
const int PERMISSION_CHANGE_PERMISSIONS = 512;
|
||||
const int PERMISSION_CONTROL_CAMERA = 2048;
|
||||
const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000;
|
||||
const int PERMISSION_TRACK_CAMERA = 1024;
|
||||
const int PERMISSION_RETURN_OBJECTS = 65536;
|
||||
|
||||
const int PRIM_BUMP_BARK = 4;
|
||||
const int PRIM_BUMP_BLOBS = 12;
|
||||
const int PRIM_BUMP_BRICKS = 5;
|
||||
const int PRIM_BUMP_BRIGHT = 1;
|
||||
const int PRIM_BUMP_CHECKER = 6;
|
||||
const int PRIM_BUMP_CONCRETE = 7;
|
||||
const int PRIM_BUMP_DARK = 2;
|
||||
const int PRIM_BUMP_DISKS = 10;
|
||||
const int PRIM_BUMP_GRAVEL = 11;
|
||||
const int PRIM_BUMP_LARGETILE = 14;
|
||||
const int PRIM_BUMP_NONE = 0;
|
||||
const int PRIM_BUMP_SHINY = 19;
|
||||
const int PRIM_BUMP_SIDING = 13;
|
||||
const int PRIM_BUMP_STONE = 9;
|
||||
const int PRIM_BUMP_STUCCO = 15;
|
||||
const int PRIM_BUMP_SUCTION = 16;
|
||||
const int PRIM_BUMP_TILE = 8;
|
||||
const int PRIM_BUMP_WEAVE = 17;
|
||||
const int PRIM_BUMP_WOOD = 3;
|
||||
|
||||
const int PRIM_CAST_SHADOWS = 24;
|
||||
const int PRIM_COLOR = 18;
|
||||
const int PRIM_DESC = 28;
|
||||
const int PRIM_FLEXIBLE = 21;
|
||||
const int PRIM_FULLBRIGHT = 20;
|
||||
const int PRIM_HOLE_CIRCLE = 16;
|
||||
const int PRIM_HOLE_DEFAULT = 0;
|
||||
const int PRIM_HOLE_SQUARE = 32;
|
||||
const int PRIM_HOLE_TRIANGLE = 48;
|
||||
const int PRIM_LINK_TARGET = 34;
|
||||
const int PRIM_MATERIAL = 2;
|
||||
const int PRIM_MATERIAL_FLESH = 4;
|
||||
const int PRIM_MATERIAL_GLASS = 2;
|
||||
const int PRIM_MATERIAL_LIGHT = 7;
|
||||
const int PRIM_MATERIAL_METAL = 1;
|
||||
const int PRIM_MATERIAL_PLASTIC = 5;
|
||||
const int PRIM_MATERIAL_RUBBER = 6;
|
||||
const int PRIM_MATERIAL_STONE = 0;
|
||||
const int PRIM_MATERIAL_WOOD = 3;
|
||||
|
||||
const int PRIM_MEDIA_ALT_IMAGE_ENABLE = 0;
|
||||
const int PRIM_MEDIA_AUTO_LOOP = 4;
|
||||
const int PRIM_MEDIA_AUTO_PLAY = 5;
|
||||
const int PRIM_MEDIA_AUTO_SCALE = 6;
|
||||
const int PRIM_MEDIA_AUTO_ZOOM = 7;
|
||||
const int PRIM_MEDIA_CONTROLS = 1;
|
||||
const int PRIM_MEDIA_CONTROLS_MINI = 1;
|
||||
const int PRIM_MEDIA_CONTROLS_STANDARD = 0;
|
||||
const int PRIM_MEDIA_CURRENT_URL = 2;
|
||||
const int PRIM_MEDIA_FIRST_CLICK_INTERACT = 8;
|
||||
const int PRIM_MEDIA_HEIGHT_PIXELS = 10;
|
||||
const int PRIM_MEDIA_HOME_URL = 3;
|
||||
const int PRIM_MEDIA_PERM_ANYONE = 4;
|
||||
const int PRIM_MEDIA_PERM_GROUP = 2;
|
||||
const int PRIM_MEDIA_PERM_NONE = 0;
|
||||
const int PRIM_MEDIA_PERM_OWNER = 1;
|
||||
const int PRIM_MEDIA_PERMS_CONTROL = 14;
|
||||
const int PRIM_MEDIA_PERMS_INTERACT = 13;
|
||||
const int PRIM_MEDIA_WHITELIST = 12;
|
||||
const int PRIM_MEDIA_WHITELIST_ENABLE = 11;
|
||||
const int PRIM_MEDIA_WIDTH_PIXELS = 9;
|
||||
|
||||
const int PRIM_NAME = 27;
|
||||
const int PRIM_OMEGA = 32;
|
||||
const int PRIM_PHANTOM = 5;
|
||||
const int PRIM_PHYSICS = 3;
|
||||
const int PRIM_PHYSICS_MATERIAL = 31;
|
||||
const int PRIM_PHYSICS_SHAPE_CONVEX = 2;
|
||||
const int PRIM_PHYSICS_SHAPE_NONE = 1;
|
||||
const int PRIM_PHYSICS_SHAPE_PRIM = 0;
|
||||
const int PRIM_PHYSICS_SHAPE_TYPE = 30;
|
||||
const int PRIM_POINT_LIGHT = 23;
|
||||
const int PRIM_POSITION = 6;
|
||||
const int PRIM_POS_LOCAL = 33;
|
||||
const int PRIM_ROTATION = 8;
|
||||
const int PRIM_ROT_LOCAL = 29;
|
||||
const int PRIM_SCULPT_FLAG_INVERT = 64;
|
||||
const int PRIM_SCULPT_FLAG_MIRROR = 128;
|
||||
const int PRIM_SHINY_HIGH = 3;
|
||||
const int PRIM_SHINY_LOW = 1;
|
||||
const int PRIM_SHINY_MEDIUM = 2;
|
||||
const int PRIM_SHINY_NONE = 0;
|
||||
const int PRIM_SIZE = 7;
|
||||
const int PRIM_SLICE = 35;
|
||||
const int PRIM_TEMP_ON_REZ = 4;
|
||||
const int PRIM_TEXGEN = 22;
|
||||
const int PRIM_TEXGEN_DEFAULT = 0;
|
||||
const int PRIM_TEXGEN_PLANAR = 1;
|
||||
const int PRIM_TEXT = 26;
|
||||
const int PRIM_TEXTURE = 17;
|
||||
const int PRIM_TYPE = 9;
|
||||
|
||||
const int PRIM_TYPE_BOX = 0;
|
||||
const int PRIM_TYPE_CYLINDER = 1;
|
||||
const int PRIM_TYPE_PRISM = 2;
|
||||
const int PRIM_TYPE_SPHERE = 3;
|
||||
const int PRIM_TYPE_TORUS = 4;
|
||||
const int PRIM_TYPE_TUBE = 5;
|
||||
const int PRIM_TYPE_RING = 6;
|
||||
const int PRIM_TYPE_SCULPT = 7;
|
||||
|
||||
const int PRIM_GLOW = 25;
|
||||
|
||||
const int PRIM_SCULPT_TYPE_MASK = 7;
|
||||
const int PRIM_SCULPT_TYPE_SPHERE = 1;
|
||||
const int PRIM_SCULPT_TYPE_TORUS = 2;
|
||||
const int PRIM_SCULPT_TYPE_PLANE = 3;
|
||||
const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
||||
|
||||
const int PROFILE_NONE = 0;
|
||||
const int PROFILE_SCRIPT_MEMORY = 1;
|
||||
|
||||
const int PSYS_PART_FLAGS = 0;
|
||||
const int PSYS_PART_INTERP_COLOR_MASK = 1;
|
||||
const int PSYS_PART_INTERP_SCALE_MASK = 2;
|
||||
const int PSYS_PART_BOUNCE_MASK = 4;
|
||||
const int PSYS_PART_WIND_MASK = 8;
|
||||
const int PSYS_PART_FOLLOW_SRC_MASK = 16;
|
||||
const int PSYS_PART_FOLLOW_VELOCITY_MASK = 32;
|
||||
const int PSYS_PART_TARGET_POS_MASK = 64;
|
||||
const int PSYS_PART_TARGET_LINEAR_MASK = 128;
|
||||
const int PSYS_PART_EMISSIVE_MASK = 256;
|
||||
|
||||
const int PSYS_PART_SRC_PATTERN_ANGLE = 0x04;
|
||||
const int PSYS_PART_SRC_PATTERN_ANGLE_CONE = 0x08;
|
||||
const int PSYS_PART_SRC_PATTERN_DROP = 0x01;
|
||||
const int PSYS_PART_SRC_PATTERN_EXPLODE = 0x02;
|
||||
|
||||
const int PSYS_PART_START_COLOR = 1;
|
||||
const int PSYS_PART_START_ALPHA = 2;
|
||||
const int PSYS_PART_END_COLOR = 3;
|
||||
const int PSYS_PART_END_ALPHA = 4;
|
||||
const int PSYS_PART_START_SCALE = 5;
|
||||
const int PSYS_PART_END_SCALE = 6;
|
||||
const int PSYS_PART_MAX_AGE = 7;
|
||||
|
||||
const int PSYS_SRC_ACCEL = 8;
|
||||
const int PSYS_SRC_PATTERN = 9;
|
||||
const int PSYS_SRC_INNERANGLE = 10;
|
||||
const int PSYS_SRC_OUTERANGLE = 11;
|
||||
const int PSYS_SRC_TEXTURE = 12;
|
||||
const int PSYS_SRC_BURST_RATE = 13;
|
||||
const int PSYS_SRC_BURST_PART_COUNT = 15;
|
||||
const int PSYS_SRC_BURST_RADIUS = 16;
|
||||
const int PSYS_SRC_BURST_SPEED_MIN = 17;
|
||||
const int PSYS_SRC_BURST_SPEED_MAX = 18;
|
||||
const int PSYS_SRC_MAX_AGE = 19;
|
||||
const int PSYS_SRC_TARGET_KEY = 20;
|
||||
const int PSYS_SRC_OMEGA = 21;
|
||||
const int PSYS_SRC_ANGLE_BEGIN = 22;
|
||||
const int PSYS_SRC_ANGLE_END = 23;
|
||||
|
||||
const int PSYS_SRC_PATTERN_DROP = 1;
|
||||
const int PSYS_SRC_PATTERN_EXPLODE = 2;
|
||||
const int PSYS_SRC_PATTERN_ANGLE = 4;
|
||||
const int PSYS_SRC_PATTERN_ANGLE_CONE = 8;
|
||||
const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16;
|
||||
|
||||
const int PU_EVADE_HIDDEN = 0x07;
|
||||
const int PU_EVADE_SPOTTED = 0x08;
|
||||
const int PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED = 10;
|
||||
const int PU_FAILURE_PARCEL_UNREACHABLE = 11;
|
||||
const int PU_FAILURE_INVALID_GOAL = 0x03;
|
||||
const int PU_FAILURE_INVALID_START = 0x02;
|
||||
const int PU_FAILURE_NO_VALID_DESTINATION = 0x06;
|
||||
const int PU_FAILURE_OTHER = 1000000;
|
||||
const int PU_FAILURE_TARGET_GONE = 0x05;
|
||||
const int PU_FAILURE_UNREACHABLE = 0x04;
|
||||
const int PU_GOAL_REACHED = 0x01;
|
||||
const int PU_SLOWDOWN_DISTANCE_REACHED = 0x00;
|
||||
|
||||
const int _CHANNEL = 0;
|
||||
|
||||
const int PURSUIT_FUZZ_FACTOR = 3;
|
||||
const int PURSUIT_INTERCEPT = 4;
|
||||
const int PURSUIT_OFFSET = 1;
|
||||
|
||||
const int RC_DATA_FLAGS = 2;
|
||||
const int RC_DETECT_PHANTOM = 1;
|
||||
const int RC_GET_LINK_NUM = 4;
|
||||
const int RC_GET_NORMAL = 1;
|
||||
const int RC_GET_ROOT_KEY = 2;
|
||||
const int RC_MAX_HITS = 3;
|
||||
const int RC_REJECT_AGENTS = 1;
|
||||
const int RC_REJECT_LAND = 8;
|
||||
const int RC_REJECT_NONPHYSICAL = 4;
|
||||
const int RC_REJECT_PHYSICAL = 2;
|
||||
const int RC_REJECT_TYPES = 2;
|
||||
const int RCERR_CAST_TIME_EXCEEDED = -3;
|
||||
const int RCERR_SIM_PERF_LOW = -2;
|
||||
const int RCERR_UNKNOWN = -1;
|
||||
|
||||
const int REGION_FLAG_ALLOW_DAMAGE = 1;
|
||||
const int REGION_FLAG_FIXED_SUN = 16;
|
||||
const int REGION_FLAG_BLOCK_TERRAFORM = 64;
|
||||
const int REGION_FLAG_SANDBOX = 256;
|
||||
const int REGION_FLAG_DISABLE_COLLISIONS = 4096;
|
||||
const int REGION_FLAG_DISABLE_PHYSICS = 16384;
|
||||
const int REGION_FLAG_BLOCK_FLY = 524288;
|
||||
const int REGION_FLAG_ALLOW_DIRECT_TELEPORT = 1048576;
|
||||
const int REGION_FLAG_RESTRICT_PUSHOBJECT = 4194304;
|
||||
|
||||
const int REMOTE_DATA_CHANNEL = 1;
|
||||
const int REMOTE_DATA_REQUEST = 2;
|
||||
const int REMOTE_DATA_REPLY = 3;
|
||||
|
||||
const int REQUIRE_LINE_OF_SIGHT = 2;
|
||||
|
||||
const int SIM_STAT_PCT_CHARS_STEPPED = 0;
|
||||
|
||||
const int STATUS_PHYSICS = 1;
|
||||
const int STATUS_ROTATE_X = 2;
|
||||
const int STATUS_ROTATE_Y = 4;
|
||||
const int STATUS_ROTATE_Z = 8;
|
||||
const int STATUS_PHANTOM = 16;
|
||||
const int STATUS_SANDBOX = 32;
|
||||
const int STATUS_BLOCK_GRAB = 64;
|
||||
const int STATUS_BLOCK_GRAB_OBJECT = 1024;
|
||||
const int STATUS_DIE_AT_EDGE = 128;
|
||||
const int STATUS_RETURN_AT_EDGE = 256;
|
||||
const int STATUS_CAST_SHADOWS = 512;
|
||||
const int STATUS_BOUNDS_ERROR = 1002;
|
||||
const int STATUS_INTERNAL_ERROR = 1999;
|
||||
const int STATUS_MALFORMED_PARAMS = 1000;
|
||||
const int STATUS_NOT_FOUND = 1003;
|
||||
const int STATUS_NOT_SUPPORTED = 1004;
|
||||
const int STATUS_OK = 0;
|
||||
const int STATUS_TYPE_MISMATCH = 1001;
|
||||
const int STATUS_WHITELIST_FAILED = 2001;
|
||||
|
||||
const int STRING_TRIM_HEAD = 1;
|
||||
const int STRING_TRIM_TAIL = 2;
|
||||
const int STRING_TRIM = 3;
|
||||
|
||||
// These keys can be altered at runtime for platform specific-keys, such as OpenSim
|
||||
string TEXTURE_BLANK = string("5748decc-f629-461c-9a36-a35a221fe21f");
|
||||
string TEXTURE_DEFAULT = string("89556747-24cb-43ed-920b-47caed15465f");
|
||||
string TEXTURE_PLYWOOD = string("89556747-24cb-43ed-920b-47caed15465f");
|
||||
string TEXTURE_TRANSPARENT = string("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903");
|
||||
string TEXTURE_MEDIA = string("8b5fec65-8d8d-9dc5-cda8-8fdf2716e361");
|
||||
|
||||
const int TOUCH_INVALID_FACE = -1;
|
||||
|
||||
const int TRAVERSAL_TYPE = 7;
|
||||
const int TRAVERSAL_TYPE_FAST = 1;
|
||||
const int TRAVERSAL_TYPE_NONE = 2;
|
||||
const int TRAVERSAL_TYPE_SLOW = 0;
|
||||
|
||||
const int TYPE_INTEGER = 1;
|
||||
const int TYPE_FLOAT = 2;
|
||||
const int TYPE_STRING = 3;
|
||||
const int TYPE_KEY = 4;
|
||||
const int TYPE_VECTOR = 5;
|
||||
const int TYPE_ROTATION = 6;
|
||||
const int TYPE_INVALID = 0;
|
||||
|
||||
final string URL_REQUEST_GRANTED = string("URL_REQUEST_GRANTED");
|
||||
final string URL_REQUEST_DENIED = string("URL_REQUEST_DENIED");
|
||||
|
||||
const int VEHICLE_TYPE_NONE = 0;
|
||||
|
||||
const int VEHICLE_LINEAR_FRICTION_TIMESCALE = 16;
|
||||
const int VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17;
|
||||
const int VEHICLE_LINEAR_MOTOR_DIRECTION = 18;
|
||||
const int VEHICLE_ANGULAR_MOTOR_DIRECTION = 19;
|
||||
const int VEHICLE_LINEAR_MOTOR_OFFSET = 20;
|
||||
const int VEHICLE_HOVER_HEIGHT = 24;
|
||||
const int VEHICLE_HOVER_EFFICIENCY = 25;
|
||||
const int VEHICLE_HOVER_TIMESCALE = 26;
|
||||
const int VEHICLE_BUOYANCY = 27;
|
||||
const int VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28;
|
||||
const int VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29;
|
||||
const int VEHICLE_LINEAR_MOTOR_TIMESCALE = 30;
|
||||
const int VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31;
|
||||
const int VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32;
|
||||
const int VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33;
|
||||
const int VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34;
|
||||
const int VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35;
|
||||
const int VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36;
|
||||
const int VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37;
|
||||
const int VEHICLE_BANKING_EFFICIENCY = 38;
|
||||
const int VEHICLE_BANKING_MIX = 39;
|
||||
const int VEHICLE_BANKING_TIMESCALE = 40;
|
||||
const int VEHICLE_REFERENCE_FRAME = 44;
|
||||
|
||||
const int VEHICLE_FLAG_NO_FLY_UP = 1;
|
||||
|
||||
const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1;
|
||||
const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2;
|
||||
const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4;
|
||||
const int VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 8;
|
||||
const int VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 16;
|
||||
const int VEHICLE_FLAG_HOVER_UP_ONLY = 32;
|
||||
const int VEHICLE_FLAG_LIMIT_MOTOR_UP = 64;
|
||||
const int VEHICLE_FLAG_MOUSELOOK_STEER = 128;
|
||||
const int VEHICLE_FLAG_MOUSELOOK_BANK = 256;
|
||||
const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512;
|
||||
|
||||
const int VEHICLE_TYPE_SLED = 1;
|
||||
const int VEHICLE_TYPE_CAR = 2;
|
||||
const int VEHICLE_TYPE_BOAT = 3;
|
||||
const int VEHICLE_TYPE_AIRPLANE = 4;
|
||||
const int VEHICLE_TYPE_BALLOON = 5;
|
||||
|
||||
const int VERTICAL = 0;
|
||||
|
||||
final SLFloat PI = SLFloat(3.1415926535897932384626);
|
||||
|
||||
final SLFloat TWO_PI = PI.multiply(SLFloat(2.0));
|
||||
|
||||
final SLFloat PI_BY_TWO = SLFloat(1.570796);
|
||||
|
||||
final SLFloat DEG_TO_RAD = SLFloat(0.017453);
|
||||
|
||||
final SLFloat RAD_TO_DEG = SLFloat(57.295780);
|
||||
|
||||
final SLFloat SQRT2 = SLFloat(1.414214);
|
||||
|
||||
final Key NULL_KEY = Key.NULL_KEY;
|
||||
|
||||
final Vector TOUCH_INVALID_TEXCOORD = Vector(-1.0, -1.0, 0.0);
|
||||
final Vector TOUCH_INVALID_VECTOR = Vector(0.0, 0.0, 0.0);
|
||||
|
||||
final Rotation ZERO_ROTATION = Rotation.zeroRotation;
|
||||
final Vector ZERO_VECTOR = Vector.ZERO_VECTOR;
|
105
lib/omv/types/float.dart
Normal file
105
lib/omv/types/float.dart
Normal file
|
@ -0,0 +1,105 @@
|
|||
import 'dart:math';
|
||||
|
||||
class SLFloat {
|
||||
dynamic objValue;
|
||||
|
||||
double get value {
|
||||
objValue ??= 0.0;
|
||||
return objValue;
|
||||
}
|
||||
|
||||
set value(double val) {
|
||||
objValue = val;
|
||||
}
|
||||
|
||||
SLFloat(double a) {
|
||||
objValue = a;
|
||||
}
|
||||
|
||||
SLFloat.fromString(String s) {
|
||||
final regex = RegExp(
|
||||
r'\A[ ]*(?<sign>[+-]?)'
|
||||
r'(?:'
|
||||
r'(?:'
|
||||
r'0x'
|
||||
r'(?:'
|
||||
r'(?<int>[0-9a-f]*)'
|
||||
r'(?:'
|
||||
r'(?:\.(?<frac>[0-9a-f]*))?'
|
||||
r')?'
|
||||
r'(?:p(?<exp>[-+]?[\d]*))?'
|
||||
r')?'
|
||||
r')'
|
||||
r'|'
|
||||
r'(?<dec>[\d]*[.]?[\d]*'
|
||||
r'(?:e[+-]?[\d]*)?'
|
||||
r')'
|
||||
r')',
|
||||
caseSensitive: false);
|
||||
|
||||
final match = regex.firstMatch(s);
|
||||
double mantissa = 0.0;
|
||||
|
||||
if (match?.namedGroup('dec')?.isNotEmpty ?? false) {
|
||||
mantissa = double.parse(match!.namedGroup('dec')!);
|
||||
}
|
||||
|
||||
if (match?.namedGroup('int')?.isNotEmpty ?? false) {
|
||||
mantissa = int.parse(match!.namedGroup('int')!, radix: 16).toDouble();
|
||||
|
||||
if (match.namedGroup('frac')?.isNotEmpty ?? false) {
|
||||
mantissa += int.parse(match.namedGroup('frac')!, radix: 16) /
|
||||
pow(16.0, match.namedGroup('frac')!.length);
|
||||
}
|
||||
|
||||
if (match.namedGroup('exp')?.isNotEmpty ?? false) {
|
||||
mantissa *= pow(2.0, int.parse(match.namedGroup('exp')!));
|
||||
}
|
||||
}
|
||||
|
||||
objValue = (match?.namedGroup('sign') == '-') ? -mantissa : mantissa;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => value.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => value.toStringAsFixed(6);
|
||||
|
||||
static String explicitString(SLFloat x) => x.toString();
|
||||
|
||||
static double implicitDouble(SLFloat x) => x.value;
|
||||
|
||||
static SLFloat fromStringExplicit(String s) => SLFloat.fromString(s);
|
||||
|
||||
static SLFloat fromInt(int x) => SLFloat(x.toDouble());
|
||||
|
||||
static SLFloat fromLong(int x) => SLFloat(x.toDouble());
|
||||
|
||||
static SLFloat fromDouble(double x) => SLFloat(x);
|
||||
|
||||
SLFloat multiply(SLFloat other) => SLFloat(value * other.value);
|
||||
|
||||
SLFloat divide(SLFloat other) => SLFloat(value / other.value);
|
||||
|
||||
SLFloat add(SLFloat other) => SLFloat(value + other.value);
|
||||
|
||||
SLFloat subtract(SLFloat other) => SLFloat(value - other.value);
|
||||
|
||||
SLFloat increment() => SLFloat(value + 1.0);
|
||||
|
||||
SLFloat decrement() => SLFloat(value - 1.0);
|
||||
|
||||
bool equals(SLFloat other) =>
|
||||
(value - other.value).abs() < double.minPositive;
|
||||
|
||||
bool notEquals(SLFloat other) => !equals(other);
|
||||
|
||||
int compareTo(SLFloat other) => value.compareTo(other.value);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
return other is SLFloat && equals(other);
|
||||
}
|
||||
}
|
|
@ -1,7 +1,12 @@
|
|||
class string {
|
||||
String value;
|
||||
String value = "";
|
||||
|
||||
string(this.value);
|
||||
string(dynamic value) {
|
||||
if (value is String)
|
||||
this.value = value;
|
||||
else
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// Implicit conversion from String to CustomString
|
||||
string.fromString(String s) : value = s;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: libac_dart
|
||||
description: "Aria's Creations code library"
|
||||
version: 1.2.082224+1411
|
||||
version: 1.2.082224+1433
|
||||
homepage: "https://zontreck.com"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue