mirror of
https://github.com/opensim/opensim.git
synced 2026-05-30 22:37:13 +08:00
To use, see the appearance section in opensim.ini.example, set "persist = true", then add the correct connection string for your database.(see mysql-AvatarAppearance.sql in share folder for a example of the table mysql table structure). This could possible be used in a very small grid, but would mean each region server would need to connect to the same mysql database. But the work to move the code to one of the grid servers shouldn't be too much.
43 lines
945 B
C#
43 lines
945 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Text;
|
|
using libsecondlife;
|
|
|
|
|
|
using TribalMedia.Framework.Data;
|
|
|
|
namespace OpenSim.Framework.Data
|
|
{
|
|
public class OpenSimDataReader : BaseDataReader
|
|
{
|
|
public OpenSimDataReader(IDataReader source) : base(source)
|
|
{
|
|
}
|
|
|
|
public LLVector3 GetVector(string s)
|
|
{
|
|
float x = GetFloat(s + "X");
|
|
float y = GetFloat(s + "Y");
|
|
float z = GetFloat(s + "Z");
|
|
|
|
LLVector3 vector = new LLVector3(x, y, z);
|
|
|
|
return vector;
|
|
}
|
|
|
|
public LLQuaternion GetQuaternion(string s)
|
|
{
|
|
float x = GetFloat(s + "X");
|
|
float y = GetFloat(s + "Y");
|
|
float z = GetFloat(s + "Z");
|
|
float w = GetFloat(s + "W");
|
|
|
|
LLQuaternion quaternion = new LLQuaternion(x, y, z, w);
|
|
|
|
return quaternion;
|
|
}
|
|
}
|
|
}
|
|
|