2016-04-22 6 views
0

x3domを使用してx3dファイルを作成しました。以下はファイルの構造です。次のコードをテキストエディタにコピーし、.x3dファイルとして保存します。あなたは任意のjpgファイルを考慮してx3dと同じ場所に置くことができます。 3Dオブジェクトは、次のようになります enter image description hereIndexedFaceSetはx3dファイルに余分な面を作成します

そして底面図から、それはこのようになり、トップビューからそれを探し

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"  
"http://www.web3d.org/specifications/x3d-3.0.dtd"> 
<X3D profile='Interchange' version='3.0'  
xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' 
xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.0.xsd'> 
<Scene> 
    <NavigationInfo type='"EXAMINE" "WALK" "FLY" "ANY"'/> 
    <DirectionalLight intensity="0.8" direction="0 1 0"/> 
    <DirectionalLight intensity="0.9" direction="0 -1 0"/> 
    <DirectionalLight intensity="0.6" direction="1 0 -1"/> 
    <DirectionalLight intensity="0.6" direction="-1 0 -1"/> 
    <DirectionalLight intensity="0.6" direction="-1 0 1"/> 
    <DirectionalLight intensity="0.6" direction="1 0 1"/> 
    <Shape> 
     <Appearance> 
     <Material ambientIntensity="0.2" diffuseColor="0.004 0.004 0.004" emissiveColor="0 0 0" shininess="0.2" specularColor="0 0 0" transparency="0"/> 
     <ImageTexture url="Penguins.jpg"/> 
     </Appearance> 
    <IndexedFaceSet convex="true" coordIndex="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 -1 " ccw="true"> 
     <Coordinate point="132.2349 0 329.9732 123.0347 0 336.9273 109.9391 0 350.0229 102.985 0 359.223 82.26761 0 386.6317 69.30841 0 436.438 74.03987 0 470.4683 78.77134 0 504.4987 104.8261 0 548.8805 132.2349 0 569.598 191.8598 0 569.598 191.8598 0 689.9727 911.8589 0 689.9727 1032.234 0 569.598 1032.234 0 270.3483 852.2339 0 270.3483 852.2339 0 210.7232 371.8596 0 210.7232 371.8596 0 329.9732"/> 
    </IndexedFaceSet> 
    </Shape> 
    <Viewpoint description="Center of Space" fieldOfView="0.785" position="553.1368 60 450.348"/> 
</Scene> 
</X3D> 

enter image description here

私はすべての点をチェックし、彼らしていますこれらの2つの余分な顔がなぜ作成されるのかは不明です。ここで間違っていることは何ですか?

答えて

0

凸でない形状を描くので、convexをfalseに設定する必要があります。また、シェイプを後ろから見たい場合は、ソリッドをfalseに設定する必要があります。

これは動作します:

<IndexedFaceSet convex="false" solid="false" coordIndex="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 -1"> 

(デフォルトでその真、CCWを必要といけない)

関連する問題