cylinders

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



how do you use the Mesh.Cylinder and then align the mesh between two
known points??? I have been struggling with this for about a week. I
think I am making it hard than it is. Below is my code:

//Create the Mesh
bb = new Mesh[MC[TC.SelectedIndex].bc.Count];//set it to final will
change when setting color
foreach (Bond bt in m.bc)
{
if (bt.BondType == BondType.S)//single bonds
{
Mesh hg = Mesh.Cylinder(device, bt.BondRadius/2, bt.BondRadius/2,
bt.RenderDistance, 10, 10+count);
bt.BondMesh = hg;
bb.SetValue(hg, count);
}
count++;
}
//draw the mesh
Matrix mainM = Matrix.Identity;
Rotato.RotateY(by);
Rotato.RotateX(bx);
device.Transform.World = mainM * Rotato * Matrix.Translation(bo);

any help at all will be much appreciated

Thanks,
JC

.



Relevant Pages

  • Radial Features
    ... I am struggling to figure out how to make features radially (extrusions & cuts). ... I am working with cylindrical parts that must mesh with each other in a cam/gear like mechanism. ...
    (comp.cad.solidworks)
  • Re: OpenMesh - Has anybody got any experience using this library?
    ... > really struggling with performing a simple problem with openMesh. ... > to remove a set of vertices from a mesh, ... > collapse but I am struggling to make it work. ...
    (comp.graphics.api.opengl)
  • OpenMesh - Has anybody got any experience using this library?
    ... I am really struggling with performing a simple problem with openMesh. ... I want to remove a set of vertices from a mesh, such that the mesh remains valid. ... I know that the best way of achieving this is using an edge collapse but I am struggling to make it work. ...
    (comp.graphics.api.opengl)
  • Re: simple texture help
    ... So as that dialog shows you there are no texture coordinates in the mesh. ... Your mesh is too complex to mathematically guess how to align it so your ... Do you have a link for crossroads, all the links I can find point to ...
    (microsoft.public.win32.programmer.directx.managed)