Hello.
I would like to position com.sun.j3d.utils.geometry.Primitive
(for example Cylinder) in already existing coordinate system.
What I mean - set the X,Y,Z for example to Cylinder center.
Is that possiible?
Thank you for help.
> Hello.
> I would like to position com.sun.j3d.utils.geometry.Primitive
> (for example Cylinder) in already existing coordinate system.
> What I mean - set the X,Y,Z for example to Cylinder center.
> Is that possiible?
> Thank you for help.
I can see just one way:
Point3d center = new Point3d(X, Y, Z);
BoundingSphere boundingSphere = new BoundingSphere(center,
radiusHeight);
Appearance appearance = new Appearance();
Material material = new Material();
appearance.setMaterial(material);
Cylinder cylinder = new Cylinder(radius, radiusHeight,
Primitive.GENERATE_NORMALS, appearance);
boundingSphere.combine(cylinder);
Now the question...
If the Cylinder bigger than BoundingSphere ( radiusHeight has the same
value,
and radius of cylinder bigger than radiusHeight ) did the combine
result
has BoundingSphere and Cylinder,... another words Cylinder which
include
BoundingSphere, and centered in coordinate system by center of
BoundingSphere.
Thank you for help.
ZAV.
azinatullin@yahoo.com - 18 Mar 2005 15:48 GMT
azinatul...@yahoo.com wrote:
> > Hello.
> > I would like to position com.sun.j3d.utils.geometry.Primitive
[quoted text clipped - 26 lines]
> Thank you for help.
> ZAV.
Sorry under boundingSphere.combine(cylinder) I mean
boundingSphere.combine(cylinder.getShape(Cylinder.BODY).getBounds()).
Thanks again.
ZAV.
azinatullin@yahoo.com - 30 Mar 2005 15:51 GMT
Hello again.
One more time...
May be anybody can give me the
answers to my questions?
Thanks again.
ZAV.