Bump version to 0.3.0

This commit is contained in:
stujones11 2016-12-31 17:33:19 +00:00
parent 48452cc4bb
commit 89623ea11d
26 changed files with 2680 additions and 1362 deletions

View File

@ -1,5 +1,7 @@
Meshnodes for Minetest [meshnode] Meshnodes for Minetest [meshnode]
================================= =================================
Copyright (C) 2013 Stuart Jones - LGPL License Source Code: Copyright (C) 2013-2017 Stuart Jones - LGPL v2.1
License Media Files: CC0 1.0 Universal (CC0 1.0)

144
README.md Normal file
View File

@ -0,0 +1,144 @@
Meshnodes for Minetest [meshnode]
=================================
**Mod Version:** 0.3.0
**Minetest Version:** 0.4.14 or later
**Depends:** default
Description
-----------
Meshnodes is a mod that transforms ordinary minetest nodes into a connected
array of replica entities to which players can attach to and manoeuvre.
To use, simply build or place a model using nodes with a supported drawtype
then place a meshnode controller in an appropriate position. Now use the
special 'glue' that you will find in the controller node's inventory to
connect your structure. Alternatively, if you are using worldedit, you can
use the position markers to define the extents of your model.
When everything is connected you should return the 'glue' to the controller
to enable activation. Once activated, players can then attach themselves
to the controller or restore the model back to nodes. Restored models can
be easily reconnected using the 'Connect from meta positions' option.
Please note that the 'glue' bottles are unique to a controller's position
and are only useable within a limited range.
**Supported Drawtypes**
I have done my best to include support for most of the common nodes that
are useful for building ships etc, like fences, xpanes and walls including
support for all default stairs and slabs in full 6d rotation. It may or
may not work with other decorative nodeboxes/meshnodes, the best way to
find out is to simply try it.
Exceptions include flowing liquids, wallmounted nodes, rails or any node
with non-generated wield or inventory images. Some drawtypes have only
partial support, like 'plantlike' for example.
**Construction Advice**
Place the controller node in the direction you wish to face when you attach
to it and always try to make your models hollow wherever possible.
Controls
--------
```
[Up] Forward
[Down] Reverse
[Left] Turn Left
[Right] Turn Right
[Jump] Up
[Sneak] Down
[RMB] Interact
```
Crafting
--------
By default crafting is enabled in singleplayer mode only.
**Meshnode Controller** [meshnode:controller]
<table>
<tr>
<td>[default:bronzeblock]</td>
<td>[default:diamondblock]</td>
<td>[default:bronzeblock]</td>
</tr>
<tr>
<td>[default:obsidian_block]</td>
<td>[default:steelblock]</td>
<td>[default:goldblock]</td>
</tr>
<tr>
<td>[default:bronzeblock]</td>
<td>[default:steelblock]</td>
<td>[default:bronzeblock]</td>
</tr>
</table>
Multiplayer
-----------
Take care if you use this mod on a public server, while I have done my
best to support basic protection, I am sure this mod could still provide
serious potential for grief in the hands of the wrong people.
By default the controller node will only be available via `/give[me]` and
requires the 'meshnode' privilege to be effective, however, non-privileged
players will still be able to attach to and operate pre-activated models.
Note that you will probably need to increase `max_objects_per_block` to
something a little higher than the default 64 to avoid server warnings and
broken models. You can set `meshnode_autoconf = true` to automatically
increase that limit to 4096 which, in theory, equates to one solid map-block
full of meshnodes, though I would not advise testing that on live server.
Blacklist
---------
A global blacklist table is stored is in `meshnode.blacklist` keyed by item
name, in multiplayer mode the following nodes are blacklisted by default.
```
meshnode.blacklist["default:chest_locked"] = true
meshnode.blacklist["default:water_source"] = true
meshnode.blacklist["default:river_water_source"] = true
meshnode.blacklist["default:lava_source"] = true
```
Configuration
-------------
The global config table is stored `meshnode.config` and can overridden by
adding the config name prefixed with 'meshnode_' to your minetest.conf file.
**Example:** (multiplayer defaults)
```
meshnode_max_speed = 2
meshnode_max_lift = 1
meshnode_yaw_amount = 0.017
meshnode_max_radius = 8
meshnode_show_in_creative = false
meshnode_enable_crafting = false
meshnode_autoconf = false
```
Note that speed, lift, yaw and radius may still be altered by other mods after
the initial start-up via the global `meshnode.config` table.
API
---
I would like to think that this mod could be used as the base for other mods
like airships or sailing ships or perhaps even some fancy construction tool.
For this reason I have exposed everything that I thought might be potentially
useful under the `meshnode` namespace. I would hope that the source code is
reasonably self-explanatory.
Know Issues
-----------
Active objects sometimes disappear following a re-start/connect. This could
be for a number or reasons including /clearobjects or a minetest bug. For this
reason you are advised to always 'restore' your model to 'real' nodes before
logging out or moving any significant distance away from it.
The player controlling the entity may appear to be connected to the wrong
part of the model when viewed by a player that was not present during the
initial attachment. Currently the only solution is for the operator to
detach then re-attach to the model in the presence of said player.

View File

@ -1,62 +0,0 @@
Meshnodes for Minetest [meshnode]
=================================
Meshnodes is a mod that transforms ordinary nodes into a connected
array of replica entities to which players can attach to and manoeuvre.
To use, simply build or place a model using nodes with a supported drawtype.
Next place a meshnode controller in the appropriate position, the operator
will be attached directly on top of the controller node.
Now right click the controller and enter the minimum and maximum extents of
the model (relative to the controller x,y,z)
e.g. for a 3x3 square of nodes with the controller placed above the center
node, the relative positions would be minp = -1,-1,-1 maxp = 1,0,1
Alternatively, if you are using worldedit, you can use the position
markers to define the extents of the model. However, this must be done
before the controller is placed.
Supported Drawtypes
===================
normal
allfaces_optional
glasslike
plantlike
fencelike
Also supports all default stairs and slabs in full 6d rotation.
Controls
========
[Up] Forward
[Down] Reverse
[Left] Rotate Left
[Right] Rotate Right
[Jump] Up
[Sneak] Down
[RMB] Attach/Detach
Limitations
===========
Models will disappear or become detached from the controller if they become
unloaded. This can cause the server to warn against excessive objects and
destroy them accordingly.
I have tried a number of ways the get the models to persist after a server
restart but so far all of my efforts have been thwarted by minetest's buggy
object management system. I also wanted to be able to attach 'passengers'
to the entities, however, this has not been possible for the same reason.
Know Issues
===========
The player controlling the entity may appear to be connected to the wrong
part of the model when viewed by a player that was not present during the
initial attachment. Currently the only solution is for the operator to
detach then re-attach to the model in the presence of said player.

356
api.lua Normal file
View File

