OpenSceneGraph/doc/osg/LOD.html
2001-01-10 16:32:10 +00:00

342 lines
14 KiB
HTML

<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::LOD</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.3">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::LOD</A>: public <!1><A HREF="Group.html#DOC.2.18.9">Group</A></H2>
<BLOCKQUOTE>LOD - Level Of Detail group node which allows switching between children depending on distance from eye point.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=155>
<param name=classes value="CReferenced,MReferenced.html,CObject,MObject.html,CNode,MNode.html,CGroup,MGroup.html,CLOD,MLOD.html">
<param name=before value="M,M,M,M,M">
<param name=after value="Md_SPSPSP,Md_SPSP,Md_SP,Md_,M">
<param name=indent value="0,1,2,3,4">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<A HREF="#DOC.2.23.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> <B>LOD</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual <!1><A HREF="Object.html#DOC.2.36.1">Object</A>* <B>clone</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual bool <B>isSameKindAs</B>(<!1><A HREF="Object.html#DOC.2.36.1">Object</A>* obj)
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual const char* <B>className</B>() const
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual void <B>accept</B>(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual void <B>traverse</B>(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>setRange</B>(unsigned int index, float range)
<DD><I>Sets the value of range list element index to range which is a floating point distance specified in world coordinates.</I>
<DT>
<A HREF="#DOC.2.23.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>float <B>getRange</B>(unsigned int index)
<DD><I>pfLOD::getRange returns the range element index</I>
<DT>
<A HREF="#DOC.2.23.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int <B>getNumRanges</B>()
<DD><I>returns the number of ranges currently set</I>
<DT>
<A HREF="#DOC.2.23.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void <B>setCenter</B>(const <!1><A HREF="Vec3.html">Vec3</A> &amp;center)
<DD><I>Sets the object-space point which defines the center of the osg::LOD.</I>
<DT>
<A HREF="#DOC.2.23.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>const <!1><A HREF="Vec3.html">Vec3</A>&amp; <B>getCenter</B>()
<DD><I>return the LOD center point.</I>
<DT>
<A HREF="#DOC.2.23.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int <B>evaluate</B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, float bias=1.0f)
<DD><I>return the child to traverse.</I>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<A HREF="#DOC.2.23.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="LOD.html#DOC.2.23.16">RangeList</A> <B>_rangeList</B>
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="LOD.html#DOC.2.23.16">RangeList</A> <B>_rangeList2</B>
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="Vec3.html">Vec3</A> <B>_center</B>
<DD><I></I>
</DL></P>
<P><DL>
<DT><H3>Protected Methods</H3><DD><DT>
<A HREF="#DOC.2.23.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual <B>~LOD</B>()
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual bool <B>readLocalData</B>(<!1><A HREF="Input.html">Input</A>&amp; fr)
<DD><I></I>
<DT>
<A HREF="#DOC.2.23.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>virtual bool <B>writeLocalData</B>(<!1><A HREF="Output.html">Output</A>&amp; fw)
<DD><I></I>
</DL></P>
<P><DL>
<DT><H3>Protected</H3><DD><DT>
<A HREF="#DOC.2.23.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>typedef std::vector&lt;float&gt; <B>RangeList</B>
<DD><I></I>
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Group.html">Group</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual bool <B>addChild</B>( <!1><A HREF="Node.html#DOC.2.30.1">Node</A> *child )
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual bool <B>removeChild</B>( <!1><A HREF="Node.html#DOC.2.30.1">Node</A> *child )
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual bool <B>replaceChild</B>( <!1><A HREF="Node.html#DOC.2.30.1">Node</A> *origChild, <!1><A HREF="Node.html#DOC.2.30.1">Node</A>* newChild )
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>getNumChildren</B>( void )
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.1">Node</A>* <B>getChild</B>( int i )
<DT>
<IMG ALT="o" SRC=icon2.gif>bool <B>containsNode</B>( <!1><A HREF="Node.html#DOC.2.30.1">Node</A>* node )
<DT>
<IMG ALT="o" SRC=icon2.gif>ChildList::iterator <B>findNode</B>( <!1><A HREF="Node.html#DOC.2.30.1">Node</A>* node )
</DL></P>
<P><DL>
<DT><H3>Public</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>typedef std::vector&lt;<!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="Node.html#DOC.2.30.1">Node</A>&gt; &gt; <B>ChildList</B>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Group.html#DOC.2.18.8">ChildList</A> <B>_children</B>
</DL></P>
<P><DL>
<DT><H3>Protected Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>bool <B>computeBound</B>( void )
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Node.html">Node</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.1">Node</A>* <B>cloneNode</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual void <B>ascend</B>(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setName</B>( const std::string&amp; name )
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setName</B>( const char* name )
<DT>
<IMG ALT="o" SRC=icon2.gif>const std::string&amp; <B>getName</B>( void )
<DT>
<IMG ALT="o" SRC=icon2.gif>const <!1><A HREF="Node.html#DOC.2.30.12">ParentList</A>&amp; <B>getParents</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.39">Group</A>* <B>getParent</B>(int i) const
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>getNumParents</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setUserData</B>(void* data, <!1><A HREF="MemoryAdapter.html">MemoryAdapter</A>* ma=0L)
<DT>
<IMG ALT="o" SRC=icon2.gif>void* <B>getUserData</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="MemoryAdapter.html">MemoryAdapter</A>* <B>getMemoryAdapter</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>setNodeMask</B>(<!1><A HREF="Node.html#DOC.2.30.34">NodeMask</A> nm)
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.34">NodeMask</A> <B>getNodeMask</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>const <!1><A HREF="Node.html#DOC.2.30.21">DescriptionList</A>&amp; <B>getDescriptions</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.21">DescriptionList</A>&amp; <B>getDescriptions</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>const std::string&amp; <B>getDescription</B>(int i) const
<DT>
<IMG ALT="o" SRC=icon2.gif>std::string&amp; <B>getDescription</B>(int i)
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>getNumDescriptions</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>addDescription</B>(const std::string&amp; desc)
<DT>
<IMG ALT="o" SRC=icon2.gif>const <!1><A HREF="BoundingSphere.html">BoundingSphere</A>&amp; <B>getBound</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>dirtyBound</B>()
</DL></P>
<P><DL>
<DT><H3>Public</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>typedef std::vector&lt;<!1><A HREF="Node.html#DOC.2.30.39">Group</A>*&gt; <B>ParentList</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>typedef unsigned int <B>NodeMask</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>typedef std::vector&lt;std::string&gt; <B>DescriptionList</B>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="BoundingSphere.html">BoundingSphere</A> <B>_bsphere</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>bool <B>_bsphere_computed</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>std::string <B>_name</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.12">ParentList</A> <B>_parents</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>friend <B>Group</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>void* <B>_userData</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="MemoryAdapter.html">MemoryAdapter</A>&gt; <B>_memoryAdapter</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.34">NodeMask</A> <B>_nodeMask</B>
<DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Node.html#DOC.2.30.21">DescriptionList</A> <B>_descriptions</B>
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Object.html">Object</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual <!1><A HREF="Object.html#DOC.2.36.1">Object</A>* <B>readClone</B>(<!1><A HREF="Input.html">Input</A>&amp; fr)
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual bool <B>write</B>(<!1><A HREF="Output.html">Output</A>&amp; fw)
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Referenced.html">Referenced</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif><!1><A HREF="Referenced.html#DOC.2.43.4">Referenced</A>&amp; <B>operator = </B>(<!1><A HREF="Referenced.html#DOC.2.43.4">Referenced</A>&amp;)
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>ref</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>void <B>unref</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>int <B>referenceCount</B>()
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>int <B>_refCount</B>
</DL></P>
</DL>
<A NAME="DOC.DOCU">
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>LOD - Level Of Detail group node which allows switching between children
depending on distance from eye point.
Typical uses are for load balancing - objects further away from
the eye point are rendered at a lower level of detail, and at times
of high stress on the graphics pipeline lower levels of detail can
also be chosen.</BLOCKQUOTE>
<DL>
<A NAME="LOD">
<A NAME="DOC.2.23.7">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> LOD()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="clone">
<A NAME="DOC.2.23.8">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual <!1><A HREF="Object.html#DOC.2.36.1">Object</A>* clone() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="isSameKindAs">
<A NAME="DOC.2.23.9">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual bool isSameKindAs(<!1><A HREF="Object.html#DOC.2.36.1">Object</A>* obj)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="className">
<A NAME="DOC.2.23.10">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual const char* className() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="accept">
<A NAME="DOC.2.23.11">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void accept(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="traverse">
<A NAME="DOC.2.23.12">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void traverse(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setRange">
<A NAME="DOC.2.23.1">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setRange(unsigned int index, float range)</B></TT>
<DD>Sets the value of range list element index to range which
is a floating point distance specified in world coordinates.
Range list automatically expands to accomodate values beyond
the current getNumRanges().
<DL><DT><DD></DL><P>
<A NAME="getRange">
<A NAME="DOC.2.23.2">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float getRange(unsigned int index)</B></TT>
<DD>pfLOD::getRange returns the range element index
<DL><DT><DD></DL><P>
<A NAME="getNumRanges">
<A NAME="DOC.2.23.3">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int getNumRanges()</B></TT>
<DD>returns the number of ranges currently set
<DL><DT><DD></DL><P>
<A NAME="setCenter">
<A NAME="DOC.2.23.4">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setCenter(const <!1><A HREF="Vec3.html">Vec3</A> &amp;center)</B></TT>
<DD>Sets the object-space point which defines the center of the osg::LOD.
center is affected by any transforms in the hierarchy above the osg::LOD.
<DL><DT><DD></DL><P>
<A NAME="getCenter">
<A NAME="DOC.2.23.5">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="Vec3.html">Vec3</A>&amp; getCenter()</B></TT>
<DD>return the LOD center point.
<DL><DT><DD></DL><P>
<A NAME="evaluate">
<A NAME="DOC.2.23.6">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int evaluate(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, float bias=1.0f)</B></TT>
<DD>return the child to traverse.
Selected by the distance between the eye point in local
coordinates and the LOD center, mutliplied by the bias.
<DL><DT><DD></DL><P>
<A NAME="~LOD">
<A NAME="DOC.2.23.13">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual ~LOD()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="readLocalData">
<A NAME="DOC.2.23.14">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual bool readLocalData(<!1><A HREF="Input.html">Input</A>&amp; fr)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="writeLocalData">
<A NAME="DOC.2.23.15">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual bool writeLocalData(<!1><A HREF="Output.html">Output</A>&amp; fw)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="RangeList">
<A NAME="DOC.2.23.16">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef std::vector&lt;float&gt; RangeList</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_rangeList">
<A NAME="DOC.2.23.17">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="LOD.html#DOC.2.23.16">RangeList</A> _rangeList</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_rangeList2">
<A NAME="DOC.2.23.18">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="LOD.html#DOC.2.23.16">RangeList</A> _rangeList2</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_center">
<A NAME="DOC.2.23.19">
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> _center</B></TT>
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DD></DL><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I><P><HR>
<BR>
This page was generated with the help of <A HREF="http://www.linuxsupportline.com/~doc++">DOC++</A>.
</BODY>