Virtual 3D Cities
|
Public Member Functions | |
Scene3D () | |
void | addBox (double cx, double cy, double cz, double xlen, double ylen, double zlen, double r, double g, double b, double roughness, double metalness, double rx, double ry, double rz) |
void | addBox (double cx, double cy, double cz, double xlen, double ylen, double zlen, double r, double g, double b, double roughness, double metalness) |
void | addCylinder (double cx, double cy, double cz, double radius, double height, double r, double g, double b, double roughness, double metalness, double rx, double ry, double rz, double sx, double sy, double sz) |
void | addCylinder (double cx, double cy, double cz, double radius, double height, double r, double g, double b, double roughness, double metalness) |
void | addCone (double cx, double cy, double cz, double radius, double height, double r, double g, double b, double roughness, double metalness, double rx, double ry, double rz, double sx, double sy, double sz) |
void | addCone (double cx, double cy, double cz, double radius, double height, double r, double g, double b, double roughness, double metalness) |
void | addEllipsoid (double cx, double cy, double cz, double radx, double rady, double radz, double r, double g, double b, double roughness, double metalness, double rx, double ry, double rz) |
void | addEllipsoid (double cx, double cy, double cz, double radx, double rady, double radz, double r, double g, double b, double roughness, double metalness) |
void | addSphere (double cx, double cy, double cz, double radius, double r, double g, double b, double roughness, double metalness) |
void | addMesh (String path, double cx, double cy, double cz, double rx, double ry, double rz, double sx, double sy, double sz, double r, double g, double b, double roughness, double metalness) |
void | addTexturedMesh (String path, String matpath, double cx, double cy, double cz, double rx, double ry, double rz, double sx, double sy, double sz, double shininess) |
void | addCamera (double x, double y, double z, double rot) |
void | addPointLight (double x, double y, double z, double r, double g, double b, double intensity) |
void | addDirectionalLight (double x, double y, double z, double r, double g, double b, double intensity) |
void | saveScene (String filename, String sceneName) |
|
inline |
|
inline |
Add an axis-aligned box to the scene
cx | X center of box |
cy | Y center of box |
cz | Z center of box |
xlen | Length of box along x-axis |
ylen | Length of box along y-axis |
zlen | Length of box along z-axis |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add a box to the scene
cx | X center of box |
cy | Y center of box |
cz | Z center of box |
xlen | Length of box along x-axis |
ylen | Length of box along y-axis |
zlen | Length of box along z-axis |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
rx | Rotation about x-axis, in degrees |
ry | Rotation about y-axis, in degrees |
rz | Rotation about z-axis, in degrees |
|
inline |
Add a particular camera to the scene
x | X position of camera |
y | Y position of camera |
z | Z position of camera |
rot | Rotation in degrees about y-axis |
|
inline |
Add an axis-aligned cone to the scene
cx | X center of cone |
cy | Y center of cone |
cz | Z center of cone |
radius | Radius of the cone |
height | Height of the cone |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add a cone to the scene
cx | X center of cone |
cy | Y center of cone |
cz | Z center of cone |
radius | Radius of the cone |
height | Height of the cone |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
rx | Rotation about x-axis, in degrees |
ry | Rotation about y-axis, in degrees |
rz | Rotation about z-axis, in degrees |
sx | Scale about x-axis |
sy | Scale about y-axis |
sz | Scale about z-axis |
|
inline |
Add an axis-aligned cylinder to the scene
cx | X center of cylinder |
cy | Y center of cylinder |
cz | Z center of cylinder |
radius | Radius of the cylinder |
height | Height of the cylinder |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add a cylinder to the scene
cx | X center of cylinder |
cy | Y center of cylinder |
cz | Z center of cylinder |
radius | Radius of the cylinder |
height | Height of the cylinder |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
rx | Rotation about x-axis, in degrees |
ry | Rotation about y-axis, in degrees |
rz | Rotation about z-axis, in degrees |
sx | Scale about x-axis |
sy | Scale about y-axis |
sz | Scale about z-axis |
|
inline |
Add a directional light to the scene at a particular (x, y, z) position, pointing with parallel rays towards the origin (0, 0, 0) and with a particular (r, g, b) color
x | X position of light |
y | Y position of light |
z | Z position of light |
r | Red component of light in [0, 255] |
g | Green component of light in [0, 255] |
b | Blue component of light in [0, 255] |
intensity | The intensity of the light, in [0, 1] |
|
inline |
Add an axis-aligned ellipsoid to the scene
cx | X center of ellipsoid |
cy | Y center of ellipsoid |
cz | Z center of ellipsoid |
radx | Semi-axis x radius |
rady | Semi-axis y radius |
radz | Semi-axis z radius |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add an ellipsoid to the scene
cx | X center of ellipsoid |
cy | Y center of ellipsoid |
cz | Z center of ellipsoid |
radx | Semi-axis x radius |
rady | Semi-axis y radius |
radz | Semi-axis z radius |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
rx | Rotation about x-axis, in degrees |
ry | Rotation about y-axis, in degrees |
rz | Rotation about z-axis, in degrees |
|
inline |
Add a mesh to the scene
path | File path to special mesh, relative to this directory |
cx | Offset in x |
cy | Offset in y |
cz | Offset in z |
rx | Rotation around x-axis |
ry | Rotation around y-axis |
rz | Rotation around z-axis |
sx | Scale along x-axis |
sy | Scale along y-axis |
sz | Scale along z-axis |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add a point light to the scene at a particular (x, y, z) position and with a particular (r, g, b) color
x | X position of light |
y | Y position of light |
z | Z position of light |
r | Red component of light in [0, 255] |
g | Green component of light in [0, 255] |
b | Blue component of light in [0, 255] |
intensity | The intensity of the light, in [0, 1] |
|
inline |
Add a sphere to the scene
cx | X center of the sphere |
cy | Y center of the sphere |
cz | Z center of the sphere |
radius | Radius of the sphere |
r | Red component in [0, 255] |
g | Green component in [0, 255] |
b | Blue component in [0, 255] |
roughness | How rough the material appears. 0.0 means a smooth mirror reflection, 1.0 means fully diffuse. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.roughness |
metalness | How much the material is like a metal. Non-metallic materials such as wood or stone use 0.0, metallic use 1.0, with nothing (usually) in between. https://threejs.org/docs/#api/en/materials/MeshStandardMaterial.metalness |
|
inline |
Add a textured mesh to the scene
path | File path to mesh, relative to this directory |
matpath | File path to material, relative to this directory |
cx | Offset in x |
cy | Offset in y |
cz | Offset in z |
rx | Rotation around x-axis |
ry | Rotation around y-axis |
rz | Rotation around z-axis |
sx | Scale along x-axis |
sy | Scale along y-axis |
sz | Scale along z-axis |
shininess | A number in [0, 255] describing how shiny the mesh is |
|
inline |
Save this scene to a file
filename | Path to which to save file (should end with .json) |
sceneName | Title of the scene to display in the viewer |