decompose Inventor Object into triangles

decompose Inventor Object into triangles

Post by Vivi » Thu, 26 Jun 2003 04:26:29



Hi, Experts:

I am not satisfied with Open Inventor's collision test, it is not
quick enough. I found a collision detection package, which require
triangles as input.

I wonder how can I get the triangles of an Open Inventor Object, say
SoShpere, SoCube and combination of them?
I need the 3 point vectors of each triangle, similar with Face Set in
Inventor.

I am using Open Inventor 3.0 from TGS in Windows.

Thank you very much.
Vivid

 
 
 

decompose Inventor Object into triangles

Post by Mike He » Thu, 26 Jun 2003 14:07:12



> I am not satisfied with Open Inventor's collision test, it is not
> quick enough. I found a collision detection package, which require
> triangles as input.

> I wonder how can I get the triangles of an Open Inventor Object, say
> SoShpere, SoCube and combination of them?
> I need the 3 point vectors of each triangle, similar with Face Set in
> Inventor.

Create an instance of SoCallbackAction, set a triangle callback
then apply the action to your scene graph (or portion of the
scene graph). The callback will be called once for each triangle.
Unfortunately you have to detect shared vertices yourself (if
that matters).

-Mike
 TGS Inc, http://www.tgs.com

 
 
 

decompose Inventor Object into triangles

Post by Orca » Fri, 27 Jun 2003 22:09:44




Quote:> Create an instance of SoCallbackAction, set a triangle callback
> then apply the action to your scene graph (or portion of the
> scene graph). The callback will be called once for each triangle.
> Unfortunately you have to detect shared vertices yourself (if
> that matters).

Be careful if you have an instance of SoIndexedTriangleStripSet. With my
copy of TGS Inventor 3.0 on Windows, the vertex ordering for the triangles
is kept the same as they are sent to the hardware, which in turn is
incorrect for rendering individual triangles. Checking the callback
action's SoShapeHints::VertexOrdering within the triangle callback doesn't
help. The resulting individual triangles have different vertex
ordering--the first triangle in a strip is clockwise, the next is
counter-clockwise, then clockwise, and so on. The end result is a triangle
mesh in which every other triangle is facing the wrong way.

Using a triangle callback should to my understanding return
consistently-ordered triangles based on the current vertex ordering.
Leaving the programmer to manage this by manually processing a triangle
strip defeats the purpose of using a triangle callback in the first place.

Chris
--
 --

Scherver

 
 
 

1. Decomposing a complex 3d-object into convex objects?

My situation is this:

I have written a 3d-engine capable of rendering polygon objects. Instead of
sorting all polygons of an object, or using BSP-trees, I have devised an
alternate tree. I'm still rendering my scenes using the painters' algorithm.

To use this tree an object needs to made up of convex bodies, but that is no
problem in my case.

Traversing the tree gives me the correct drawing order of all convex bodies
of the object and voila, I can begin drawing it. The nodes of the tree
consist of all the planes where convex parts of the object are attached to
each other. The tree has a number of outcomes that equal the number of
possible drawing orders of the convex parts that the object has.

The only problem is: There's no 3d-editor that can make me my tree. So, I
can write my own editor (err, NOT!) or design objects as convex parts and
combine them afterwards (also not very easy), or I can try to determine (by
means of an algorithm) to decompose the object into convex parts.

What I am actually looking for right now is this:

Given an object consisting of multiple convex parts (all made of
polygons):

If I select a single polygon, I want the algorithm to determine all other
polygons that belong to the same convex part.

In the most ideal case, if a closed convex part does not exist containing
that polygon, I would like the algorithm to give all the polygons that could
make up a convex part, if one or more polygons were added to close the gap.

Example:

Suppose I have a convex part consisting of six polygons that form a cube.
If I select on one of the six polygons, I want the other five to be returned
by the algorithm.

Suppose I have a cube, but one side is not defined as a polygon (because for
example the cube is attached to another (bigger) surface on that side).
If I select one of the of the five (defined) polygons of the 'cube', I want
the algorithm to return the other four.

So my question is:  Does such an algorithm exist?

If so: where can I find it?
If not: Have you got any idea how I could do this?

Feel free to ask if my explanation is not clear enough (I'm not sure I can
understand it).

Any help is greatly appreciated.

                                George van Venrooij

2. My Pants Are the Wrong Color!

3. Inventor; SoRayPickAction trough one triangle inside an object

4. 3dsmax network connection (TCP/IP) problem..I don't want it.

5. REQUEST: Code to decompose arbitrary polygons into triangles

6. ******** INDEO ********

7. Decomposing Concave Objects.

8. (07sep91) Frequently asked questions - READ THIS BEFORE YOU POST.

9. Missing triangles when object passes in front of another object

10. Inventor Object -> GL Object

11. Open Inventor - Traversing Indexed Triangle Strips?

12. Displaying Triangle meshes in Open Inventor