| 48 |
public static DependencyProperty depIdentity = DependencyProperty.Register("ID", typeof(uint), typeof(Visual3D)); |
public static DependencyProperty depIdentity = DependencyProperty.Register("ID", typeof(uint), typeof(Visual3D)); |
| 49 |
public static DependencyProperty depPosition = DependencyProperty.Register("Position", typeof(Vector3), typeof(Visual3D)); |
public static DependencyProperty depPosition = DependencyProperty.Register("Position", typeof(Vector3), typeof(Visual3D)); |
| 50 |
|
|
| 51 |
private int EnvirementCircleLength = 300; |
private int EnvirementCircleLength = References.EnvironmentSettings.EnvirementCircleLength; |
| 52 |
|
|
| 53 |
private GridClient gridClient; |
private GridClient gridClient; |
| 54 |
|
|
| 95 |
m_cameracontrol.EventSource = m_viewport; |
m_cameracontrol.EventSource = m_viewport; |
| 96 |
m_HotkeyDispatcher.EventSource = m_viewport; |
m_HotkeyDispatcher.EventSource = m_viewport; |
| 97 |
|
|
| 98 |
m_cameracontrol.OnCameraPositionChanged += new CamPositionChanged(m_cameracontrol_cameraPositionChanged); |
//m_cameracontrol.OnCameraPositionChanged += new CamPositionChanged(m_cameracontrol_cameraPositionChanged); |
| 99 |
|
avatarManager.OnAvatarPosChanged += new AvatarPositionChanged(avatarManager_OnAvatarPosChanged); |
| 100 |
|
|
| 101 |
|
|
| 102 |
GradientBrush terGrad = new RadialGradientBrush(Colors.ForestGreen, Colors.SandyBrown); |
GradientBrush terGrad = new RadialGradientBrush(Colors.ForestGreen, Colors.SandyBrown); |
| 103 |
m_terrainMaterial = new DiffuseMaterial( |
m_terrainMaterial = new DiffuseMaterial( |
| 139 |
// material)); |
// material)); |
| 140 |
} |
} |
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
public IRendering Mesher |
public IRendering Mesher |
| 145 |
{ |
{ |
| 146 |
set { m_mesher = value; } |
set { m_mesher = value; } |
| 734 |
); |
); |
| 735 |
} |
} |
| 736 |
|
|
| 737 |
void m_cameracontrol_cameraPositionChanged(Point3D oldpos, Point3D newpos) |
void avatarManager_OnAvatarPosChanged(uint avatarid, Point3D oldpos, Point3D newpos, Vector3D avatarlookdirection) |
| 738 |
{ |
{ |
| 739 |
ShowModelAround(newpos, this.EnvirementCircleLength); |
ShowModelAround(newpos, this.EnvirementCircleLength); |
| 740 |
|
//CameraCollisionDetection(oldpos,newpos); |
|
CameraCollisionDetection(oldpos,newpos); |
|
| 741 |
} |
} |
| 742 |
|
|
| 743 |
|
|
| 744 |
Point3D? meshToHit; |
Point3D? meshToHit; |
| 745 |
private void CameraCollisionDetection(Point3D oldpos, Point3D newpos) |
private void CameraCollisionDetection(Point3D oldpos, Point3D newpos) |
| 746 |
{ |
{ |