easy to answer questions

May 9, 2012 at 10:21 PM

Hi,

What is the command to turn off the red cubes in 'SceneSample'? 

 

What is the command to change an object to another color (in the same sample program)?

It used to be something like this:

sphere.Material.Emission = Color.FromArgb(255, Color.LightGreen);

But this throws an error.

 

What is the method to move the entire image around, it used to be: 

this.sceneControl1.Mouse = SharpGL.SceneGraph.MouseOperation.Translate;

 

Not sure what to do now...

Thanks,

~Shane

May 9, 2012 at 10:30 PM

Here is the answer to the first question:

            this.sceneControl1.Scene.RenderBoundingVolumes = false;

May 9, 2012 at 10:53 PM

Here is the answer to the second question:

			    SharpGL.SceneGraph.Quadrics.Sphere sphere = new SharpGL.SceneGraph.Quadrics.Sphere();
                SharpGL.SceneGraph.Assets.Material material = new SharpGL.SceneGraph.Assets.Material();

                material.Ambient = Color.FromArgb(255, Color.Red);

                sphere.Material = material;

 

May 10, 2012 at 2:56 PM

Also what happened to this command:

            this.sceneControl1 .ShowHandOnHover = true;

It is gone in the new version :-(

sad day...

~Shane

May 30, 2012 at 4:52 AM

I've try your code but is not work

SharpGL.SceneGraph.Quadrics.Sphere sphere = new SharpGL.SceneGraph.Quadrics.Sphere();
SharpGL.SceneGraph.Assets.Material material = new SharpGL.SceneGraph.Assets.Material();                
material.Ambient = Color.FromArgb(255, Color.Red);                
sphere.Material = material;
 
sphere.Material is not exist in the current context
How i can solve this?
Thanks
Coordinator
May 30, 2012 at 6:45 AM

Try using the very latest code, download the source and build it - the code above will not work till I republish the latest sharpgl binaries

May 30, 2012 at 7:42 AM

I've try it too
if the code above will not work, how I add a texture to a sphere object?