openscenegraph
BlendEquationi
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSG_BLENDEQUATIONI
15#define OSG_BLENDEQUATIONI 1
16
17#include <osg/BlendEquation>
18
19namespace osg {
20
24{
25 public :
26
28
29 BlendEquationi(unsigned int buf, Equation equation):
30 BlendEquation(equation),
31 _index(buf) {}
32
33 BlendEquationi(unsigned int buf, Equation equationRGB, Equation equationAlpha):
34 BlendEquation(equationRGB, equationAlpha),
35 _index(buf) {}
36
37
39 BlendEquationi(const BlendEquationi& cm,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
40 BlendEquation(cm,copyop),
41 _index(cm._index) {}
42
44
46 virtual int compare(const StateAttribute& sa) const
47 {
48 // Check for equal types, then create the rhs variable
49 // used by the COMPARE_StateAttribute_Parameter macros below.
51
53
54 return BlendEquation::compare(sa);
55 }
56
58 virtual unsigned int getMember() const { return _index; }
59
61 void setIndex(unsigned int buf);
62
64 unsigned int getIndex() const { return _index; }
65
66 virtual void apply(State& state) const;
67
68 protected:
69
70 virtual ~BlendEquationi();
71
72 unsigned int _index;
73
74};
75
76}
77
78#endif
#define COMPARE_StateAttribute_Parameter(parameter)
Definition StateAttribute:69
#define COMPARE_StateAttribute_Types(TYPE, rhs_attribute)
Definition StateAttribute:57
Definition BlendEquation:41
Equation
Definition BlendEquation:44
Definition BlendEquationi:24
virtual int compare(const StateAttribute &sa) const
Definition BlendEquationi:46
unsigned int getIndex() const
Definition BlendEquationi:64
void setIndex(unsigned int buf)
virtual unsigned int getMember() const
Definition BlendEquationi:58
virtual void apply(State &state) const
BlendEquationi(const BlendEquationi &cm, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition BlendEquationi:39
BlendEquationi(unsigned int buf, Equation equation)
Definition BlendEquationi:29
META_StateAttribute(osg, BlendEquationi, BLENDEQUATION)
unsigned int _index
Definition BlendEquationi:72
virtual ~BlendEquationi()
BlendEquationi(unsigned int buf, Equation equationRGB, Equation equationAlpha)
Definition BlendEquationi:33
Definition CopyOp:41
Definition StateAttribute:77
Definition State:80
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
#define OSG_EXPORT
Definition osg/Export:39