@ -0,0 +1,356 @@
meshnode = {}
meshnode.config = {
max_speed = 2,
max_lift = 1,
yaw_amount = 0.017,
max_radius = 8,
show_in_creative = false,
enable_crafting = false,
autoconf = false,
}
meshnode.blacklist = {}
local face_rotation = {
{x=0, y=0, z=0}, {x=0, y=90, z=0}, {x=0, y=180, z=0},
{x=0, y=-90, z=0}, {x=90, y=0, z=0}, {x=90, y=0, z=90},
{x=90, y=0, z=180}, {x=90, y=0, z=-90}, {x=-90, y=0, z=0},
{x=-90, y=0, z=-90}, {x=-90, y=0, z=180}, {x=-90, y=0, z=90},
{x=0, y=0, z=-90}, {x=90, y=90, z=0}, {x=180, y=0, z=90},
{x=0, y=-90, z=-90}, {x=0, y=0, z=90}, {x=0, y=90, z=90},
{x=180, y=0, z=-90}, {x=0, y=-90, z=90}, {x=180, y=180, z=0},
{x=180, y=90, z=0}, {x=180, y=0, z=0}, {x=180, y=-90, z=0},
}
local meshnode_id = 0
local function connects_to_group(pos, groups)
local node = minetest.get_node(pos)
for _, group in pairs(groups) do
if minetest.get_item_group(node.name, group) > 0 then
return true
end
end
end
local function get_face_textures(facecons, texture)
local textures = {
"meshnode_trans.png",
"meshnode_trans.png",
"meshnode_trans.png",
"meshnode_trans.png",
}
for i = 1, 4 do
if facecons[i] == true then
textures[i] = texture
end
end
return textures
end
local function restore_facedir(node, delta, yaw)
local facedir = node.param2 or 0
local def = minetest.registered_items[node.name] or {}
if def.paramtype2 == "facedir" then
local rot = (meshnode.yaw_to_facedir(yaw) + delta) % 4
node.param2 = meshnode.rotate_facedir(rot, facedir)
end
end
meshnode.new_id = function()
meshnode_id = meshnode_id + 1
return tostring(meshnode_id)
end
meshnode.get_luaentity = function(id)
for _, entity in pairs(minetest.luaentities) do
if entity.mesh_id == id then
return entity
end
end
end
meshnode.get_map_pos = function(ref, parent)
local pos = parent.object:getpos()
local yaw = parent.object:getyaw()
local rot = meshnode.rotate_offset(yaw, ref.offset)
local vec = vector.add(pos, rot)
return vector.round(vec)
end
meshnode.facedir_to_yaw = function(facedir)
local yaw = 0
local rot = facedir % 4
if rot == 1 then
yaw = 3 * math.pi / 2
elseif rot == 2 then
yaw = math.pi
elseif rot == 3 then
yaw = math.pi / 2
end
return yaw
end
meshnode.yaw_to_facedir = function(yaw)
local deg = math.floor(math.deg(yaw) + 0.5) % 360
if deg < 90 then
return 0
end
return 4 - math.floor(deg / 90)
end
meshnode.facedir_to_rotation = function(facedir)
return face_rotation[facedir + 1] or face_rotation[1]
end
meshnode.rotation_to_facedir = function(rotation)
for i, v in ipairs(face_rotation) do
if vector.equals(v, rotation) then
return i - 1
end
end
return 0
end
meshnode.rotate_facedir = function(rot, facedir)
if rot == 0 then
return facedir
end
local rotation = facedir % 32
local axis = math.floor(rotation / 4)
if axis == 0 then
rotation = rotation + rot
elseif axis == 5 then
rotation = rotation - rot
else
local axis_rotation = {
{3, 2, 4},
{4, 1, 3},
{2, 4, 1},
{1, 3, 2},
}
local next_axis = axis_rotation[axis]
axis = next_axis[rot]
rotation = rotation + rot
end
return axis * 4 + (rotation % 4)
end
meshnode.rotate_offset = function(yaw, offset)
local cos = math.cos(yaw)
local sin = math.sin(yaw)
local x = offset.x * cos - offset.z * sin
local z = offset.x * sin + offset.z * cos
local ret = vector.round({x=x, y=offset.y, z=z})
return vector.round({x=x, y=offset.y, z=z})
end
meshnode.add_entity = function(ref, parent)
local pos = meshnode.get_map_pos(ref, parent)
local object = minetest.add_entity(pos, "meshnode:mesh")
if object then
local properties = {textures={ref.node.name}}
local def = minetest.registered_items[ref.node.name] or {}
if ref.meshtype == "plant" then
properties.visual = "mesh"
properties.visual_size = {x=1, y=1}
properties.mesh = "meshnode_plant.obj"
properties.textures = {def.tiles[1]}
elseif ref.meshtype == "fence" then
local textures = get_face_textures(ref.facecons, def.tiles[1])
table.insert(textures, 1, def.tiles[1])
properties.visual = "mesh"
properties.visual_size = {x=1, y=1}
properties.mesh = "meshnode_fence.obj"
properties.textures = textures
elseif ref.meshtype == "wall" then
local textures = get_face_textures(ref.facecons, def.tiles[1])
table.insert(textures, 1, def.tiles[1])
properties.visual = "mesh"
properties.visual_size = {x=1, y=1}
properties.mesh = "meshnode_wall.obj"
properties.textures = textures
elseif ref.meshtype == "pane" then
local textures = get_face_textures(ref.facecons, def.tiles[3])
properties.visual = "mesh"
properties.visual_size = {x=1, y=1}
properties.mesh = "meshnode_pane.obj"
properties.textures = textures
end
object:set_properties(properties)
if parent then
local entity = object:get_luaentity()
if entity then
entity.mesh_id = ref.id
entity.parent_id = parent.mesh_id
else
object:remove()
return
end
local yaw = parent.object:getyaw()
local offset = vector.multiply(ref.offset, 10)
local rotation = vector.new(ref.rotation)
object:set_attach(parent.object, "", offset, rotation)
end
end
return object
end
meshnode.create = function(pos, parent)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local def = minetest.registered_items[node.name] or {}
local meshtype = "wielditem"
local scaffold = "meshnode:scaffold"
local facecons = {}
local faces = {
[1] = {x=0, y=0, z=-1},
[2] = {x=-1, y=0, z=0},
[3] = {x=0, y=0, z=1},
[4] = {x=1, y=0, z=0},
}
if not parent or
meshnode.blacklist[node.name] or
node.name == "meshnode:controller" or
node.name == "air" or
node.name == "ignore" or
def.paramtype2 == "wallmounted" or
def.paramtype2 == "flowingliquid" then
return
elseif def.drawtype == "plantlike" then
meshtype = "plant"
elseif minetest.get_item_group(node.name, "fence") > 0 then
scaffold = "meshnode:scaffold_fence"
if def.drawtype ~= "mesh" then
meshtype = "fence"
for i, face in pairs(faces) do
local p = vector.add(pos, face)
facecons[i] = connects_to_group(p, {"fence", "wood", "tree"})
end
end
elseif minetest.get_item_group(node.name, "wall") > 0 then
scaffold = "meshnode:scaffold_wall"
if def.drawtype ~= "mesh" then
meshtype = "wall"
for i, face in pairs(faces) do
local p = vector.add(pos, face)
facecons[i] = connects_to_group(p, {"wall", "stone"})
end
end
elseif minetest.get_item_group(node.name, "pane") > 0 then
meshtype = "pane"
scaffold = "meshnode:scaffold_pane"
if string.find(node.name, "_flat$") then
facecons = {[2]=true, [4]=true}
else
for i, face in pairs(faces) do
local p = vector.add(pos, face)
facecons[i] = connects_to_group(p, {"pane"})
end
end
elseif def.wield_image ~= "" or def.inventory_image ~="" then
return
end
local param2 = node.param2 or 0
local offset = vector.subtract(pos, parent.object:getpos())
local yaw = math.pi * 2 - parent.object:getyaw()
local delta = meshnode.yaw_to_facedir(yaw)
local facedir = meshnode.rotate_facedir(delta, param2)
local meta_str = nil
local meta_tab = meta:to_table() or {}
if meta_tab.inventory then
for _, list in pairs(meta_tab.inventory) do
for i, stack in ipairs(list) do
list[i] = ItemStack(stack):to_string()
end
end
end
if next(meta_tab) then
meta_str = minetest.serialize(meta_tab)
end
local ref = {
id = meshnode.new_id(),
node = node,
meta = meta_str,
delta = delta,
meshtype = meshtype,
facecons = facecons,
offset = meshnode.rotate_offset(yaw, offset),
rotation = meshnode.facedir_to_rotation(facedir),
}
local object = meshnode.add_entity(ref, parent)
if object then
minetest.set_node(pos, {name=scaffold})
table.insert(parent.nodes, ref)
end
return object
end
meshnode.restore = function(ref, parent)
local entity = meshnode.get_luaentity(ref.id)
local pos = meshnode.get_map_pos(ref, parent)
local yaw = parent.object:getyaw()
restore_facedir(ref.node, ref.delta, yaw)
minetest.add_node(pos, ref.node)
if entity then
entity.object:setpos(pos)
entity.object:set_detach()
entity.object:remove()
end
if ref.meta then
local meta = minetest.get_meta(pos)
local meta_tab = minetest.deserialize(ref.meta) or {}
meta:from_table(meta_tab)
end
end
meshnode.restore_all = function(parent, name)
local positions = {}
if #parent.nodes == 0 then
return positions
end
local minp = {x=32000, y=32000, z=32000}
local maxp = vector.multiply(minp, -1)
local yaw = parent.object:getyaw()
local nodedata = {}
for _, ref in pairs(parent.nodes) do
local pos = meshnode.get_map_pos(ref, parent)
if name and minetest.is_protected(pos, name) then
return
end
table.insert(nodedata, {pos=pos, ref=ref})
for axis, val in pairs(pos) do
if val < minp[axis] then
minp[axis] = val
end
if val > maxp[axis] then
maxp[axis] = val
end
end
end
local vm = minetest.get_voxel_manip(minp, maxp)
for _, data in pairs(nodedata) do
restore_facedir(data.ref.node, data.ref.delta, yaw)
vm:set_node_at(data.pos, data.ref.node)
end
vm:write_to_map()
vm:update_liquids()
vm:update_map()
for _, data in pairs(nodedata) do
local entity = meshnode.get_luaentity(data.ref.id)
if entity then
entity.object:setpos(data.pos)
entity.object:set_detach()
entity.object:remove()
end
if data.ref.meta then
local meta = minetest.get_meta(data.pos)
local meta_tab = minetest.deserialize(data.ref.meta) or {}
meta:from_table(meta_tab)
end
table.insert(positions, data.pos)
end
return positions
end

View File

@ -0,0 +1,2 @@
default
wordedit?

1
description.txt Normal file
View File

@ -0,0 +1 @@
Poor man's voxel area entities.

532
init.lua
View File

