POST
|
Hi Tianyu, I may not be understanding your question correctly, but it sounds like it takes too long for the globe view to move between locations when you set the extent? You might be looking for the AnimationTime property off the IAGAnimationContainer interface:
ESRI.ArcGIS.GlobeCore.IGlobe pGlobe = axGlobeControl1.Globe;
ESRI.ArcGIS.Animation.IAGAnimationContainer animationContainer = pGlobe as ESRI.ArcGIS.Animation.IAGAnimationContainer;
// Values range from 1 to 10. 1 = "fast", 10 = "slow"
IStringArray stringArray = new StrArrayClass();
stringArray.Add("1");
animationContainer.AnimationTime = stringArray;
thank you for your answer!sorry about my reply!i'm sorry very much !!!
... View more
05-27-2014
04:36 AM
|
0
|
0
|
175
|
POST
|
Hi??guys I???m new in GIS??and i'm developing a desktop app with a location function. here is my code:
DateTime startTime = DateTime.Now;
IDisplay3D pDisplay = axGlobeControl1.GlobeDisplay as IDisplay3D;
ESRI.ArcGIS.GlobeCore.IGlobe pGlobe = axGlobeControl1.Globe;
ESRI.ArcGIS.GlobeCore.IGlobeDisplay pGlobeDisplay = pGlobe.GlobeDisplay;
ESRI.ArcGIS.Analyst3D.ISceneViewer pSceneViewer = pGlobeDisplay.ActiveViewer;
ESRI.ArcGIS.Analyst3D.ICamera pCamera = pSceneViewer.Camera;
ESRI.ArcGIS.GlobeCore.IGlobeCamera pGlobeCamera = (ESRI.ArcGIS.GlobeCore.IGlobeCamera)pCamera;
IPoint centerPoint = new ESRI.ArcGIS.Geometry.Point();
centerPoint.PutCoords(119.81, 37.23);
IEnvelope envelope = new EnvelopeClass();
envelope.XMin = centerPoint.X - 10;
envelope.XMax = centerPoint.X + 10;
envelope.YMin = centerPoint.Y - 10;
envelope.YMax = centerPoint.Y + 10;
//envelope.ZMin = centerPoint.Z - 10;
//envelope.ZMax = centerPoint.Z + 10;
pGlobeCamera.SetToZoomToExtents(envelope, pGlobe, pSceneViewer);
//pDisplay.FlashLocation(centerPoint);
//Add3DSymbol();
DateTime endTime = DateTime.Now;
TimeSpan timeused = endTime - startTime;
this is the layer I loaded: [ATTACH=CONFIG]31999[/ATTACH] This code worked ,but slowly ,especialy when i put a new pointcoordinates.Even 30s used!! My english is worse ,I will appreciate very much if you could help me! Thanks again!
... View more
03-06-2014
04:39 PM
|
0
|
2
|
1807
|
POST
|
Hi, this thread describes how to get the spatial reference by casting the layer to an IGeoDataset. http://forums.esri.com/Thread.asp?c=159&f=1707&t=223709 A ISurface has also a reference in its domain attribute, you can try this too. pt.SpatialReference = surface.Domain.SpatialReference I can send you my mail address as private message, but you have to enable it in your forum settings first. Hi, i have send you a message.
... View more
01-02-2013
04:10 AM
|
0
|
0
|
253
|
POST
|
Hi, I think you have to set the right spatial reference after setting the point coordinates and then project it to the reference of the scene. pt.SpatialReference = layer.SpatialReference;
pt.Project(m_sceneHookHelper.Scene.SpatialReference); hi, Thanks for your answer ,i noticed that the spatialreference property in Ilayer and IFeaturelayer is writeonly,
Public RasterLayer As IRasterLayer
Public lyr As ILayer
lyr = GetLayer(m_pDEMname)
RasterLayer = CType(lyr, IRasterLayer)
Private Function GetLayer(ByVal name As String) As ILayer
'Dim layer As ILayer
For i As Integer = 0 To m_pScene.LayerCount - 1
If m_pScene.Layer(i).Name = name Then
Return m_pScene.Layer(i)
End If
Next
Return Nothing
End Function
when i use lyr.spatialrefere or rasterlayer.spatialreference,all can't assign to pt.spatialreference,cause it's write only, so I write the code like that Dim pBasicmap As IBasicMap
'Dim ilayer As ILayer
'ilayer = CType(m_pScenecontrol.CustomProperty, ILayer)
pBasicmap = CType(m_pScenecontrol.Scene, IBasicMap)
'pBasicmap.DeleteLayer(ilayer)
pt.SpatialReference = pBasicmap.SpatialReference
pt.Project(m_pScenecontrol.Scene.SpatialReference) but the result still don't change. cause i am a newcomer ,and people around me can't do this either ,so i have to turn to you.please... with all due respect, could tell me your e-mail ,i have so many questions ...Really appreciate!
... View more
01-01-2013
05:21 PM
|
0
|
0
|
857
|
POST
|
Hi, You�??re welcome, I understand your English very well. I think you can use my method. In my application the features are points from a shapefile, but your point coordinates should do fine as well. In case a terrain is loaded, I get the height of a point in ArcScene like that: ISurface surface = �?�;
double height = surface.GetElevation(point) * surface.ZFactor; The surface I use is assigned to the shapefile layer, I guess you have already a reference to your terrain. The height can passed as z-coordinate to OpenGL: GL.glVertex3f((float) point.X, (float) point.Y, (float) height); hi, sorry about diturbing you again and again ... i have get the height in your method ,but when i pass the point to OpenGL. there is nothing on the screen... here is my code , i guess there is something wrong happened when i define the point. [ATTACH=CONFIG]20356[/ATTACH] wiould you help me have a check ? In my application , i need to input the point coordinates(which i will draw by OpenGL) from outside,so i pay so much attention to the coordinate, meanwhile , in my opinion,the coordinate system of the layer have loaded may have some influences on drawing when i pass the x- y- z- to OpenGL.Because when i load another layer,i get the coordinate like this [ATTACH=CONFIG]20357[/ATTACH] unfortunately, the OpenGL did't works hoping for your answer , thanks again!
... View more
12-31-2012
10:54 PM
|
0
|
0
|
857
|
POST
|
Hi, I use GeographicToGeocentric only in ArcGlobe, sorry for my misleading answer. In ArcScene, I just project my points to the spatial reference of the scene and pass the x- and y-coordinate to OpenGL for drawing. IGeometry geom = feature.ShapeCopy;
geom.Project(m_sceneHookHelper.Scene.SpatialReference);
IPoint point = geom as IPoint;
GL.glPointSize(15.0f);
GL.glColor3ub(255, 0, 0);
GL.glBegin(GL.GL_POINTS);
GL.glVertex3f((float)point.X, (float)point.Y, (float)0.0);
GL.glEnd(); hi�?Very appreciate for your answer!! But i still have a question ,i add a raster layer into my application,just like that. [ATTACH=CONFIG]20340[/ATTACH] 1. now i think i can't use your method ? 2.i found there is a "feature" in your code ,maybe it's useless in my application ? 3.So, how could i make it ? (i just know how to get the points' coordinates in the map(latitude,longtitude) ) . And the height of the point is important for i want to draw something along the terrain. at last ,i have to say thank you very much.cause i'm a foreigner,can't speak english very well ,so ,just forgive me ...
... View more
12-31-2012
04:31 AM
|
0
|
0
|
857
|
POST
|
Hi, this can be done with the function GeographicToGeocentric, as described on this page http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_draw_a_geographical_object_on_the_globe_using_direct_OpenGL_plug_in/0001000002vr000000/ Hi ,DO you know how to enforce the function" GeographicTO geocentric " in the scenecontrol ?Or would you tell me how to convert the geographic to geocentric coordinates in scenecontrol ?
... View more
12-29-2012
03:09 PM
|
0
|
0
|
857
|
POST
|
Hi,SOrry that i can't help you . i'am using opengl in scenecontrol recently ,i'am wondering how could you canvert a coordinate in map(geographic coordinates) to a coordinate in opengl ? waiting for your respond...
... View more
12-29-2012
03:40 AM
|
0
|
0
|
857
|
POST
|
I???m using opengl in the scenecontrol,but there is a question that i can't convert the coordinates in the map(is it called "geographic coordinates"?) to the opengl coordinates . In globecontrol i can use "geographicTogeocentric",but in scenecontrol,i really don't known... Help me ....Please ...
... View more
12-29-2012
02:53 AM
|
0
|
0
|
1276
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|