   question regarding accessing methods from components
  First of all here is how I have my project set up:protected override void Initialize()    { graphics.IsFullScreen = true;   graphics.PreferredBackBufferWidth = 500;   graphics.PreferredBackBufferHeight = 500;    graphics.ApplyChanges();    // create components   fpsComp = new FPScounter(this);   freeCameraComp = new FreeCameraComponent(this);   terrainComp = new TerrainComponent(this);   sky = new SkyDomeComponent(this);    // register components   Components.Add(fpsComp);   Components.Add(freeCameraComp);   Components.Add(terrainComp);   Components.Add(sky);    // register services   Services.AddService(typeof(Camera), freeCameraComp.Camera);    base.Initialize();    } So each part is its own component. Here is my question. For instance lets say I want to have water that reflects the surrounding terrain. In the tutorial provided at http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Refraction_map.php in order to create the Refraction map you need to access TerrainDraw how would I access that from my Ocean Component which is out side my Terrain Component? With the camera you can access it from any component by registering it as a service is that how I would have to do it in order to access the terrain stuff and if so how would I register it as a service?   
  Do you want reflection or refraction?  They aren't the same thing.  Reflection is what makes it so you can see your mirror image in a pond, but refraction is what makes a pencil look bent or broken if you stick it halfway in some water.  I know this doesn't answer your question, but I want to make sure you aren't doing unnecessary work thinking you'll get one result when really it's another.   ;  I would like to add the water that the tutorial tells you how to do which adds both Reflection and Refraction   ;  ShaderX2 has got a complete article about this.   ;  The way to access the Terrain Component method from your Ocean Component is events or some kind of layer on top of these components...The way to do this is to actually Render the terrain to texture from a different point of view and expose this texture to the Ocean Component as Reflection is done on a skewed terrain texture.Does this help your cause?;Quote:Original post by ArmadonThe way to access the Terrain Component method from your Ocean Component is events or some kind of layer on top of these components...The way to do this is to actually Render the terrain to texture from a different point of view and expose this texture to the Ocean Component as Reflection is done on a skewed terrain texture.Does this help your cause?lol not really but thanks for trying! I was told on the XNA forum how to make the terrain a service so I believe I can do it that way.   