310 lines
15 KiB
HTML
310 lines
15 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>class SG_EXPORT osg::State</TITLE>
|
|
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
|
|
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::State</A></H2></H2><BLOCKQUOTE>State class for managing a state stack.</BLOCKQUOTE>
|
|
<HR>
|
|
|
|
<H2>Inheritance:</H2>
|
|
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65>
|
|
<param name=classes value="CReferenced,MReferenced.html,CState,MState.html">
|
|
<param name=before value="M,M">
|
|
<param name=after value="Md_,M">
|
|
<param name=indent value="0,1">
|
|
<param name=arrowdir value="down">
|
|
</APPLET>
|
|
<HR>
|
|
|
|
<DL>
|
|
<P><DL>
|
|
<DT><H3>Public Methods</H3><DD><DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.88.1">State</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual <B><A HREF="#DOC.2.88.2">~State</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.3">pushStateSet</A></B>(const <!1><A HREF="StateSet.html">StateSet</A>* dstate)
|
|
<DD><I>push stateset onto state stack</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.4">popStateSet</A></B>()
|
|
<DD><I>pop drawstate off state stack</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.5">captureCurrentState</A></B>(<!1><A HREF="StateSet.html">StateSet</A>& stateset) const
|
|
<DD><I>copy the modes and attributes which captures the current state</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.6">reset</A></B>()
|
|
<DD><I>reset the state object to an empty stack</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.88.7">applyMode</A></B>(const StateAttribute::GLMode mode, const bool enabled)
|
|
<DD><I>apply an OpenGL mode if required.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const bool <B><A HREF="#DOC.2.88.8">applyAttribute</A></B>(const <!1><A HREF="StateAttribute.html">StateAttribute</A>* attribute)
|
|
<DD><I>apply an attribute if required.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.88.9">applyProjectionMatrix</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>* matrix)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="Matrix.html">osg::Matrix</A>& <B><A HREF="#DOC.2.88.10">getProjectionMatrix</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.88.11">applyModelViewMatrix</A></B>(const <!1><A HREF="Matrix.html">osg::Matrix</A>* matrix)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="Matrix.html">osg::Matrix</A>& <B><A HREF="#DOC.2.88.12">getModelViewMatrix</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ClippingVolume.html">ClippingVolume</A> <B><A HREF="#DOC.2.88.13">getClippingVolume</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.14">apply</A></B>(const <!1><A HREF="StateSet.html">StateSet</A>* dstate)
|
|
<DD><I>apply stateset</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.15">apply</A></B>()
|
|
<DD><I>apply the state</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.16">haveAppliedMode</A></B>(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)
|
|
<DD><I>mode has been set externally, update state to reflect this setting</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.17">haveAppliedMode</A></B>(const StateAttribute::GLMode mode)
|
|
<DD><I>mode has been set externally, therefore dirty the associated mode in osg::State so it is applied on next call to osg::State::apply()</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.18">haveAppliedAttribute</A></B>(const <!1><A HREF="StateAttribute.html">StateAttribute</A>* attribute)
|
|
<DD><I>attribute has been applied externally, update state to reflect this setting</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.88.19">haveAppliedAttribute</A></B>(const StateAttribute::Type type)
|
|
<DD><I>attribute has been applied externally, and therefore this attribute type has been dirtied and will need to be re-appplied on next osg::Stateapply().</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.88.20">setContextID</A></B>(unsigned int contextID)
|
|
<DD><I>Set the current OpenGL context uniqueID.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const unsigned int <B><A HREF="#DOC.2.88.21">getContextID</A></B>() const
|
|
<DD><I>Get the current OpenGL context unique ID</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.88.22">setFrameStamp</A></B>(<!1><A HREF="FrameStamp.html">FrameStamp</A>* fs)
|
|
<DD><I>Set the frame stamp for the current frame</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="FrameStamp.html">FrameStamp</A>* <B><A HREF="#DOC.2.88.23">getFrameStamp</A></B>() const
|
|
<DD><I>Set the frame stamp for the current frame</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.88.24">setDisplaySettings</A></B>(<!1><A HREF="DisplaySettings.html">DisplaySettings</A>* vs)
|
|
<DD><I>Set the DisplaySettings.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="DisplaySettings.html">DisplaySettings</A>* <B><A HREF="#DOC.2.88.25">getDisplaySettings</A></B>() const
|
|
<DD><I>Get the DisplaySettings </I>
|
|
</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>inline <!1><A HREF="Referenced.html">Referenced</A>& <B>operator = </B>(<!1><A HREF="Referenced.html">Referenced</A>&)
|
|
<DT>
|
|
<IMG ALT="o" SRC=icon2.gif>inline void <B>ref</B>() const
|
|
<DT>
|
|
<IMG ALT="o" SRC=icon2.gif>inline void <B>unref</B>() const
|
|
<DT>
|
|
<IMG ALT="o" SRC=icon2.gif>inline void <B>unref_nodelete</B>() const
|
|
<DT>
|
|
<IMG ALT="o" SRC=icon2.gif>inline const int <B>referenceCount</B>() const
|
|
</DL></P>
|
|
|
|
<P><DL>
|
|
<DT><H3>Protected Fields</H3><DD><DT>
|
|
<IMG ALT="o" SRC=icon2.gif>mutable int <B>_refCount</B>
|
|
</DL></P>
|
|
|
|
</DL>
|
|
|
|
<A NAME="DOC.DOCU"></A>
|
|
<HR>
|
|
<H2>Documentation</H2>
|
|
<BLOCKQUOTE>State class for managing a state stack.
|
|
Lazy state updating is used to minimize state changes.</BLOCKQUOTE>
|
|
<DL>
|
|
|
|
<A NAME="State"></A>
|
|
<A NAME="DOC.2.88.1"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> State()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="~State"></A>
|
|
<A NAME="DOC.2.88.2"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual ~State()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="pushStateSet"></A>
|
|
<A NAME="DOC.2.88.3"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void pushStateSet(const <!1><A HREF="StateSet.html">StateSet</A>* dstate)</B></TT>
|
|
<DD>push stateset onto state stack
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="popStateSet"></A>
|
|
<A NAME="DOC.2.88.4"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void popStateSet()</B></TT>
|
|
<DD>pop drawstate off state stack
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="captureCurrentState"></A>
|
|
<A NAME="DOC.2.88.5"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void captureCurrentState(<!1><A HREF="StateSet.html">StateSet</A>& stateset) const </B></TT>
|
|
<DD>copy the modes and attributes which captures the current state
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="reset"></A>
|
|
<A NAME="DOC.2.88.6"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void reset()</B></TT>
|
|
<DD>reset the state object to an empty stack
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="applyMode"></A>
|
|
<A NAME="DOC.2.88.7"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const bool applyMode(const StateAttribute::GLMode mode, const bool enabled)</B></TT>
|
|
<DD>apply an OpenGL mode if required.
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="applyAttribute"></A>
|
|
<A NAME="DOC.2.88.8"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const bool applyAttribute(const <!1><A HREF="StateAttribute.html">StateAttribute</A>* attribute)</B></TT>
|
|
<DD>apply an attribute if required.
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="applyProjectionMatrix"></A>
|
|
<A NAME="DOC.2.88.9"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void applyProjectionMatrix(const <!1><A HREF="Matrix.html">osg::Matrix</A>* matrix)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getProjectionMatrix"></A>
|
|
<A NAME="DOC.2.88.10"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="Matrix.html">osg::Matrix</A>& getProjectionMatrix() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="applyModelViewMatrix"></A>
|
|
<A NAME="DOC.2.88.11"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void applyModelViewMatrix(const <!1><A HREF="Matrix.html">osg::Matrix</A>* matrix)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getModelViewMatrix"></A>
|
|
<A NAME="DOC.2.88.12"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="Matrix.html">osg::Matrix</A>& getModelViewMatrix() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getClippingVolume"></A>
|
|
<A NAME="DOC.2.88.13"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ClippingVolume.html">ClippingVolume</A> getClippingVolume() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="apply"></A>
|
|
<A NAME="DOC.2.88.14"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void apply(const <!1><A HREF="StateSet.html">StateSet</A>* dstate)</B></TT>
|
|
<DD>apply stateset
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="apply"></A>
|
|
<A NAME="DOC.2.88.15"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void apply()</B></TT>
|
|
<DD>apply the state
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="haveAppliedMode"></A>
|
|
<A NAME="DOC.2.88.16"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void haveAppliedMode(const StateAttribute::GLMode mode, const StateAttribute::GLModeValue value)</B></TT>
|
|
<DD>mode has been set externally, update state to reflect this setting
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="haveAppliedMode"></A>
|
|
<A NAME="DOC.2.88.17"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void haveAppliedMode(const StateAttribute::GLMode mode)</B></TT>
|
|
<DD>mode has been set externally, therefore dirty the associated mode in osg::State
|
|
so it is applied on next call to osg::State::apply()
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="haveAppliedAttribute"></A>
|
|
<A NAME="DOC.2.88.18"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void haveAppliedAttribute(const <!1><A HREF="StateAttribute.html">StateAttribute</A>* attribute)</B></TT>
|
|
<DD>attribute has been applied externally, update state to reflect this setting
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="haveAppliedAttribute"></A>
|
|
<A NAME="DOC.2.88.19"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void haveAppliedAttribute(const StateAttribute::Type type)</B></TT>
|
|
<DD>attribute has been applied externally,
|
|
and therefore this attribute type has been dirtied
|
|
and will need to be re-appplied on next osg::Stateapply().
|
|
note, if you have an osg::StateAttribute which you have applied externally
|
|
then use the have_applied(attribute) method as this will the osg::State to
|
|
track the current state more accuratly and enable lazy state updating such
|
|
that only changed state will be applied.
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="setContextID"></A>
|
|
<A NAME="DOC.2.88.20"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setContextID(unsigned int contextID)</B></TT>
|
|
<DD>Set the current OpenGL context uniqueID.
|
|
Note, it is the application developers responsibility to
|
|
set up unique ID for each OpenGL context. This value is
|
|
then used by osg::StateAttribure's and osg::Drawable's to
|
|
help manage OpenGL display list and texture binds appropriate
|
|
for each context.
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getContextID"></A>
|
|
<A NAME="DOC.2.88.21"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const unsigned int getContextID() const </B></TT>
|
|
<DD>Get the current OpenGL context unique ID
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="setFrameStamp"></A>
|
|
<A NAME="DOC.2.88.22"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setFrameStamp(<!1><A HREF="FrameStamp.html">FrameStamp</A>* fs)</B></TT>
|
|
<DD>Set the frame stamp for the current frame
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getFrameStamp"></A>
|
|
<A NAME="DOC.2.88.23"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="FrameStamp.html">FrameStamp</A>* getFrameStamp() const </B></TT>
|
|
<DD>Set the frame stamp for the current frame
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="setDisplaySettings"></A>
|
|
<A NAME="DOC.2.88.24"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setDisplaySettings(<!1><A HREF="DisplaySettings.html">DisplaySettings</A>* vs)</B></TT>
|
|
<DD>Set the DisplaySettings. Note, nothing is applied, the visual settings are just used
|
|
used in the State object to pass the current visual settings to Drawables
|
|
during rendering.
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="getDisplaySettings"></A>
|
|
<A NAME="DOC.2.88.25"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="DisplaySettings.html">DisplaySettings</A>* getDisplaySettings() const </B></TT>
|
|
<DD>Get the DisplaySettings
|
|
<DL><DT><DD></DL><P><DL>
|
|
|
|
<A NAME="ModeStack"></A>
|
|
<A NAME="DOC.2.88.32.1"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ModeStack()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="changed"></A>
|
|
<A NAME="DOC.2.88.32.2"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool changed</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="last_applied_value"></A>
|
|
<A NAME="DOC.2.88.32.3"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool last_applied_value</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="global_default_value"></A>
|
|
<A NAME="DOC.2.88.32.4"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool global_default_value</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="valueVec"></A>
|
|
<A NAME="DOC.2.88.32.5"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>ValueVec valueVec</B></TT>
|
|
<DL><DT><DD></DL><P></DL>
|
|
<DL>
|
|
|
|
<A NAME="AttributeStack"></A>
|
|
<A NAME="DOC.2.88.33.1"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> AttributeStack()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="changed"></A>
|
|
<A NAME="DOC.2.88.33.2"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool changed</B></TT>
|
|
<DD>apply an attribute if required, passing in attribute and appropriate attribute stack
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="last_applied_attribute"></A>
|
|
<A NAME="DOC.2.88.33.3"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="StateAttribute.html">StateAttribute</A>* last_applied_attribute</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="global_default_attribute"></A>
|
|
<A NAME="DOC.2.88.33.4"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ref_ptr.html">ref_ptr</A><<!1><A HREF="StateAttribute.html">StateAttribute</A>> global_default_attribute</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="attributeVec"></A>
|
|
<A NAME="DOC.2.88.33.5"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>AttributeVec attributeVec</B></TT>
|
|
<DL><DT><DD></DL><P></DL>
|
|
</DL>
|
|
|
|
<HR><DL><DT><B>This class has no child classes.</B></DL>
|
|
|
|
<DL><DT><DD></DL><P><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://docpp.sourceforge.net">DOC++</A>.
|
|
</BODY>
|
|
</HTML>
|