| 262 |
// |
// |
| 263 |
cam = new Camera(smgr); |
cam = new Camera(smgr); |
| 264 |
|
|
| 265 |
smgr.SetAmbientLight(new Colorf(0, 0.5f, 0.5f, 0.5f)); |
smgr.VideoDriver.AmbientLight = new Color(255, 128, 128, 128); |
| 266 |
|
|
| 267 |
|
|
| 268 |
//AnimatedMesh mesh = smgr.GetMesh("sydney.md2"); |
//AnimatedMesh mesh = smgr.GetMesh("sydney.md2"); |
| 269 |
//AnimatedMeshSceneNode node99 = smgr.AddAnimatedMeshSceneNode(mesh); |
//AnimatedMeshSceneNode node99 = smgr.AddAnimatedMeshSceneNode(mesh); |
| 488 |
{ |
{ |
| 489 |
|
|
| 490 |
TextureComplete tx; |
TextureComplete tx; |
| 491 |
Texture tex = null; |
TextureExtended tex = null; |
| 492 |
|
|
| 493 |
lock (assignTextureQueue) |
lock (assignTextureQueue) |
| 494 |
{ |
{ |
| 496 |
break; |
break; |
| 497 |
|
|
| 498 |
tx = assignTextureQueue.Dequeue(); |
tx = assignTextureQueue.Dequeue(); |
| 499 |
tex = driver.GetTexture(tx.texture); |
tex = (TextureExtended)driver.GetTexture(tx.texture); |
| 500 |
} |
} |
| 501 |
|
|
| 502 |
if (tx.node != null && tex != null) |
if (tx.node != null && tex != null) |
| 620 |
node = vObj.node; |
node = vObj.node; |
| 621 |
} |
} |
| 622 |
|
|
| 623 |
|
Mesh avmeshmesh = avmesh.GetMesh(0); |
| 624 |
|
|
| 625 |
|
|
| 626 |
node.Scale = new Vector3D(0.035f, 0.035f, 0.035f); |
node.Scale = new Vector3D(0.035f, 0.035f, 0.035f); |
| 1030 |
} |
} |
| 1031 |
else |
else |
| 1032 |
{ |
{ |
| 1033 |
|
|
| 1034 |
vobj.updateFullYN = true; |
vobj.updateFullYN = true; |
| 1035 |
enqueueVObject(vobj); |
enqueueVObject(vobj); |
| 1036 |
} |
} |
| 1037 |
} |
} |
| 1038 |
|
} |
| 1039 |
|
|
| 1040 |
|
public void doAnimationFrame() |
| 1041 |
|
{ |
| 1042 |
|
lock (Avatars) |
| 1043 |
|
{ |
| 1044 |
|
foreach (UUID avatarID in Avatars.Keys) |
| 1045 |
|
{ |
| 1046 |
|
VObject avobj = Avatars[avatarID]; |
| 1047 |
|
|
| 1048 |
|
if (avobj.prim.ID.ToString().Contains("dead")) |
| 1049 |
|
continue; |
| 1050 |
|
|
| 1051 |
|
if (avobj.mesh != null) |
| 1052 |
|
{ |
| 1053 |
|
|
| 1054 |
|
} |
| 1055 |
} |
} |
| 1056 |
|
} |
| 1057 |
|
} |
| 1058 |
|
|
| 1059 |
#endregion |
#endregion |
| 1060 |
|
|
| 1061 |
|
|
| 2047 |
|
|
| 2048 |
Vector3D collisionpoint = new Vector3D(0, 0, 0); |
Vector3D collisionpoint = new Vector3D(0, 0, 0); |
| 2049 |
Triangle3D tri = new Triangle3D(0, 0, 0, 0, 0, 0, 0, 0, 0); |
Triangle3D tri = new Triangle3D(0, 0, 0, 0, 0, 0, 0, 0, 0); |
| 2050 |
SceneNode node = smgr.CollisionManager.GetSceneNodeFromScreenCoordinates(new Position2D(p_event.MousePosition.X, p_event.MousePosition.Y), 0, false); |
SceneNode node = smgr.CollisionManager.GetSceneNodeFromRay(projectedray, 0x0128, true); //smgr.CollisionManager.GetSceneNodeFromScreenCoordinates(new Position2D(p_event.MousePosition.X, p_event.MousePosition.Y), 0, false); |
| 2051 |
if (node == null) |
if (node == null) |
| 2052 |
{ |
{ |
| 2053 |
m_log.Warn("[PICKER]: Picked null"); |
m_log.Warn("[PICKER]: Picked null"); |
| 2059 |
{ |
{ |
| 2060 |
if (smgr.CollisionManager.GetCollisionPoint(projectedray, mts, out collisionpoint, out tri)) |
if (smgr.CollisionManager.GetCollisionPoint(projectedray, mts, out collisionpoint, out tri)) |
| 2061 |
{ |
{ |
| 2062 |
|
|
| 2063 |
//if (collisionpoint != null) |
//if (collisionpoint != null) |
| 2064 |
//{ |
//{ |
| 2065 |
//m_log.DebugFormat("Found point: <{0},{1},{2}>", collisionpoint.X, collisionpoint.Y, collisionpoint.Z); |
//m_log.DebugFormat("Found point: <{0},{1},{2}>", collisionpoint.X, collisionpoint.Y, collisionpoint.Z); |