11-02-2021, 10:03 PM
I'm a using ModelDecorator3D created via code as follows:
decorator = new ModelDecoratorVisual3D()
{
ShowBoundingBox = true,
BoundingBoxLineColor = Colors.Red,
BoundingBoxLineThickness = 2,
ShowNormals = true,
NormalsLineColor = Colors.Blue,
NormalsLineThickness = 2,
NormalsLineLength = 200,
ShowTriangles = true,
TrianglesLineColor = Colors.Green,
TrianglesLineThickness = 2,
};
I'm assigning TargetModel3D my Model3D (loaded from STL, if that matters), but all I get is the bounding box. I've found other examples on how to do the normals and the wireframe, but it would be nice to be able to just toggle these 3 visuals on/off via a single object, rather than need to manage each thing separately.
Second, somewhat related question: I'm experimenting with Ab3d.Models.WireframeFactory.CreateNormals for displaying normals (which is not something I need on the screen all that often) and it's abysmally slow creating the normals and also navigating the scene. I'm assuming that it's related to my triangle count, which is about 715K right now, but some models are > 3M triangles. Any way I can speed this up?
Any suggestions?
decorator = new ModelDecoratorVisual3D()
{
ShowBoundingBox = true,
BoundingBoxLineColor = Colors.Red,
BoundingBoxLineThickness = 2,
ShowNormals = true,
NormalsLineColor = Colors.Blue,
NormalsLineThickness = 2,
NormalsLineLength = 200,
ShowTriangles = true,
TrianglesLineColor = Colors.Green,
TrianglesLineThickness = 2,
};
I'm assigning TargetModel3D my Model3D (loaded from STL, if that matters), but all I get is the bounding box. I've found other examples on how to do the normals and the wireframe, but it would be nice to be able to just toggle these 3 visuals on/off via a single object, rather than need to manage each thing separately.
Second, somewhat related question: I'm experimenting with Ab3d.Models.WireframeFactory.CreateNormals for displaying normals (which is not something I need on the screen all that often) and it's abysmally slow creating the normals and also navigating the scene. I'm assuming that it's related to my triangle count, which is about 715K right now, but some models are > 3M triangles. Any way I can speed this up?
Any suggestions?