| 21 | } |
| 22 | |
| 23 | ScriptPatchNode ScriptPatchNode::getPatch(const ScriptSceneNode& node) |
| 24 | { |
| 25 | // Try to cast the node onto a patch |
| 26 | IPatchNodePtr patchNode = std::dynamic_pointer_cast<IPatchNode>( |
| 27 | static_cast<scene::INodePtr>(node) |
| 28 | ); |
| 29 | |
| 30 | // Construct a patchNode (contained node may be NULL) |
| 31 | return (patchNode != NULL) ? ScriptPatchNode(node) : ScriptPatchNode(scene::INodePtr()); |
| 32 | } |
| 33 | |
| 34 | void ScriptPatchNode::setDims(std::size_t width, std::size_t height) |
| 35 | { |