Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mir
Visualization
Commits
89deb070
Commit
89deb070
authored
3 years ago
by
Mandic
Browse files
Options
Download
Email Patches
Plain Diff
Update ifsandmaterial.html
parent
2c843732
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/X3DOMTutorial/ifsandmaterial.html
+117
-104
public/X3DOMTutorial/ifsandmaterial.html
with
117 additions
and
104 deletions
+117
-104
public/X3DOMTutorial/ifsandmaterial.html
+
117
-
104
View file @
89deb070
<html>
<html>
<head>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
indexed face set and material
</title>
<title>
indexed face set and material
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"x3dom.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"x3dom.css"
>
</link>
</link>
</head>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/vs.min.css"
>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"
></script>
<body>
<script>
hljs
.
highlightAll
();
</script>
<h1>
indexed face set and material
</h1>
</head>
<table
width=
"100%"
height=
"85%"
border=
"0"
>
<tr>
<body>
<td
width=
"50%"
align=
"center"
valign=
"top"
scope=
"col"
>
<h1>
indexed face set and material
</h1>
<X3D
id=
"shapedata"
width=
"600px"
height=
"600px"
style=
"float:left"
>
<table
width=
"100%"
height=
"85%"
border=
"0"
>
<Scene>
<tr>
<Shape>
<td
width=
"50%"
align=
"center"
valign=
"top"
scope=
"col"
>
<!-- roof -->
<X3D
id=
"shapedata"
width=
"600px"
height=
"600px"
style=
"float:left"
>
<Appearance>
<Scene>
<Material
diffuseColor=
"0.980, 0.502, 0.447"
>
</Material>
<Shape>
</Appearance>
<!-- roof -->
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 7 4 8 -1 4 5 8 -1 5 6 8 -1 6 7 8 -1"
>
<Appearance>
<Coordinate
DEF=
"pointset"
point=
"-1 0 1, 1 0 1, 1 0 -1, -1 0 -1,
<Material
diffuseColor=
"0.980, 0.502, 0.447"
>
</Material>
-1 2 1, 1 2 1, 1 2 -1, -1 2 -1, 0 3 0 "
>
</Appearance>
</Coordinate>
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 7 4 8 -1 4 5 8 -1 5 6 8 -1 6 7 8 -1"
>
</IndexedFaceSet>
<Coordinate
DEF=
"pointset"
point=
"-1 0 1, 1 0 1, 1 0 -1, -1 0 -1,
</Shape>
-1 2 1, 1 2 1, 1 2 -1, -1 2 -1, 0 3 0 "
>
<Shape>
</Coordinate>
<!-- wall -->
</IndexedFaceSet>
<Appearance>
</Shape>
<Material
diffuseColor=
"0.753, 0.753, 0.753"
>
</Material>
<Shape>
</Appearance>
<!-- wall -->
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1"
>
<Appearance>
<Coordinate
USE=
"pointset"
>
<Material
diffuseColor=
"0.753, 0.753, 0.753"
>
</Material>
</Coordinate>
</Appearance>
</IndexedFaceSet>
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1"
>
</Shape>
<Coordinate
USE=
"pointset"
>
<Shape>
</Coordinate>
<!-- ground -->
</IndexedFaceSet>
<Appearance>
</Shape>
<Material
diffuseColor=
"0.180, 0.280, 0.230"
>
</Material>
<Shape>
</Appearance>
<!-- ground -->
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 0 3 2 1 -1 "
>
<Appearance>
<Coordinate
USE=
"pointset"
>
<Material
diffuseColor=
"0.180, 0.280, 0.230"
>
</Material>
</Coordinate>
</Appearance>
</IndexedFaceSet>
<IndexedFaceSet
solid=
"true"
ccw=
"true"
coordIndex=
" 0 3 2 1 -1 "
>
</Shape>
<Coordinate
USE=
"pointset"
>
</Scene>
</Coordinate>
</X3D>
</IndexedFaceSet>
</td>
</Shape>
<td
width=
"50%"
align=
"left"
valign=
"top"
scope=
"col"
>
</Scene>
One shape has only ony appearance. If different colors for the building elements roof, wall and ground surfaces
</X3D>
shall be used,
</p>
we need to have different shape for these elements. However, they can share the same point set. The following
</td>
example uses different
<td
width=
"50%"
align=
"left"
valign=
"top"
scope=
"col"
>
Material for roo, wall, and ground surfaces.
One shape has only ony appearance. If different colors for the building elements roof, wall and ground surfaces
<br>
shall be used,
<pre
class=
"prettyprint"
>
we need to have different shape for these elements. However, they can share the same point set. The following
<
X3D id="shapedata" width="600px" height="600px" style="float:left"
>
example uses different
<
Scene
>
Material for roof, wall, and ground surfaces.
<
Shape
>
<br>
<
!-- roof --
>
<pre>
<
Appearance
>
<code
class=
"language-html"
>
<
Material diffuseColor="0.980, 0.502, 0.447"
>
<
/Material
>
<
html
>
<
/Appearance
>
<
head
>
<
IndexedFaceSet solid="true" ccw ="true"
<
title
>
indexed face set and material
<
/title
>
coordIndex=" 7 4 8 -1 4 5 8 -1 5 6 8 -1 6 7 8 -1"
>
<
script type='text/javascript' src='http://www.x3dom.org/download/x3dom.js'
>
<
/script
>
<
Coordinate DEF="pointset" point="-1 0 1, 1 0 1, 1 0 -1, -1 0 -1,
<
link rel='stylesheet' type='text/css' href='http://www.x3dom.org/download/x3dom.css'
><
/link
>
-1 2 1, 1 2 1, 1 2 -1, -1 2 -1, 0 3 0 "
>
<
/head
>
<
/Coordinate
>
<
body
>
<
/IndexedFaceSet
>
<
X3D id="shapedata" width="600px" height="600px" style="float:left"
>
<
/Shape
>
<
Scene
>
<
Shape
>
<
Shape
>
<
!-- wall --
>
<
!-- roof --
>
<
Appearance
>
<
Appearance
>
<
Material diffuseColor="0.753, 0.753, 0.753"
>
<
/Material
>
<
Material diffuseColor="0.980, 0.502, 0.447"
>
<
/Material
>
<
/Appearance
>
<
/Appearance
>
<
IndexedFaceSet solid="true" ccw ="true"
<
IndexedFaceSet solid="true" ccw ="true"
coordIndex=" 0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1"
>
coordIndex=" 7 4 8 -1 4 5 8 -1 5 6 8 -1 6 7 8 -1"
>
<
Coordinate USE="pointset"
>
<
Coordinate DEF="pointset" point="-1 0 1, 1 0 1, 1 0 -1, -1 0 -1,
<
/Coordinate
>
-1 2 1, 1 2 1, 1 2 -1, -1 2 -1, 0 3 0 "
>
<
/IndexedFaceSet
>
<
/Coordinate
>
<
/Shape
>
<
/IndexedFaceSet
>
<
Shape
>
<
/Shape
>
<
!-- ground --
>
<
Shape
>
<
Appearance
>
<
!-- wall --
>
<
Material diffuseColor="0.180, 0.280, 0.230"
>
<
/Material
>
<
Appearance
>
<
/Appearance
>
<
Material diffuseColor="0.753, 0.753, 0.753"
>
<
/Material
>
<
IndexedFaceSet solid="true" ccw ="true"
<
/Appearance
>
coordIndex=" 0 3 2 1 -1 "
>
<
IndexedFaceSet solid="true" ccw ="true"
<
Coordinate USE="pointset"
>
coordIndex=" 0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1"
>
<
/Coordinate
>
<
Coordinate USE="pointset"
>
<
/IndexedFaceSet
>
<
/Coordinate
>
<
/Shape
>
<
/IndexedFaceSet
>
<
/Scene
>
<
/Shape
>
<
/X3D
>
<
Shape
>
</pre>
<
!-- ground --
>
</td>
<
Appearance
>
</tr>
<
Material diffuseColor="0.180, 0.280, 0.230"
>
<
/Material
>
</table>
<
/Appearance
>
<script
type=
"text/javascript"
src=
"x3dom.js"
></script>
<
IndexedFaceSet solid="true" ccw ="true"
</body>
coordIndex=" 0 3 2 1 -1 "
>
<
Coordinate USE="pointset"
>
</html>
<
/Coordinate
>
\ No newline at end of file
<
/IndexedFaceSet
>
<
/Shape
>
<
/Scene
>
<
/X3D
>
<
/body
>
<
/html
>
</code>
</pre>
</td>
<script
type=
"text/javascript"
src=
"x3dom.js"
></script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment