Magnetic lines


Jump to: navigation, search

This example shows the use of MagneticSurface.

Image:Note-tip.pngThis tutorial refers to the source code. You can download it from SVN at H3D release branch, or find it at H3D/H3DAPI/examples/magneticlines.
<!!-- magneticlines.x3d -->
      <Material emissiveColor="1 0 0"/>
      <MagneticSurface />
    <LineSet vertexCount="4">
      <Coordinate point="0.1 0.1 0, 0.1 -0.1 0, -0.1 -0.1 0, -0.1 0.1 0"/>
      <HapticsOptions maxDistance="0.15" />

We create a Shape with LineSet to model the lines in our program. To simulate magnetic lines, we merely add the MagneticSurface node in Appearance.


Personal tools
go to