@ -1,55 +1,219 @@
dofile(minetest.get_modpath(minetest.get_current_modname()).."/meshnode.lua") -- Boilerplate to support localized strings if intllib mod is installed.
local S = function(s) return s end
local groups = {cracky=3, oddly_breakable_by_hand=3} if minetest.get_modpath("intllib") then
if MESHNODE_SHOW_IN_CREATIVE == false then S = intllib.Getter()
groups.not_in_creative_inventory=1
end end
local function is_valid_pos(pos) dofile(minetest.get_modpath(minetest.get_current_modname()).."/api.lua")
if pos then
if pos.x and pos.y and pos.z then local has_worldedit = minetest.global_exists("worldedit")
return math.abs(pos.x) <= MESHNODE_MAX_RADIUS and local is_singleplayer = minetest.is_singleplayer()
math.abs(pos.y) <= MESHNODE_MAX_RADIUS and local control_textures = {
math.abs(pos.z) <= MESHNODE_MAX_RADIUS "default_steel_block.png",
"default_diamond_block.png",
"default_bronze_block.png",
"default_obsidian_block.png",
"default_gold_block.png",
}
if is_singleplayer then
meshnode.config.max_radius = 16
meshnode.config.show_in_creative = true
meshnode.config.enable_crafting = true
meshnode.config.autoconf = true
else
meshnode.blacklist["default:chest_locked"] = true
meshnode.blacklist["default:water_source"] = true
meshnode.blacklist["default:river_water_source"] = true
meshnode.blacklist["default:lava_source"] = true
end
for name, config in pairs(meshnode.config) do
local setting = minetest.setting_get("meshnode_"..name)
if type(config) == "number" then
setting = tonumber(setting)
elseif type(config) == "boolean" then
setting = minetest.setting_getbool("meshnode_"..name)
end
if setting then
meshnode.config[name] = setting
end
end
if meshnode.config.autoconf == true then
minetest.setting_set("max_objects_per_block", "4096")
end
local function has_privilege(name)
if is_singleplayer then
return true
end
return minetest.check_player_privs(name, {meshnode=true})
end
local function show_meshnode_formspec(pos, player)
local name = player:get_player_name()
if not has_privilege(name) then
return
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local id = minetest.pos_to_string(pos)
local entity = meshnode.get_luaentity(id)
local spos = pos.x..","..pos.y..","..pos.z
local formspec = "size[8,8]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
default.get_hotbar_bg(0,4)..
"list[current_player;main;0,4;8,1;]"..
"list[current_player;main;0,5.25;8,3;8]"..
"list[nodemeta:"..spos..";tool;0.5,1.5;1,1;]"
local buttons = {}
if entity and #entity.nodes > 0 then
if inv:contains_item("tool", "meshnode:glue") then
table.insert(buttons, {"activate", "Activate meshnode"})
end end
table.insert(buttons, {"reset", "Reset connections"})
end end
if meta:get_string("meshnode") ~= "" then
table.insert(buttons, {"connect_meta", "Connect meta positions"})
end
if has_worldedit and worldedit.pos1[name] and worldedit.pos2[name] then
table.insert(buttons, {"connect_we", "Connect worldedit markers"})
end
local y = 0.25
for _, btn in pairs(buttons) do
formspec = formspec.."button_exit[2.25,"..y..
";5,0.5;"..btn[1]..";"..S(btn[2]).."]"
y = y + 0.9
end
minetest.show_formspec(name, "meshnode_"..id, formspec)
end end
local function get_step(a, b) local function register_scaffold(name, groups)
if a > b then groups.not_in_creative_inventory = 1
return -1 groups.cracky = 1
end minetest.register_node(name, {
return 1 paramtype = "light",
drawtype = "glasslike",
is_ground_content = false,
sunlight_propagates = true,
use_texture_alpha = true,
tiles = {"meshnode_highlight.png"},
groups = groups,
})
end end
minetest.register_entity("meshnode:ctrl", { register_scaffold("meshnode:scaffold", {})
register_scaffold("meshnode:scaffold_fence", {fence=1})
register_scaffold("meshnode:scaffold_wall", {wall=1})
register_scaffold("meshnode:scaffold_pane", {pane=1})
if meshnode.config.enable_crafting then
minetest.register_craft({
output = "meshnode:controller",
recipe = {
{"default:bronzeblock", "default:diamondblock", "default:bronzeblock"},
{"default:obsidian_block", "default:steelblock", "default:goldblock"},
{"default:bronzeblock", "default:steelblock", "default:bronzeblock"},
}
})
end
minetest.register_entity("meshnode:mesh", {
physical = true, physical = true,
visual = "cube", visual = "wielditem",
visual_size = {x=1, y=1}, visual_size = {x=0.666, y=0.666},
textures = { on_activate = function(self, staticdata)
"meshnode_top.png",
"meshnode_side.png",
"meshnode_side.png",
"meshnode_side.png",
"meshnode_side.png",
"meshnode_side.png",
},
player = nil,
speed = 0,
lift = 0,
on_activate = function(self, staticdata, dtime_s)
self.object:set_armor_groups({cracky=50})
if staticdata == "expired" then if staticdata == "expired" then
self.object:remove() self.object:remove()
end end
end, end,
on_rightclick = function(self, clicker) get_staticdata = function(self)
if self.player == nil then return "expired"
clicker:set_attach(self.object, "", {x=0,y=15,z=0}, {x=0,y=90,z=0}) end,
self.player = clicker })
minetest.register_entity("meshnode:ctrl", {
physical = true,
visual = "mesh",
mesh = "meshnode_plant.obj",
visual_size = {x=1, y=1},
textures = {"meshnode_trans.png"},
facedir = 0,
speed = 0,
lift = 0,
nodes = {},
activated = false,
animation = "stand",
on_activate = function(self, staticdata)
local pos = self.object:getpos()
local objects = minetest.get_objects_inside_radius(pos, 0.5) or {}
for _, object in pairs(objects) do
if object ~= self.object then
local entity = object:get_luaentity()
if entity and entity.name == "meshnode:ctrl" then
minetest.log("warning", "meshnode: duplicate object removed")
self.object:remove()
return
end
end
end
self.object:set_armor_groups({immortal=1})
if staticdata then
local data = minetest.deserialize(staticdata) or {}
self.mesh_id = data[1]
self.activated = data[2]
self.nodes = data[3] or {}
end
if self.activated then
self.mesh_id = meshnode.new_id()
else else
self.player:set_detach() local node = minetest.get_node(pos)
self.player = nil if node.name ~= "meshnode:controller" then
minetest.log("warning", "meshnode: stray object removed")
self.object:remove()
return
end
end
for _, ref in pairs(self.nodes) do
ref.id = meshnode.new_id()
meshnode.add_entity(ref, self)
end
self:set_activated(self.activated)
end,
on_punch = function(self, puncher)
--self.object:remove()
end,
on_rightclick = function(self, clicker)
if not self.mesh_id then
return
end
if self.activated then
local name = clicker:get_player_name()
local buttons = {}
local formspec = "size[4,3.5]"
if self.player then
table.insert(buttons, {"detach", "Detach"})
local btn = {"animation_sit", "Sit"}
if self.animation == "sit" then
btn = {"animation_stand", "Stand"}
end
table.insert(buttons, btn)
else
table.insert(buttons, {"attach", "Attach"})
table.insert(buttons, {"restore", "Restore"})
end
table.insert(buttons, {"align", "Align"})
local y = 0.5
for _, btn in pairs(buttons) do
formspec = formspec.."button_exit[0.5,"..y..
";3,0.75;"..btn[1]..";"..S(btn[2]).."]"
y = y + 1
end
local formname = "meshnode_"..self.mesh_id
minetest.show_formspec(name, formname, formspec)
end end
end, end,
on_step = function(self, dtime) on_step = function(self, dtime)
@ -66,31 +230,31 @@ minetest.register_entity("meshnode:ctrl", {
else else
speed = speed * 0.99 speed = speed * 0.99
end end
if speed > MESHNODE_MAX_SPEED then if speed > meshnode.config.max_speed then
speed = MESHNODE_MAX_SPEED speed = meshnode.config.max_speed
elseif speed < 0 - MESHNODE_MAX_SPEED then elseif speed < 0 - meshnode.config.max_speed then
speed = 0 - MESHNODE_MAX_SPEED speed = 0 - meshnode.config.max_speed
end end
if ctrl.jump then if ctrl.jump then
lift = lift + 0.1 lift = lift + 0.1
elseif ctrl.sneak then elseif ctrl.sneak then
lift = lift - 0.1 lift = lift - 0.1
else else
lift = lift * 0.9 lift = lift * 0.99
end end
if lift > MESHNODE_MAX_LIFT then if lift > meshnode.config.max_lift then
lift = MESHNODE_MAX_LIFT lift = meshnode.config.max_lift
elseif lift < 0 - MESHNODE_MAX_LIFT then elseif lift < 0 - meshnode.config.max_lift then
lift = 0 - MESHNODE_MAX_LIFT lift = 0 - meshnode.config.max_lift
end end
if ctrl.left then if ctrl.left then
yaw = yaw + MESHNODE_YAW_AMOUNT yaw = yaw + meshnode.config.yaw_amount
elseif ctrl.right then elseif ctrl.right then
yaw = yaw - MESHNODE_YAW_AMOUNT yaw = yaw - meshnode.config.yaw_amount
end end
velocity.x = math.cos(yaw) * speed velocity.x = -math.sin(yaw) * speed
velocity.y = lift velocity.y = lift
velocity.z = math.sin(yaw) * speed velocity.z = math.cos(yaw) * speed
self.object:setyaw(yaw) self.object:setyaw(yaw)
self.object:setvelocity(velocity) self.object:setvelocity(velocity)
self.speed = speed self.speed = speed
@ -102,80 +266,238 @@ minetest.register_entity("meshnode:ctrl", {
end end
end, end,
get_staticdata = function(self) get_staticdata = function(self)
return "expired" local data = {self.mesh_id, self.activated, self.nodes}
return minetest.serialize(data)
end, end,
}) set_alignment = function(self)
local pos = self.object:getpos()
minetest.register_entity("meshnode:mesh", { local yaw = self.object:getyaw()
physical = true, local deg = math.deg(yaw) + 45
visual_size = {x=1, y=1}, deg = math.floor(deg / 90) * 90
on_activate = function(self, staticdata, dtime_s) self.object:setvelocity({x=0, y=0, z=0})
if staticdata == "expired" then self.object:setyaw(math.rad(deg))
self.object:remove() self.object:setpos(vector.round(pos))
self.speed = 0
self.lift = 0
end,
set_activated = function(self, active)
local mesh = "meshnode_plant.obj"
local anim = {x=0, y=0}
local textures = {"meshnode_trans.png"}
local collisionbox = {0,0,0, 0,0,0}
if active then
mesh = "meshnode_ctrl.b3d"
anim = {x=20, y=100}
textures = control_textures
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5}
end end
end, self.object:set_properties({
get_staticdata = function(self) mesh = mesh,
return "expired" textures = textures,
collisionbox = collisionbox,
})
self.object:set_animation(anim, 15)
self.activated = active
end, end,
}) })
minetest.register_node("meshnode:controller", { minetest.register_node("meshnode:controller", {
description = "Meshnode Controller", description = S("Meshnode Controller"),
drawtype = "mesh",
mesh = "meshnode_ctrl.obj",
paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"meshnode_top.png", "meshnode_side.png", "meshnode_side.png"}, tiles = control_textures,
is_ground_content = true, groups = {choppy=2, oddly_breakable_by_hand=2},
groups = groups,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("formspec", "size[5,3]" local inv = meta:get_inventory()
.."field[0.5,1;2,0.5;minp;Minp;${minp}]" local stack = {
.."field[3.0,1;2,0.5;maxp;Maxp;${maxp}]" name = "meshnode:glue",
.."button_exit[1.0,2;3,0.5;connect;Generate Entity]" metadata = minetest.pos_to_string(pos),
) }
meta:set_string("infotext", "Meshnode Controller") inv:set_size("tool", 1)
inv:add_item("tool", stack)
meta:set_string("infotext", S("Meshnode Controller"))
end,
on_destruct = function(pos)
local id = minetest.pos_to_string(pos)
local entity = meshnode.get_luaentity(id)
if entity then
meshnode.restore_all(entity)
entity.object:remove()
end
end, end,
after_place_node = function(pos, placer) after_place_node = function(pos, placer)
if worldedit then local node = minetest.get_node(pos)
local name = placer:get_player_name() local id = minetest.pos_to_string(pos)
local meta = minetest.get_meta(pos) local object = minetest.add_entity(pos, "meshnode:ctrl")
if worldedit.pos1[name] then if object then
local p = vector.subtract(worldedit.pos1[name], pos) local entity = object:get_luaentity()
meta:set_string("minp", p.x..","..p.y..","..p.z) if entity then
end local facedir = node.param2 or 0
if worldedit.pos2[name] then local yaw = meshnode.facedir_to_yaw(facedir)
local p = vector.subtract(worldedit.pos2[name], pos) object:setyaw(yaw)
meta:set_string("maxp", p.x..","..p.y..","..p.z) entity.mesh_id = id
end end
end end
end, end,
on_receive_fields = function(pos, formname, fields, sender) on_rightclick = function(pos, node, clicker, itemstack)
if fields.connect then show_meshnode_formspec(pos, clicker)
local minp = minetest.string_to_pos(fields.minp) end,
local maxp = minetest.string_to_pos(fields.maxp) allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if is_valid_pos(minp) and is_valid_pos(maxp) then local meta = stack:get_metadata()
local node = minetest.get_node(pos) if meta then
minetest.remove_node(pos) if vector.equals(minetest.string_to_pos(meta), pos) then
local positions = {} return 1
local parent = minetest.add_entity(pos, "meshnode:ctrl") end
if parent then end
for x = minp.x, maxp.x, get_step(minp.x, maxp.x) do return 0
for y = minp.y, maxp.y, get_step(minp.y, maxp.y) do end,
for z = minp.z, maxp.z, get_step(minp.z, maxp.z) do on_metadata_inventory_take = function(pos, listname, index, stack, player)
local node_pos = vector.add(pos, {x=x, y=y, z=z}) show_meshnode_formspec(pos, player)
meshnode:create(node_pos, parent) end,
table.insert(positions, node_pos) on_metadata_inventory_put = function(pos, listname, index, stack, player)
show_meshnode_formspec(pos, player)
end
})
minetest.register_tool("meshnode:glue", {
description = S("Meshnode Glue"),
inventory_image = "meshnode_glue.png",
liquids_pointable = true,
on_use = function(itemstack, user, pointed_thing)
local meta = itemstack:get_metadata()
local parent = meshnode.get_luaentity(meta)
if not parent then
return
end
local name = user:get_player_name()
if not has_privilege(name) then
return ""
end
if pointed_thing and pointed_thing.type == "node" then
local pos = minetest.get_pointed_thing_position(pointed_thing)
if pos then
if minetest.is_protected(pos, name) then
minetest.chat_send_player(name, S("Protected node").."!")
return
end
local node = minetest.get_node_or_nil(pos)
if node then
if string.find(node.name, "meshnode:scaffold") then
for i, ref in pairs(parent.nodes) do
local map_pos = meshnode.get_map_pos(ref, parent)
if vector.equals(map_pos, pos) then
meshnode.restore(ref, parent)
parent.nodes[i] = nil
end end
end end
end else
for _, pos in pairs(positions) do local dist = vector.distance(parent.object:getpos(), pos)
minetest.remove_node(pos) if dist > meshnode.config.max_radius then
minetest.chat_send_player(name, S("Out of range").."!")
else
meshnode.create(pos, parent)
end
end end
end end
else
local name = sender:get_player_name()
minetest.chat_send_player(name, "Invalid Position!")
end end
end end
end, end,
}) })
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname then
local id = formname:gsub("meshnode_", "")
if id == formname then
return
end
local name = player:get_player_name()
local entity = meshnode.get_luaentity(id)
if not entity then
return
end
local pos = vector.round(entity.object:getpos())
if fields.activate then
local id = meshnode.new_id()
entity.mesh_id = meshnode.new_id()
entity:set_activated(true)
for _, ref in pairs(entity.nodes) do
local map_pos = meshnode.get_map_pos(ref, entity)
minetest.remove_node(map_pos)
ref.parent = id
end
minetest.remove_node(pos)
elseif fields.connect_meta then
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local spos = meta:get_string("meshnode")
local positions = minetest.deserialize(spos) or {}
for _, p in pairs(positions) do
meshnode.create(p, entity)
end
elseif fields.connect_we then
if has_worldedit then
local p1 = worldedit.pos1[name]
local p2 = worldedit.pos2[name]
if p1 and p2 then
local area = VoxelArea:new{MinEdge=p1, MaxEdge=p2}
for i in area:iterp(p1, p2) do
local p = area:position(i)
meshnode.create(p, entity)
end
end
end
elseif fields.reset then
meshnode.restore_all(entity)
entity.nodes = {}
elseif fields.attach and entity.player == nil then
player:set_attach(entity.object, "", {x=0, y=15, z=0}, {x=0, y=0, z=0})
entity.player = player
entity.object:set_animation({x=0, y=0}, 15)
default.player_attached[name] = true
elseif fields.detach and entity.player == player then
player:set_detach()
entity.player = nil
entity.animation = "stand"
entity.object:set_animation({x=20, y=100}, 15)
default.player_attached[name] = false
elseif fields.animation_sit then
default.player_set_animation(player, "sit", 30)
entity.animation = "sit"
elseif fields.animation_stand then
default.player_set_animation(player, "stand", 30)
entity.animation = "stand"
elseif fields.align then
entity:set_alignment()
elseif fields.restore then
if not has_privilege(name) then
local msg = S("Requires the meshnode privilege")
minetest.chat_send_player(name, msg)
return
end
entity:set_alignment()
local positions = meshnode.restore_all(entity, name)
if positions then
local yaw = entity.object:getyaw()
local node = {
name = "meshnode:controller",
param2 = meshnode.yaw_to_facedir(yaw),
}
minetest.add_node(pos, node)
if #positions > 0 then
local meta = minetest.get_meta(pos)
local spos = minetest.serialize(positions)
meta:set_string("meshnode", spos)
end
entity.nodes = {}
entity.mesh_id = minetest.pos_to_string(pos)
entity:set_activated(false)
else
minetest.chat_send_player(name, S("Protected area").."!")
end
end
end
end)

View File

@ -1,17 +0,0 @@
-- Meshnode configuration (defaults)
-- Maximum Entity Speed
MESHNODE_MAX_SPEED = 2
-- Maximum Up/Down Velocity
MESHNODE_MAX_LIFT = 1
-- Rotational Step (Radians)
MESHNODE_YAW_AMOUNT = 0.02
-- Maximum Entity Area
MESHNODE_MAX_RADIUS = 50
-- Show Controller in Creative Inventory
MESHNODE_SHOW_IN_CREATIVE = true

View File

@ -1,111 +0,0 @@
MESHNODE_MAX_SPEED = 2
MESHNODE_MAX_LIFT = 1
MESHNODE_YAW_AMOUNT = 0.02
MESHNODE_MAX_RADIUS = 50
MESHNODE_SHOW_IN_CREATIVE = true
meshnode = {
face_rotation = {
{x=0, y=0, z=0}, {x=0, y=90, z=0}, {x=0, y=180, z=0}, {x=0, y=-90, z=0},
{x=90, y=0, z=0}, {x=90, y=0, z=90}, {x=90, y=0, z=180}, {x=90, y=0, z=-90},
{x=-90, y=0, z=0}, {x=-90, y=0, z=-90}, {x=-90, y=0, z=180}, {x=-90, y=0, z=90},
{x=0, y=0, z=-90}, {x=90, y=90, z=0}, {x=180, y=0, z=90}, {x=0, y=-90, z=-90},
{x=0, y=0, z=90}, {x=0, y=90, z=90}, {x=180, y=0, z=-90}, {x=0, y=-90, z=90},
{x=180, y=180, z=0}, {x=180, y=90, z=0}, {x=180, y=0, z=0}, {x=180, y=-90, z=0},
}
}
local modpath = minetest.get_modpath(minetest.get_current_modname())
local input = io.open(modpath.."/meshnode.conf", "r")
if input then
dofile(modpath.."/meshnode.conf")
input:close()
input = nil
end
function meshnode:get_drawtype(pos)
local node = minetest.get_node(pos)
local item = minetest.registered_items[node.name]
if item then
return item.drawtype
end
end
function meshnode:create(pos, parent)
local node = minetest.get_node(pos)
local item = minetest.registered_items[node.name]
local object = nil
local rotation = {x=0, y=0, z=0}
if item then
if item.tiles then
local t = item.tiles
local textures = {t[1], t[1], t[1], t[1], t[1], t[1]}
if #t == 3 then
textures = {t[1], t[2], t[3], t[3], t[3], t[3]}
elseif #t == 6 then
textures = t
end
local properties = {textures=textures}
if item.drawtype == "fencelike" then
textures = {
"meshnode_trans.png",
"meshnode_trans.png",
"meshnode_trans.png",
"meshnode_trans.png",
t[1],
}
local p = pos
if self:get_drawtype({x=p.x, y=p.y, z=p.z + 1}) == "fencelike" then
textures[1] = t[1]
end
if self:get_drawtype({x=p.x - 1, y=p.y, z=p.z}) == "fencelike" then
textures[2] = t[1]
end
if self:get_drawtype({x=p.x + 1, y=p.y, z=p.z}) == "fencelike" then
textures[3] = t[1]
end
if self:get_drawtype({x=p.x, y=p.y, z=p.z - 1}) == "fencelike" then
textures[4] = t[1]
end
object = minetest.add_entity(pos, "meshnode:mesh")
properties.textures = textures
properties.mesh = "meshnode_fence.x"
properties.visual = "mesh"
elseif item.drawtype == "plantlike" then
object = minetest.add_entity(pos, "meshnode:mesh")
properties.textures = {textures[1]}
properties.mesh = "meshnode_plant.x"
properties.visual = "mesh"
elseif string.find(node.name, "stairs:slab") then
object = minetest.add_entity(pos, "meshnode:mesh")
properties.textures = {textures[1]}
properties.mesh = "meshnode_slab.x"
properties.visual = "mesh"
elseif string.find(node.name, "stairs:stair") then
object = minetest.add_entity(pos, "meshnode:mesh")
properties.textures = {textures[1]}
properties.mesh = "meshnode_stair.x"
properties.visual = "mesh"
elseif item.drawtype == "normal" or
item.drawtype == "allfaces_optional" or
item.drawtype == "glasslike" then
object = minetest.add_entity(pos, "meshnode:mesh")
properties.visual = "cube"
end
if object then
object:set_properties(properties)
local facedir = node.param2
if item.paramtype2 == "facedir" and facedir then
rotation = self.face_rotation[facedir + 1]
end
if parent then
local offset = vector.subtract(pos, parent:getpos())
offset = vector.multiply(offset, {x=10,y=10,z=10})
object:set_attach(parent, "", offset, rotation)
end
end
end
end
return object, rotation
end

1
mod.conf Normal file
View File

@ -0,0 +1 @@
name = meshnode

BIN
models/meshnode_ctrl.b3d Normal file

Binary file not shown.

1348
models/meshnode_ctrl.obj Normal file

File diff suppressed because it is too large Load Diff

166
models/meshnode_fence.obj Normal file
View File

@ -0,0 +1,166 @@
# Blender v2.76 (sub 0) OBJ File: 'meshnode_fence.blend'
# www.blender.org
mtllib meshnode_fence.mtl
v 0.625000 1.875000 -5.000000
v 0.625000 1.875000 -1.250000
v -0.625000 1.875000 -1.250000
v -0.625000 1.875000 -5.000000
v 0.625000 3.125000 -5.000000
v 0.625000 3.125000 -1.250000
v -0.625000 3.125000 -1.250000
v -0.625000 3.125000 -5.000000
v -0.625000 -1.875000 -5.000000
v -0.625000 -1.875000 -1.250000
v 0.625000 -1.875000 -1.250000
v 0.625000 -1.875000 -5.000000
v -0.625000 -3.125000 -5.000000
v -0.625000 -3.125000 -1.250000
v 0.625000 -3.125000 -1.250000
v 0.625000 -3.125000 -5.000000
v -5.000000 1.875000 -0.624998
v -1.250000 1.875000 -0.625000
v -1.250000 1.875000 0.625000
v -5.000000 1.875000 0.625002
v -5.000000 3.125000 -0.624998
v -1.250000 3.125000 -0.625000
v -1.250000 3.125000 0.625000
v -5.000000 3.125000 0.625002
v -5.000000 -1.875000 0.625002
v -1.250000 -1.875000 0.625000
v -1.250000 -1.875000 -0.625000
v -5.000000 -1.875000 -0.624998
v -5.000000 -3.125000 0.625002
v -1.250000 -3.125000 0.625000
v -1.250000 -3.125000 -0.625000
v -5.000000 -3.125000 -0.624998
v 1.250004 1.875000 -0.624998
v 5.000004 1.875000 -0.625000
v 5.000005 1.875000 0.625000
v 1.250005 1.875000 0.625002
v 1.250005 3.125000 -0.624998
v 5.000005 3.125000 -0.625000
v 5.000005 3.125000 0.625000
v 1.250005 3.125000 0.625002
v 1.250005 -1.875000 0.625002
v 5.000005 -1.875000 0.625000
v 5.000005 -1.875000 -0.625000
v 1.250005 -1.875000 -0.624998
v 1.250005 -3.125000 0.625002
v 5.000005 -3.125000 0.625000
v 5.000004 -3.125000 -0.625000
v 1.250004 -3.125000 -0.624998
v 0.625000 1.875000 1.250006
v 0.625000 1.875000 5.000006
v -0.625000 1.875000 5.000006
v -0.625000 1.875000 1.250005
v 0.625000 3.125000 1.250006
v 0.625000 3.125000 5.000006
v -0.625000 3.125000 5.000005
v -0.625000 3.125000 1.250006
v -0.625000 -1.875000 1.250006
v -0.625000 -1.875000 5.000005
v 0.625000 -1.875000 5.000006
v 0.625000 -1.875000 1.250006
v -0.625000 -3.125000 1.250005
v -0.625000 -3.125000 5.000006
v 0.625000 -3.125000 5.000006
v 0.625000 -3.125000 1.250006
v 1.250000 -5.000000 -1.250000
v 1.250000 -5.000000 1.250000
v -1.250000 -5.000000 1.250000
v -1.250000 -5.000000 -1.250000
v 1.250000 5.000000 -1.250000
v 1.250000 5.000000 1.250000
v -1.250000 5.000000 1.250000
v -1.250000 5.000000 -1.250000
vt 0.375000 0.625000
vt 0.375000 0.375000
vt 0.625000 0.375000
vt 0.625000 0.625000
vt 0.625000 0.000000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.375000 0.000000
vt 1.000000 0.750000
vt 0.625000 0.750000
vt 1.000000 0.625000
vt 1.000000 0.875000
vt 1.000000 1.000000
vt 0.625000 0.875000
vt 0.625000 0.500000
vt 1.000000 0.500000
vt 0.625000 0.125000
vt 1.000000 0.000000
vt 1.000000 0.125000
vt 1.000000 0.250000
vt 1.000000 0.375000
vt 0.625000 0.250000
vt 0.375000 0.750000
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 0.375000 0.875000
vt -0.000000 1.000000
vt 0.000000 0.875000
vt -0.000000 0.500000
vt 0.375000 0.500000
vt -0.000000 0.125000
vt 0.000000 -0.000000
vt 0.375000 0.125000
vt 0.375000 0.250000
vt -0.000000 0.375000
vt -0.000000 0.250000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 1.000000 0.000000 0.000000
vn -0.000000 -0.000000 1.000000
vn -1.000000 -0.000000 -0.000000
vn 0.000000 0.000000 -1.000000
g Cube_Cube_post
usemtl post
s off
f 65/1/1 66/2/1 67/3/1 68/4/1
f 69/2/2 72/3/2 71/4/2 70/1/2
f 65/5/3 69/6/3 70/7/3 66/8/3
f 66/5/4 70/6/4 71/7/4 67/8/4
f 67/5/5 71/6/5 72/7/5 68/8/5
f 69/7/6 65/8/6 68/5/6 72/6/6
g Cube_Cube_rail_1
usemtl rail_1
f 1/9/1 2/10/1 3/4/1 4/11/1
f 5/12/2 8/13/2 7/6/2 6/14/2
f 1/9/3 5/12/3 6/14/3 2/10/3
f 3/4/5 7/15/5 8/16/5 4/11/5
f 14/17/5 10/5/5 9/18/5 13/19/5
f 16/20/3 12/21/3 11/3/3 15/22/3
f 12/21/2 9/16/2 10/15/2 11/3/2
f 16/20/1 15/22/1 14/17/1 13/19/1
g Cube_Cube_rail_2
usemtl rail_2
f 33/4/1 34/11/1 35/9/1 36/10/1
f 37/6/2 40/14/2 39/12/2 38/13/2
f 33/4/6 37/15/6 38/16/6 34/11/6
f 35/9/4 39/12/4 40/14/4 36/10/4
f 46/20/4 42/21/4 41/3/4 45/22/4
f 48/18/6 44/19/6 43/17/6 47/5/6
f 44/15/2 41/3/2 42/21/2 43/16/2
f 48/17/1 47/19/1 46/20/1 45/22/1
g Cube_Cube_rail_3
usemtl rail_3
f 49/23/1 50/24/1 51/25/1 52/1/1
f 53/26/2 56/7/2 55/27/2 54/28/2
f 49/23/3 53/26/3 54/28/3 50/24/3
f 51/25/5 55/29/5 56/30/5 52/1/5
f 62/31/5 58/32/5 57/8/5 61/33/5
f 64/34/3 60/2/3 59/35/3 63/36/3
f 60/2/2 57/30/2 58/29/2 59/35/2
f 64/34/1 63/36/1 62/31/1 61/33/1
g Cube_Cube_rail_4
usemtl rail_4
f 17/25/1 18/1/1 19/23/1 20/24/1
f 21/27/2 24/28/2 23/26/2 22/7/2
f 17/25/6 21/29/6 22/30/6 18/1/6
f 19/23/4 23/26/4 24/28/4 20/24/4
f 30/34/4 26/2/4 25/35/4 29/36/4
f 32/31/6 28/32/6 27/8/6 31/33/6
f 28/29/2 25/35/2 26/2/2 27/30/2
f 32/31/1 31/33/1 30/34/1 29/36/1

View File

@ -1,633 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube {
FrameTransformMatrix {
1.250000, 0.000000, 0.000000, 0.000000,
0.000000, 1.250000, 0.000000, 0.000000,
0.000000, 0.000000, 5.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh { //Cube_007 Mesh
152;
-0.500000; 4.000000; 0.475000;,
-0.500000; 1.000000; 0.475000;,
0.500000; 1.000000; 0.475000;,
0.500000; 4.000000; 0.475000;,
0.500000; 1.000000; 0.725000;,
-0.500000; 1.000000; 0.725000;,
-0.500000; 4.000000; 0.725000;,
0.500000; 4.000000; 0.725000;,
0.500000; 1.000000; 0.475000;,
0.500000; 1.000000; 0.725000;,
0.500000; 4.000000; 0.725000;,
0.500000; 4.000000; 0.475000;,
-0.500000; 4.000000; 0.475000;,
-0.500000; 4.000000; 0.725000;,
-0.500000; 1.000000; 0.725000;,
-0.500000; 1.000000; 0.475000;,
-0.500000; 4.000000;-0.712500;,
-0.500000; 4.000000;-0.462500;,
-0.500000; 1.000000;-0.462500;,
-0.500000; 1.000000;-0.712500;,
0.500000; 1.000000;-0.712500;,
0.500000; 1.000000;-0.462500;,
0.500000; 4.000000;-0.462500;,
0.500000; 4.000000;-0.712500;,
0.500000; 1.000000;-0.462500;,
-0.500000; 1.000000;-0.462500;,
-0.500000; 4.000000;-0.462500;,
0.500000; 4.000000;-0.462500;,
-0.500000; 4.000000;-0.712500;,
-0.500000; 1.000000;-0.712500;,
0.500000; 1.000000;-0.712500;,
0.500000; 4.000000;-0.712500;,
-4.000000;-0.500001; 0.475000;,
-1.000000;-0.500000; 0.475000;,
-1.000000; 0.500000; 0.475000;,
-4.000000; 0.499998; 0.475000;,
-1.000000; 0.500000; 0.725000;,
-1.000000;-0.500000; 0.725000;,
-4.000000;-0.500001; 0.725000;,
-4.000000; 0.499999; 0.725000;,
-1.000000; 0.500000; 0.475000;,
-1.000000; 0.500000; 0.725000;,
-4.000000; 0.499999; 0.725000;,
-4.000000; 0.499998; 0.475000;,
-4.000000;-0.500001; 0.475000;,
-4.000000;-0.500001; 0.725000;,
-1.000000;-0.500000; 0.725000;,
-1.000000;-0.500000; 0.475000;,
-4.000000;-0.500001;-0.712500;,
-4.000000;-0.500001;-0.462500;,
-1.000000;-0.500000;-0.462500;,
-1.000000;-0.500000;-0.712500;,
-1.000000; 0.500000;-0.712500;,
-1.000000; 0.500000;-0.462500;,
-4.000000; 0.499999;-0.462500;,
-4.000000; 0.499998;-0.712500;,
-1.000000; 0.500000;-0.462500;,
-1.000000;-0.500000;-0.462500;,
-4.000000;-0.500001;-0.462500;,
-4.000000; 0.499999;-0.462500;,
-4.000000;-0.500001;-0.712500;,
-1.000000;-0.500000;-0.712500;,
-1.000000; 0.500000;-0.712500;,
-4.000000; 0.499998;-0.712500;,
1.000004;-0.500001; 0.475000;,
4.000004;-0.500000; 0.475000;,
4.000003; 0.500000; 0.475000;,
1.000003; 0.499998; 0.475000;,
4.000004; 0.500000; 0.725000;,
4.000004;-0.500000; 0.725000;,
1.000004;-0.500001; 0.725000;,
1.000004; 0.499999; 0.725000;,
4.000003; 0.500000; 0.475000;,
4.000004; 0.500000; 0.725000;,
1.000004; 0.499999; 0.725000;,
1.000003; 0.499998; 0.475000;,
1.000004;-0.500001; 0.475000;,
1.000004;-0.500001; 0.725000;,
4.000004;-0.500000; 0.725000;,
4.000004;-0.500000; 0.475000;,
1.000004;-0.500001;-0.712500;,
1.000004;-0.500001;-0.462500;,
4.000004;-0.500000;-0.462500;,
4.000004;-0.500000;-0.712500;,
4.000003; 0.500000;-0.712500;,
4.000004; 0.500000;-0.462500;,
1.000004; 0.499999;-0.462500;,
1.000003; 0.499998;-0.712500;,
4.000004; 0.500000;-0.462500;,
4.000004;-0.500000;-0.462500;,
1.000004;-0.500001;-0.462500;,
1.000004; 0.499999;-0.462500;,
1.000004;-0.500001;-0.712500;,
4.000004;-0.500000;-0.712500;,
4.000003; 0.500000;-0.712500;,
1.000003; 0.499998;-0.712500;,
-0.500000;-1.000004; 0.475000;,
-0.500000;-4.000005; 0.475000;,
0.500000;-4.000005; 0.475000;,
0.500000;-1.000005; 0.475000;,
0.500000;-4.000005; 0.725000;,
-0.500000;-4.000004; 0.725000;,
-0.500000;-1.000005; 0.725000;,
0.500000;-1.000005; 0.725000;,
0.500000;-4.000005; 0.475000;,
0.500000;-4.000005; 0.725000;,
0.500000;-1.000005; 0.725000;,
0.500000;-1.000005; 0.475000;,
-0.500000;-1.000004; 0.475000;,
-0.500000;-1.000005; 0.725000;,
-0.500000;-4.000004; 0.725000;,
-0.500000;-4.000005; 0.475000;,
-0.500000;-1.000004;-0.712500;,
-0.500000;-1.000005;-0.462500;,
-0.500000;-4.000004;-0.462500;,
-0.500000;-4.000005;-0.712500;,
0.500000;-4.000005;-0.712500;,
0.500000;-4.000005;-0.462500;,
0.500000;-1.000005;-0.462500;,
0.500000;-1.000005;-0.712500;,
0.500000;-4.000005;-0.462500;,
-0.500000;-4.000004;-0.462500;,
-0.500000;-1.000005;-0.462500;,
0.500000;-1.000005;-0.462500;,
-0.500000;-1.000004;-0.712500;,
-0.500000;-4.000005;-0.712500;,
0.500000;-4.000005;-0.712500;,
0.500000;-1.000005;-0.712500;,
-1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000;-1.000000; 1.000000;,
-1.000000;-1.000000; 1.000000;,
-1.000000; 1.000000; 1.000000;,
1.000000; 1.000000; 1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000;-1.000000; 1.000000;,
1.000000; 1.000000; 1.000000;,
1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000; 1.000000;,
1.000000;-1.000000; 1.000000;,
1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000;-1.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000;-1.000000; 1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000; 1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000; 1.000000; 1.000000;;
38;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;;
MeshNormals { //Cube_007 Normals
152;
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
0.000001;-1.000000;-0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
-0.000001; 1.000000; 0.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000; 1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
-1.000000; 0.000000;-0.000001;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;;
38;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;,
4;44;45;46;47;,
4;48;49;50;51;,
4;52;53;54;55;,
4;56;57;58;59;,
4;60;61;62;63;,
4;64;65;66;67;,
4;68;69;70;71;,
4;72;73;74;75;,
4;76;77;78;79;,
4;80;81;82;83;,
4;84;85;86;87;,
4;88;89;90;91;,
4;92;93;94;95;,
4;96;97;98;99;,
4;100;101;102;103;,
4;104;105;106;107;,
4;108;109;110;111;,
4;112;113;114;115;,
4;116;117;118;119;,
4;120;121;122;123;,
4;124;125;126;127;,
4;128;129;130;131;,
4;132;133;134;135;,
4;136;137;138;139;,
4;140;141;142;143;,
4;144;145;146;147;,
4;148;149;150;151;;
} //End of Cube_007 Normals
MeshMaterialList { //Cube_007 Material List
5;
38;
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
2,
2,
2,
2,
2,
2,
2,
2,
3,
3,
3,
3,
3,
3,
3,
3,
4,
4,
4,
4,
4,
4;;
Material rail_1 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
Material rail_4 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
Material rail_2 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
Material rail_3 {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.500000; 0.500000; 0.500000;;
0.000000; 0.000000; 0.000000;;
}
Material post {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.073171; 0.073171; 0.073171;;
0.000000; 0.000000; 0.000000;;
}
} //End of Cube_007 Material List
MeshTextureCoords { //Cube_007 UV Coordinates
152;
0.500000; 0.750000;,
1.000000; 0.750000;,
1.000000; 0.875000;,
0.500000; 0.875000;,
0.500000; 0.562500;,
0.500000; 0.437500;,
1.000000; 0.437500;,
1.000000; 0.562500;,
0.500000; 0.500000;,
0.500000; 0.375000;,
1.000000; 0.375000;,
1.000000; 0.500000;,
0.500000; 0.687500;,
0.500000; 0.562500;,
1.000000; 0.562500;,
1.000000; 0.687500;,
0.500000; 0.687500;,
0.500000; 0.562500;,
1.000000; 0.562500;,
1.000000; 0.687500;,
0.500000; 0.500000;,
0.500000; 0.375000;,
1.000000; 0.375000;,
1.000000; 0.500000;,
0.500000; 0.562500;,
0.500000; 0.437500;,
1.000000; 0.437500;,
1.000000; 0.562500;,
0.500000; 0.750000;,
1.000000; 0.750000;,
1.000000; 0.875000;,
0.500000; 0.875000;,
0.562500; 0.375000;,
0.000000; 0.375000;,
0.000000; 0.250000;,
0.562500; 0.250000;,
0.000000; 0.187500;,
0.000000; 0.062500;,
0.500000; 0.062500;,
0.500000; 0.187500;,
0.000000; 1.000000;,
0.000000; 0.875000;,
0.500000; 0.875000;,
0.500000; 1.000000;,
0.500000; 0.625000;,
0.500000; 0.500000;,
1.000000; 0.500000;,
1.000000; 0.625000;,
0.500000; 0.625000;,
0.500000; 0.500000;,
1.000000; 0.500000;,
1.000000; 0.625000;,
0.000000; 1.000000;,
0.000000; 0.875000;,
0.500000; 0.875000;,
0.500000; 1.000000;,
0.000000; 0.187500;,
0.000000; 0.062500;,
0.500000; 0.062500;,
0.500000; 0.187500;,
0.562500; 0.375000;,
0.000000; 0.375000;,
0.000000; 0.250000;,
0.562500; 0.250000;,
1.000000; 0.375000;,
0.500000; 0.375000;,
0.500000; 0.250000;,
1.000000; 0.250000;,
0.500000; 0.187500;,
0.500000; 0.062500;,
1.000000; 0.062500;,
1.000000; 0.187500;,
0.500000; 1.000000;,
0.500000; 0.875000;,
1.000000; 0.875000;,
1.000000; 1.000000;,
0.000000; 0.625000;,
0.000000; 0.500000;,
0.500000; 0.500000;,
0.500000; 0.625000;,
0.000000; 0.625000;,
0.000000; 0.500000;,
0.500000; 0.500000;,
0.500000; 0.625000;,
0.500000; 1.000000;,
0.500000; 0.875000;,
1.000000; 0.875000;,
1.000000; 1.000000;,
0.500000; 0.187500;,
0.500000; 0.062500;,
1.000000; 0.062500;,
1.000000; 0.187500;,
1.000000; 0.375000;,
0.500000; 0.375000;,
0.500000; 0.250000;,
1.000000; 0.250000;,
0.500000; 0.875000;,
0.000000; 0.875000;,
0.000000; 0.750000;,
0.500000; 0.750000;,
0.500000; 0.437500;,
0.500000; 0.562500;,
0.000000; 0.562500;,
0.000000; 0.437500;,
0.000000; 0.500000;,
0.000000; 0.375000;,
0.500000; 0.375000;,
0.500000; 0.500000;,
0.000000; 0.687500;,
0.000000; 0.562500;,
0.500000; 0.562500;,
0.500000; 0.687500;,
0.000000; 0.687500;,
0.000000; 0.562500;,
0.500000; 0.562500;,
0.500000; 0.687500;,
0.000000; 0.500000;,
0.000000; 0.375000;,
0.500000; 0.375000;,
0.500000; 0.500000;,
0.500000; 0.437500;,
0.500000; 0.562500;,
0.000000; 0.562500;,
0.000000; 0.437500;,
0.500000; 0.875000;,
0.000000; 0.875000;,
0.000000; 0.750000;,
0.500000; 0.750000;,
0.375000; 0.375000;,
0.625000; 0.375000;,
0.625000; 0.625000;,
0.375000; 0.625000;,
0.375000; 0.625000;,
0.375000; 0.375000;,
0.625000; 0.375000;,
0.625000; 0.625000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 0.250000;,
0.000000; 0.250000;,
0.000000; 0.750000;,
1.000000; 0.750000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.250000;,
1.000000; 0.250000;,
1.000000; 0.500000;,
0.000000; 0.500000;,
1.000000; 0.750000;,
0.000000; 0.750000;,
0.000000; 0.500000;,
1.000000; 0.500000;;
} //End of Cube_007 UV Coordinates
} //End of Cube_007 Mesh
} //End of Cube
} //End of Root Frame

86
models/meshnode_pane.obj Normal file
View File

@ -0,0 +1,86 @@
# Blender v2.76 (sub 0) OBJ File: 'meshnode_pane.blend'
# www.blender.org
mtllib meshnode_pane.mtl
v -0.312500 -5.000000 -5.000000
v -0.312500 5.000000 -5.000000
v 0.312500 5.000000 -5.000000
v 0.312500 -5.000000 -5.000000
v -0.312500 5.000000 0.000000
v -0.312500 -5.000000 0.000000
v 0.312500 5.000000 0.000000
v 0.312500 -5.000000 0.000000
v 5.000000 -5.000000 -0.312500
v 5.000000 5.000000 -0.312500
v 5.000000 5.000000 0.312500
v 5.000000 -5.000000 0.312500
v 0.000000 5.000000 -0.312500
v 0.000000 -5.000000 -0.312500
v 0.000000 5.000000 0.312500
v 0.000000 -5.000000 0.312500
v -0.312500 -5.000000 5.000000
v -0.312500 5.000000 5.000000
v 0.312500 5.000000 5.000000
v 0.312500 -5.000000 5.000000
v -0.312500 5.000000 0.000000
v -0.312500 -5.000000 0.000000
v 0.312500 5.000000 0.000000
v 0.312500 -5.000000 0.000000
v -5.000000 -5.000000 -0.312500
v -5.000000 5.000000 -0.312500
v -5.000000 5.000000 0.312500
v -5.000000 -5.000000 0.312500
v 0.000000 5.000000 -0.312500
v 0.000000 -5.000000 -0.312500
v 0.000000 5.000000 0.312500
v 0.000000 -5.000000 0.312500
vt 0.500000 1.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.500000 0.000000
vt 0.500000 0.937500
vt 1.000000 0.937500
vt 1.000000 0.062500
vt 0.500000 0.062500
vt 0.937500 1.000000
vt 0.937500 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.062500 1.000000
vt 0.062500 0.000000
vt 0.000000 0.937500
vt 0.000000 0.062500
vn -1.000000 0.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
g Cube_Cube.001_Pane_1
usemtl Pane_1
s off
f 5/1/1 2/2/1 1/3/1 6/4/1
f 7/5/2 3/6/2 2/2/2 5/1/2
f 6/4/3 1/3/3 4/7/3 8/8/3
f 2/9/4 3/2/4 4/3/4 1/10/4
f 4/3/5 3/2/5 7/1/5 8/4/5
g Cube_Cube.001_Pane_2
usemtl Pane_2
f 13/1/4 10/11/4 9/12/4 14/4/4
f 10/11/5 11/13/5 12/14/5 9/12/5
f 10/15/2 13/5/2 15/1/2 11/11/2
f 12/12/3 16/4/3 14/8/3 9/16/3
f 11/11/6 15/1/6 16/4/6 12/12/6
g Cube_Cube.001_Pane_3
usemtl Pane_3
f 19/11/6 18/13/6 17/14/6 20/12/6
f 17/12/3 22/4/3 24/8/3 20/16/3
f 19/15/2 23/5/2 21/1/2 18/11/2
f 18/11/1 21/1/1 22/4/1 17/12/1
f 19/11/5 20/12/5 24/4/5 23/1/5
g Cube_Cube.001_Pane_4
usemtl Pane_4
f 27/9/1 26/2/1 25/3/1 28/10/1
f 32/4/3 28/3/3 25/7/3 30/8/3
f 29/5/2 26/6/2 27/2/2 31/1/2
f 28/3/6 32/4/6 31/1/6 27/2/6
f 26/2/4 29/1/4 30/4/4 25/3/4

34
models/meshnode_plant.obj Normal file
View File

@ -0,0 +1,34 @@
# Blender v2.76 (sub 0) OBJ File: 'meshnode_plant.blend'
# www.blender.org
mtllib meshnode_plant.mtl
o Cube
v -3.531999 5.000000 3.539069
v 3.539071 5.000000 -3.531997
v 3.531999 5.000000 -3.539069
v -3.539071 5.000000 3.531997
v -3.532001 -5.000000 3.539069
v 3.539071 -5.000000 -3.531996
v 3.531999 -5.000000 -3.539069
v -3.539070 -5.000000 3.531997
v -3.539068 -5.000000 -3.532000
v -3.531997 -5.000000 -3.539071
v 3.539068 -5.000000 3.532000
v 3.531995 -5.000000 3.539071
v -3.539069 5.000000 -3.531999
v -3.531997 5.000000 -3.539071
v 3.539069 5.000000 3.531999
v 3.531997 5.000000 3.539071
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 -0.000000
vt 0.000000 1.000000
vn 0.707100 -0.000000 0.707100
vn -0.707100 -0.000000 -0.707100
vn 0.707100 -0.000000 -0.707100
vn -0.707100 0.000000 0.707100
usemtl Material
s off
f 1/1/1 5/2/1 6/3/1 2/4/1
f 8/2/2 4/1/2 3/4/2 7/3/2
f 10/2/3 14/1/3 15/4/3 11/3/3
f 13/1/4 9/2/4 12/3/4 16/4/4

View File

@ -1,99 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube {
FrameTransformMatrix {
3.535533,-3.535535, 0.000000, 0.000000,
3.535535, 3.535533, 0.000000, 0.000000,
0.000000, 0.000000, 5.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh { //Cube_003 Mesh
16;
-0.001000;-1.000000; 1.000000;,
-0.001000;-1.000000;-1.000000;,
-0.001000; 1.000000;-1.000000;,
-0.001000; 1.000000; 1.000000;,
0.001000;-1.000000;-1.000000;,
0.001000;-1.000000; 1.000000;,
0.001000; 1.000000; 1.000000;,
0.001000; 1.000000;-1.000000;,
-1.000000;-0.001000;-1.000000;,
-1.000000;-0.001000; 1.000000;,
1.000000;-0.001000; 1.000000;,
1.000000;-0.001000;-1.000000;,
-1.000000; 0.001000; 1.000000;,
-1.000000; 0.001000;-1.000000;,
1.000000; 0.001000;-1.000000;,
1.000000; 0.001000; 1.000000;;
4;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;;
MeshNormals { //Cube_003 Normals
16;
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;;
4;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;;
} //End of Cube_003 Normals
MeshMaterialList { //Cube_003 Material List
1;
4;
0,
0,
0,
0;;
Material Material {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.073171; 0.073171; 0.073171;;
0.000000; 0.000000; 0.000000;;
}
} //End of Cube_003 Material List
MeshTextureCoords { //Cube_003 UV Coordinates
16;
0.000000; 0.000000;,
0.000000; 1.000000;,
1.000000; 1.000000;,
1.000000; 0.000000;,
-0.000000; 1.000000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 1.000000;,
0.000000; 0.000000;,
0.000000; 1.000000;,
1.000000; 1.000000;,
1.000000; 0.000000;;
} //End of Cube_003 UV Coordinates
} //End of Cube_003 Mesh
} //End of Cube
} //End of Root Frame

View File

@ -1,130 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube {
FrameTransformMatrix {
5.000000, 0.000000, 0.000000, 0.000000,
0.000000, 5.000000, 0.000000, 0.000000,
0.000000, 0.000000, 5.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh { //Cube_001 Mesh
24;
-1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000;-1.000000; 0.000000;,
-1.000000;-1.000000; 0.000000;,
-1.000000; 1.000000; 0.000000;,
1.000000; 1.000000; 0.000000;,
1.000000;-1.000000;-1.000000;,
1.000000;-1.000000; 0.000000;,
1.000000; 1.000000; 0.000000;,
1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000; 0.000000;,
1.000000;-1.000000; 0.000000;,
1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000;-1.000000;,
-1.000000; 1.000000; 0.000000;,
-1.000000;-1.000000; 0.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000; 0.000000;,
-1.000000; 1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000; 1.000000; 0.000000;;
6;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;;
MeshNormals { //Cube_001 Normals
24;
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;;
6;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;;
} //End of Cube_001 Normals
MeshMaterialList { //Cube_001 Material List
1;
6;
0,
0,
0,
0,
0,
0;;
Material Material {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.073171; 0.073171; 0.073171;;
0.000000; 0.000000; 0.000000;;
TextureFilename {"wood.png";}
}
} //End of Cube_001 Material List
MeshTextureCoords { //Cube_001 UV Coordinates
24;
0.000000; 1.000000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 1.000000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;;
} //End of Cube_001 UV Coordinates
} //End of Cube_001 Mesh
} //End of Cube
} //End of Root Frame

View File

@ -1,204 +0,0 @@
xof 0303txt 0032
Frame Root {
FrameTransformMatrix {
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 1.000000,-0.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Frame Cube {
FrameTransformMatrix {
5.000000, 0.000000, 0.000000, 0.000000,
0.000000, 5.000000, 0.000000, 0.000000,
0.000000, 0.000000, 5.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000;;
}
Mesh { //Cube_002 Mesh
44;
1.000000; 0.000000; 1.000000;,
-1.000000; 0.000000; 1.000000;,
-1.000000; 1.000000; 1.000000;,
1.000000; 1.000000; 1.000000;,
1.000000; 0.000000; 0.000000;,
1.000000; 0.000000; 1.000000;,
1.000000; 1.000000; 1.000000;,
1.000000; 1.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 0.000000; 1.000000;,
1.000000; 0.000000; 1.000000;,
1.000000; 0.000000; 0.000000;,
-1.000000; 1.000000; 0.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000; 0.000000; 1.000000;,
-1.000000; 0.000000; 0.000000;,
-1.000000; 1.000000; 1.000000;,
-1.000000; 1.000000; 0.000000;,
1.000000; 1.000000; 0.000000;,
1.000000; 1.000000; 1.000000;,
-1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000;-1.000000;-1.000000;,
1.000000;-1.000000; 0.000000;,
1.000000; 1.000000; 0.000000;,
1.000000; 1.000000;-1.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000;-1.000000; 0.000000;,
1.000000;-1.000000; 0.000000;,
1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000;-1.000000;,
-1.000000; 1.000000; 0.000000;,
-1.000000;-1.000000; 0.000000;,
-1.000000;-1.000000;-1.000000;,
-1.000000; 1.000000; 0.000000;,
-1.000000; 1.000000;-1.000000;,
1.000000; 1.000000;-1.000000;,
1.000000; 1.000000; 0.000000;,
1.000000;-1.000000; 0.000000;,
-1.000000;-1.000000; 0.000000;,
-1.000000; 0.000000; 0.000000;,
1.000000; 0.000000; 0.000000;;
11;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;;
MeshNormals { //Cube_002 Normals
44;
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
0.000000;-1.000000; 0.000000;,
-1.000000;-0.000000; 0.000000;,
-1.000000;-0.000000; 0.000000;,
-1.000000;-0.000000; 0.000000;,
-1.000000;-0.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
-0.000000; 1.000000; 0.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
0.000000; 0.000000;-1.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
1.000000;-0.000000; 0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-0.000000;-1.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
-1.000000; 0.000000;-0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000; 1.000000; 0.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;,
0.000000;-0.000000; 1.000000;;
11;
4;0;1;2;3;,
4;4;5;6;7;,
4;8;9;10;11;,
4;12;13;14;15;,
4;16;17;18;19;,
4;20;21;22;23;,
4;24;25;26;27;,
4;28;29;30;31;,
4;32;33;34;35;,
4;36;37;38;39;,
4;40;41;42;43;;
} //End of Cube_002 Normals
MeshMaterialList { //Cube_002 Material List
1;
11;
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0;;
Material Material {
0.640000; 0.640000; 0.640000; 1.000000;;
96.078431;
0.073171; 0.073171; 0.073171;;
0.000000; 0.000000; 0.000000;;
}
} //End of Cube_002 Material List
MeshTextureCoords { //Cube_002 UV Coordinates
44;
1.000000; 0.500000;,
0.000000; 0.500000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
0.500000; 0.500000;,
0.500000; 0.000000;,
1.000000; 0.000000;,
1.000000; 0.500000;,
0.000000; 0.500000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 0.500000;,
0.000000; 0.500000;,
0.000000; 0.000000;,
0.500000; 0.000000;,
0.500000; 0.500000;,
1.000000; 0.000000;,
1.000000; 0.500000;,
0.000000; 0.500000;,
-0.000000; 0.000000;,
-0.000000; 1.000000;,
0.000000; 0.000000;,
1.000000; 0.000000;,
1.000000; 1.000000;,
-0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
-0.000000; 1.000000;,
0.000000; 0.498216;,
1.000000; 0.498216;,
1.000000; 1.000000;,
1.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 1.000000;,
0.000000; 1.000000;,
0.000000; 0.500000;,
1.000000; 0.500000;;
} //End of Cube_002 UV Coordinates
} //End of Cube_002 Mesh
} //End of Cube
} //End of Root Frame

112
models/meshnode_wall.obj Normal file
View File

@ -0,0 +1,112 @@
# Blender v2.76 (sub 0) OBJ File: 'meshnode_wall.blend'
# www.blender.org
mtllib meshnode_wall.mtl
v -2.500000 -5.000000 2.500000
v -2.500000 5.000000 2.500000
v -2.500000 -5.000000 -2.500000
v -2.500000 5.000000 -2.500000
v 2.500000 -5.000000 2.500000
v 2.500000 5.000000 2.500000
v 2.500000 -5.000000 -2.500000
v 2.500000 5.000000 -2.500000
v 2.500000 -5.000000 1.875000
v 2.500000 3.750000 1.875000
v 2.500000 -5.000000 -1.875000
v 2.500000 3.750000 -1.875000
v 5.000000 -5.000000 1.875000
v 5.000000 3.750000 1.875000
v 5.000000 -5.000000 -1.875000
v 5.000000 3.750000 -1.875000
v -2.500000 -5.000000 -1.875000
v -2.500000 3.750000 -1.875000
v -2.500000 -5.000000 1.875000
v -2.500000 3.750000 1.875000
v -5.000000 -5.000000 -1.875000
v -5.000000 3.750000 -1.875000
v -5.000000 -5.000000 1.875000
v -5.000000 3.750000 1.875000
v 1.875000 -5.000000 -2.500000
v 1.875000 3.750000 -2.500000
v -1.875000 -5.000000 -2.500000
v -1.875000 3.750000 -2.500000
v 1.875000 -5.000000 -5.000000
v 1.875000 3.750000 -5.000000
v -1.875000 -5.000000 -5.000000
v -1.875000 3.750000 -5.000000
v -1.875000 -5.000000 2.500000
v -1.875000 3.750000 2.500000
v 1.875000 -5.000000 2.500000
v 1.875000 3.750000 2.500000
v -1.875000 -5.000000 5.000000
v -1.875000 3.750000 5.000000
v 1.875000 -5.000000 5.000000
v 1.875000 3.750000 5.000000
vt 0.750000 1.000000
vt 0.250000 1.000000
vt 0.250000 0.000000
vt 0.750000 0.000000
vt 0.750000 0.250000
vt 0.750000 0.750000
vt 0.250000 0.750000
vt 0.250000 0.250000
vt 0.250000 0.875000
vt 0.000000 0.875000
vt 0.000000 0.000000
vt 1.000000 0.875000
vt 0.750000 0.875000
vt 1.000000 -0.000000
vt 0.312500 0.750000
vt 0.687500 0.750000
vt 0.687500 1.000000
vt 0.312500 1.000000
vt 0.312500 0.000000
vt 0.687500 0.000000
vt 0.687500 0.250000
vt 0.312500 0.250000
vt 0.250000 0.312500
vt 0.250000 0.687500
vt 0.000000 0.687500
vt 0.000000 0.312500
vt 0.750000 0.687500
vt 0.750000 0.312500
vt 1.000000 0.312500
vt 1.000000 0.687500
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
g Cube_Cube.001_Pillar
usemtl Pillar
s off
f 2/1/1 4/2/1 3/3/1 1/4/1
f 4/1/2 8/2/2 7/3/2 3/4/2
f 8/1/3 6/2/3 5/3/3 7/4/3
f 6/1/4 2/2/4 1/3/4 5/4/4
f 1/5/5 3/6/5 7/7/5 5/8/5
f 6/7/6 8/8/6 4/5/6 2/6/6
g Cube_Cube.001_Wall_1
usemtl Wall_1
f 28/9/1 32/10/1 31/11/1 27/3/1
f 30/12/3 26/13/3 25/4/3 29/14/3
f 25/15/5 27/16/5 31/17/5 29/18/5
f 30/19/6 32/20/6 28/21/6 26/22/6
g Cube_Cube.001_Wall_2
usemtl Wall_2
f 12/9/2 16/10/2 15/11/2 11/3/2
f 14/12/4 10/13/4 9/4/4 13/14/4
f 9/23/5 11/24/5 15/25/5 13/26/5
f 14/25/6 16/26/6 12/23/6 10/24/6
g Cube_Cube.001_Wall_3
usemtl Wall_3
f 36/9/3 40/10/3 39/11/3 35/3/3
f 38/12/1 34/13/1 33/4/1 37/14/1
f 33/21/5 35/22/5 39/19/5 37/20/5
f 38/17/6 40/18/6 36/15/6 34/16/6
g Cube_Cube.001_Wall_4
usemtl Wall_4
f 20/9/4 24/10/4 23/11/4 19/3/4
f 22/12/2 18/13/2 17/4/2 21/14/2
f 17/27/5 19/28/5 23/29/5 21/30/5
f 22/29/6 24/30/6 20/27/6 18/28/6

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
textures/meshnode_glue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 128 B