25.11.2015, 15:25
(
Последний раз редактировалось codectile; 17.04.2016 в 14:18.
)
cimulator
collision detection and physics simulation
collision detection and physics simulation
cimulator is mainly focuses on server side third-party physics simulation. This plugin is purely dependent upon bullet physics library. They key features of this plugin is pretty simple, Simulation can be done with any object of Grand Theft Auto SanAndreas with a proper collision shape. SanAndreas has a world of 44759 map objects and this why the simulation uses more CPU power. Keep a track on latest commits at the github repository of cimulator. The latest version of this plugin supports server-synced simulation to avoid usage of timers, hence reduces the stress on CPU.
Showcasing Simulation
[ame="http://www.youtube.com/watch?v=BYVxElZ-FpA"]cimulator[/ame]
[ame="http://www.youtube.com/watch?v=T0ZoGjewz1w"]Stack Simulation[/ame]
Natives
Код:
native CR_EnableSimulation(); native CR_DisableSimulation(); native CR_Load(Float:worldrest = 0.0); native CR_RemoveColMap(); native CR_RemoveBuilding(modelid, Float:x, Float:y, Float:z, Float:range); native CR_SetWorldGravity(Float:x, Float:y, Float:z); native CR_GetWorldGravity(&Float:x, &Float:y, &Float:z); native CR_RayCastNormal(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3); native CR_RayCast(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3); native CR_RayCastEx(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &modelid); native CR_RayCastReflection(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:rx, &Float:ry, &Float:rz, &Float:angle); native CR_RayCastObjectInfo(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &modelid, &Float:boundingRadius, &isStatic); native CR_RayCastIntData(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &data); native CR_RayCastFloatData(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, &Float:x3, &Float:y3, &Float:z3, &Float:data); native CR_FreeMemory(); native CR_RemoveDynamicCol(index); native CR_RemoveStaticCol(index); native CR_CreateDynamicCol(objectid, modelid, Float:mass, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll, inertia = 0, tag = ACTIVE_TAG); native CR_CreateStaticCol(objectid, modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_GetDynamicColModel(index); native CR_GetStaticColModel(index); native CR_SetMass(index, Float:mass); native Float:CR_GetMass(index); native CR_SetDynamicColShape(index, modelid); native CR_SetStaticColShape(index, modelid); native CR_GetBoundingSphere(modelid, &Float:x, &Float:y, &Float:z, &Float:radius); native CR_GetAABB(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll, &Float:minx, &Float:miny, &Float:minz, &Float:maxx, &Float:maxy, &Float:maxz); native CR_GetTransform(index, &Float:x, &Float:y, &Float:z, &Float:rx, &Float:ry, &Float:rz); native CR_SetDynamicOrigin(index, Float:x, Float:y, Float:z); native CR_SetStaticOrigin(index, Float:x, Float:y, Float:z); native CR_GetDynamicOrigin(index, &Float:x, &Float:y, &Float:z); native CR_GetStaticOrigin(index, &Float:x, &Float:y, &Float:z); native CR_SetDynamicRotation(index, Float:yaw, Float:pitch, Float:roll); native CR_SetStaticRotation(index, Float:yaw, Float:pitch, Float:roll); native CR_GetDynamicRotation(index, &Float:yaw, &Float:pitch, &Float:roll); native CR_GetStaticRotation(index, &Float:yaw, &Float:pitch, &Float:roll); native CR_SetLinearVelocity(index, Float:vx, Float:vy, Float:vz); native CR_GetLinearVelocity(index, &Float:vx, &Float:vy, &Float:vz); native CR_SetAngularVelocity(index, Float:vx, Float:vy, Float:vz); native CR_GetAngularVelocity(index, &Float:vx, &Float:vy, &Float:vz); native CR_SetTorque(index, Float:tx, Float:ty, Float:tz); native CR_SetFriction(index, Float:friction); native Float:CR_GetFriction(index); native CR_SetRestitution(index, Float:rest); native Float:CR_GetRestitution(index); native CR_IsDynamicSlotUsed(index); native CR_IsStaticSlotUsed(index); native CR_IsActive(index); native CR_IsMoving(index); native CR_Activate(index); native CR_Simulator(newtime, oldtime); native CR_GetNumCollisionObject(); native CR_GetNumChildShapes(modelid); native CR_IsCompound(modelid); native CR_Wait(ms); native CR_DynamicContactTest(index); native CR_ContactTestEx(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_CharacterContactTest(Float:x, Float:y, Float:z, Float:radius, Float:height); native Float:CR_GetContactPoints(index, &Float:x1, &Float:y1, &Float:z1, &Float:x2, &Float:y2, &Float:z2); native CR_GetTimeMilliseconds(); native CR_GetDynamicColObject(index); native CR_GetStaticColObject(index); native CR_SetDynamicUserData(index, type, {Float,_}:...); native CR_SetStaticUserData(index, type, {Float,_}:...); native CR_GetDynamicInt(index, &data); native CR_GetDynamicFloat(index, &Float:data); native CR_GetStaticInt(index, &data); native CR_GetStaticFloat(index, &Float:data); native CR_GetStaticPool(); native CR_GetDynamicPool(); native Float:CR_PlacementCorrection(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_CreateVehicleCol(vehicleid, modelid, Float:x, Float:y, Float:z, Float:qx, Float:qy, Float:qz, Float:qw); native CR_RemoveVehicleCol(index); native CR_SetVehicleOrigin(index, Float:x, Float:y, Float:z); native CR_GetVehicleOrigin(index, &Float:x, &Float:y, &Float:z); native CR_SetVehicleRotation(index, Float:qx, Float:qy, Float:qz, Float:qw); native CR_GetVehicleRotation(index, &Float:qx, &Float:qy, &Float:qz, &Float:qw); native CR_GetVehicleID(index); native CR_GetVehicleModel(index); native CR_IsVehicleSlotUsed(index); native CR_VehicleContactTest(modelid, Float:x, Float:y, Float:z, Float:yaw, Float:pitch, Float:roll); native CR_GetVehiclePool(); stock CR_SetTransform(index, Float:x, Float:y, Float:z, Float:rotx, Float:roty, Float:rotz) stock CR_UpdateTransform(index) stock CR_DestroyAllColVolumes(vehicle = 0) stock CR_DestroyDynamicCol(index) stock CR_DestroyStaticCol(index) stock CR_FlushMemory() stock CR_ThrowObject(playerid, index, Float:speed) stock CR_GetForwardObjectInfo(playerid, Float:distance, &modelid, &Float:boundingRadius, &isStatic) stock CR_PlaceObjectOnGround(objectid, modelid) stock CR_FindZ_For2D(Float:x, Float:y, &Float:z)
Download
cimulator-1.09