Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build object with the SceneControl #189

Open
pas059 opened this issue Jul 20, 2020 · 0 comments
Open

build object with the SceneControl #189

pas059 opened this issue Jul 20, 2020 · 0 comments

Comments

@pas059
Copy link

pas059 commented Jul 20, 2020

Hello,

In order to translate the 3D rendering part of code of a WindowsFrom application (.Net/C#), i'm looking for a 3D sdk with a scenegraph. SharGL seems to me to contain this feature with its SceneControl. Starting from the sample SceneSample, i just tried to create an object : a cylinder + its top disk. To do this, i do:

            Cylinder cylindre = new Cylinder() { Name = "Cylindre1" };
            cylindre.BaseRadius = cylindre.TopRadius = 2;
            cylindre.Height = 2;
            Disk topDisk = new Disk() { Name = "TopDisk" };
            topDisk.OuterRadius = 2;
            topDisk.InnerRadius = 1;
            topDisk.Transformation.TranslateZ = (float)cylindre.Height;
            cylindre.Children.Add( topDisk );

            cylindre.Transformation.TranslateZ = 4;
            sceneControl1.Scene.SceneContainer.AddChild( cylindre );

Unfortunately, this gives an 'System.AccessViolationException ' during execution.
I assume i miss something, or mis understanding the usage.

Someone can help, or give a link to a sample with a basic object contruction?

regards
Pascal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant