Hi,
This is my last stuff. WIP ![]()
This library is multi-core (OpenMP). Place VCOMP100.DLL and RVODLL.dll in the Windows\system32 folder
The orginal video and web site
http://gamma.cs.unc.edu/RVO2/
http://gamma.cs.unc.edu/CA/
My Blitz3D version Video : http://www.youtube.com/watch?v=-1On2Kzb6FM
Iām working on some Unity3D demo ![]()
Win32 Standalone. Unity 2.6.1 PRO and Indie.
Unity 3 PRO only. System.Runtime.InteropServices is deactivate in the free version.
:evil: :evil: As far i know, this is the ONLY development tool under Windows (2d or 3d, Free or Not), which does not allow access to native DLLs.:evil: :evil: Mesquinerie !!!
//***************************************************************************
// RVO2 Library: Reciprocal Collision Avoidance DLL (c) ZJP //
//***************************************************************************
using UnityEngine;
using System;
using System.Collections;
using System.Runtime.InteropServices;
public class RVO_DLL : MonoBehaviour
{
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setTimeStep@4")] private static extern void RVO_setTimeStep(float RVOTime);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setAgentDefaults@24")]private static extern void RVO_setAgentDefaults(float neighborDist,
int maxNeighbors,float timeHorizon,
float timeHorizonObst,float radius,float maxSpeed);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_addAgent@16")] private static extern int RVO_addAgent(float PosX,float PosZ,float GoalX,float GoalZ);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getGlobalTime@0")] private static extern float RVO_getGlobalTime();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getNumAgents@0")] private static extern int RVO_getNumAgents();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getAgentPositionX@4")] private static extern float RVO_getAgentPositionX(int agent);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getAgentPositionZ@4")] private static extern float RVO_getAgentPositionZ(int agent);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_open@0")] private static extern void RVO_open();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_close@0")] private static extern void RVO_close();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_Update@0")] private static extern void RVO_Update();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_Update2@0")] private static extern void RVO_Update2();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getReachedGoal@4")] private static extern int RVO_getReachedGoal(float radius);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setObstacleVerticle@12")] private static extern void RVO_setObstacleVerticle(int obstacle,float VerticleX,float VerticleZ);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_addObstacle@4")] private static extern void RVO_addObstacle(int obstacle);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_processObstacles@0")] private static extern void RVO_processObstacles();
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setAgentGoalPosition@12")] private static extern void RVO_setAgentGoalPosition(int agent,float GoalPX,float GoalPZ);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getGoalPositionX@4")] private static extern float RVO_getGoalPositionX(int agent);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_getGoalPositionZ@4")] private static extern float RVO_getGoalPositionZ(int agent);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setAgentPosition@12")] private static extern void RVO_setAgentPosition(int agent, float PosX, float PosZ);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setAgentVelocity@12")] private static extern void RVO_setAgentVelocity(int agent, float VelX, float VelZ);
[DllImport ("RVODLL.dll", EntryPoint="_RVO_setAgentRadius@8")] private static extern void RVO_setAgentRadius(int agent, float radius);
void Start ()
{
RVO_open();
}
void OnDisable()
{
RVO_close();
}
}
Edit :
Need these DLLs
Package redistribuable Microsoft Visual C++ 2010 (x86) OS 32bit - 4.6Mo
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
Package redistribuable Microsoft Visual C++ 2010 (x64) OS 64bit - 5.5Mo
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=bd512d9e-43c8-4655-81bf-9350143d5867
Brief Description
The Microsoft Visual C++ 2010 Redistributable Package installs runtime components of Visual C++ Libraries
required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2010 installed.
393484ā13504ā$rvo_unity_dll_141.rar (40.8 KB)