📄 classvtnode.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>vtlib library: vtNode Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.5 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li id="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>vtNode Class Reference<br><small>[<a class="el" href="group__sg.html">Scene Graph</a>]</small></h1><!-- doxytag: class="vtNode" --><!-- doxytag: inherits="vtNodeBase" -->Inheritance diagram for vtNode:<p><center><img src="classvtNode__inherit__graph.png" border="0" usemap="#vtNode__inherit__map" alt="Inheritance graph"></center><map name="vtNode__inherit__map"><area href="classvtGeom.html" shape="rect" coords="113,231,183,258" alt=""><area href="classvtGroup.html" shape="rect" coords="300,231,369,258" alt=""><area href="classvtLight.html" shape="rect" coords="393,231,455,258" alt=""><area href="classvtNativeNode.html" shape="rect" coords="479,231,583,258" alt=""><area href="classvtNodeBase.html" shape="rect" coords="332,82,425,108" alt=""><area href="classvtTarget.html" shape="rect" coords="344,7,413,34" alt=""><area href="classvtDynGeom.html" shape="rect" coords="7,306,100,332" alt=""><area href="classvtHUD.html" shape="rect" coords="124,306,185,332" alt=""><area href="classvtLOD.html" shape="rect" coords="209,306,271,332" alt=""><area href="classvtLodGrid.html" shape="rect" coords="295,306,375,332" alt=""><area href="classvtPagedStructureLOD.html" shape="rect" coords="399,306,551,332" alt=""><area href="classvtStarDome.html" shape="rect" coords="575,306,668,332" alt=""><area href="classvtTransform.html" shape="rect" coords="692,306,785,332" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classvtNode-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>Represents a node in the vtlib scenegraph. The scenegraph is simply a tree of nodes, with a root node at the top. <p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#c47952fcdc74de6e2d4a93c467232087">Release</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#055f9a4e14feb802f24aa4f01cdddfdd">SetEnabled</a> (bool bOn)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#3b8caaba3ddcee25d69907a90301f821">GetEnabled</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#9e2a156c7da1b82f197ee0066a060a79">SetName2</a> (const char *str)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#58bf79af98d517895e58459ee719fcee">GetName2</a> () const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#49e3adfad659f23aab334ca6d286b2ab">GetBoundBox</a> (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFBox3.html">FBox3</a> &box)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the Bounding Box of the node, in world coordinates. <a href="#49e3adfad659f23aab334ca6d286b2ab"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#9df1c6c25b1ec2adec4a219523acb16d">GetBoundSphere</a> (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFSphere.html">FSphere</a> &sphere, bool bGlobal=false)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#c48168fd731b269be813e4fecd15be41">GetPrimCounts</a> (<a class="el" href="structvtPrimInfo.html">vtPrimInfo</a> &info)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get information about the number of display primitives. <a href="#c48168fd731b269be813e4fecd15be41"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#b5b2afcdb89f4d7ee9b5c808609c4396">LocalToWorld</a> (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a> &point)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Transform a point from a node's local coordinates to world coordinates. <a href="#b5b2afcdb89f4d7ee9b5c808609c4396"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classvtGroup.html">vtGroup</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#9eb48e9ca50a3731160af17444f2b29f">GetParent</a> (int iParent=0)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#548e9b3ef86dda00bd740b25c84d235c">SetFog</a> (bool bOn, float start=0, float end=10000, const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classRGBf.html">RGBf</a> &color=s_white, enum FogType Type=FM_LINEAR)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#fcacaa595b9eaa17299f0a28d997f990">ApplyVertexRotation</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a> &axis, float angle)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#692e4e98ca0c791be2f866361da9c86a">ApplyVertexTransform</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFMatrix4.html">FMatrix4</a> &mat)</td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classvtNode.html">vtNode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtNode.html#d9ea8e42834eeeb1a102bb3da7843e76">LoadModel</a> (const char *filename, bool bAllowCache=true, bool bDisableMipmaps=false)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Load a 3D model file. <a href="#d9ea8e42834eeeb1a102bb3da7843e76"></a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="fcacaa595b9eaa17299f0a28d997f990"></a><!-- doxytag: member="vtNode::ApplyVertexRotation" ref="fcacaa595b9eaa17299f0a28d997f990" args="(const FPoint3 &axis, float angle)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtNode::ApplyVertexRotation </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFPoint3.html">FPoint3</a> & </td> <td class="mdname" nowrap> <em>axis</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>float </td> <td class="mdname" nowrap> <em>angle</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Given a node with geometry under it, rotate the vertices of that geometry by a given axis/angle. </td> </tr></table><a class="anchor" name="692e4e98ca0c791be2f866361da9c86a"></a><!-- doxytag: member="vtNode::ApplyVertexTransform" ref="692e4e98ca0c791be2f866361da9c86a" args="(const FMatrix4 &mat)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtNode::ApplyVertexTransform </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFMatrix4.html">FMatrix4</a> & </td> <td class="mdname1" valign="top" nowrap> <em>mat</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Given any node with geometry under it, transform the vertices of that geometry. </td> </tr></table><a class="anchor" name="49e3adfad659f23aab334ca6d286b2ab"></a><!-- doxytag: member="vtNode::GetBoundBox" ref="49e3adfad659f23aab334ca6d286b2ab" args="(FBox3 &box)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtNode::GetBoundBox </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFBox3.html">FBox3</a> & </td> <td class="mdname1" valign="top" nowrap> <em>box</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Calculates the bounding box of the geometry contained in and under this node in the scene graph. Note that unlike bounding sphere which is cached, this value is calculated every time.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>box</em> </td><td>Will receive the bounding box. </td></tr> </table></dl><p>Implements <a class="el" href="classvtNodeBase.html">vtNodeBase</a>. </td> </tr></table><a class="anchor" name="9df1c6c25b1ec2adec4a219523acb16d"></a><!-- doxytag: member="vtNode::GetBoundSphere" ref="9df1c6c25b1ec2adec4a219523acb16d" args="(FSphere &sphere, bool bGlobal=false)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtNode::GetBoundSphere </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classFSphere.html">FSphere</a> & </td> <td class="mdname" nowrap> <em>sphere</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>bGlobal</em> = <code>false</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the Bounding Sphere of the node <p>Implements <a class="el" href="classvtNodeBase.html">vtNodeBase</a>. </td> </tr></table><a class="anchor" name="3b8caaba3ddcee25d69907a90301f821"></a><!-- doxytag: member="vtNode::GetEnabled" ref="3b8caaba3ddcee25d69907a90301f821" args="() const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool vtNode::GetEnabled </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Return the enabled state of a node. <p>Implements <a class="el" href="classvtNodeBase.html">vtNodeBase</a>. </td> </tr></table><a class="anchor" name="58bf79af98d517895e58459ee719fcee"></a><!-- doxytag: member="vtNode::GetName2" ref="58bf79af98d517895e58459ee719fcee" args="() const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const char * vtNode::GetName2 </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the name of the node. <p>Implements <a class="el" href="classvtNodeBase.html">vtNodeBase</a>. </td> </tr></table><a class="anchor" name="9eb48e9ca50a3731160af17444f2b29f"></a><!-- doxytag: member="vtNode::GetParent" ref="9eb48e9ca50a3731160af17444f2b29f" args="(int iParent=0)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"><a class="el" href="classvtGroup.html">vtGroup</a> * vtNode::GetParent </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname1" valign="top" nowrap> <em>iParent</em> = <code>0</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -