Skip to main content

Accessing vertices to make shape changes

1 reply [Last post]
mjfabian
Offline
Joined: 2009-03-25

Hello,

I am trying to make a program where you can take 3D geometry and say, apply a bend to it. The ultimate goal of the program would be something where the user can specify how much of a bend to give the object.

After much googling, the only solution I can find is to use the morph behavior and morph between a straight and bent version of the same object, but this isn't quite what I wanted.

Is there anyway to access the vertex information of a shape3D object so that I can do some math, figure out the new vertex locations, and then set them? Isn't this what the morph behavior is essentially doing?

Thanks in advance,
Matt

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
interactivemesh
Offline
Joined: 2006-06-07

Hi,

have a look at the source code of the inner class [b]DistortBehavior[/b] in 'DistortStringReflection.java'. Download the sample DistortStringReflection from http://www.interactivemesh.org/testspace/j3dmeetsswing.html.

August