openscenegraph
MorphTransformHardware
Go to the documentation of this file.
1/* -*-c++-*-
2 * Copyright (C) 2017 Julien Valentin <mp3butcher@hotmail.com>
3 *
4 * This library is open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version. The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * OpenSceneGraph Public License for more details.
13 */
14
15#ifndef OSGANIMATION_MORPH_TRANSFORM_HARDWARE
16#define OSGANIMATION_MORPH_TRANSFORM_HARDWARE 1
17
18#include <osgAnimation/Export>
21#include <osgAnimation/Bone>
22#include <osg/Matrix>
23#include <osg/Array>
24
26#define MORPHTRANSHW_DEFAULTMORPHTEXTUREUNIT 7
27
28namespace osgAnimation
29{
30 class MorphGeometry;
31
34 {
35 public:
36
38
40
42
43 virtual void operator()(MorphGeometry&);
44
45 inline void setShader( osg::Shader*s ) { _shader=s; }
46 inline const osg::Shader * getShader() const { return _shader.get(); }
47 inline osg::Shader * getShader() { return _shader.get(); }
48
50 void setReservedTextureUnit(unsigned int t) { _reservedTextureUnit=t; }
51 unsigned int getReservedTextureUnit() const { return _reservedTextureUnit; }
52
53 protected:
54
56
59
62 };
63}
64
65#endif
Definition MorphGeometry:28
This class manage format for hardware morphing.
Definition MorphTransformHardware:34
osg::ref_ptr< osg::Uniform > _uniformTargetsWeight
Definition MorphTransformHardware:57
MorphTransformHardware(const MorphTransformHardware &rth, const osg::CopyOp &copyop)
META_Object(osgAnimation, MorphTransformHardware)
unsigned int _reservedTextureUnit
Definition MorphTransformHardware:61
bool _needInit
Definition MorphTransformHardware:60
virtual void operator()(MorphGeometry &)
osg::Shader * getShader()
Definition MorphTransformHardware:47
osg::ref_ptr< osg::Shader > _shader
Definition MorphTransformHardware:58
unsigned int getReservedTextureUnit() const
Definition MorphTransformHardware:51
void setShader(osg::Shader *s)
Definition MorphTransformHardware:45
void setReservedTextureUnit(unsigned int t)
texture unit reserved for morphtarget TBO default is 7
Definition MorphTransformHardware:50
const osg::Shader * getShader() const
Definition MorphTransformHardware:46
Definition RigTransform:47
Definition CopyOp:41
Definition Shader:89
Definition ref_ptr:32
Definition Action:34
#define OSGANIMATION_EXPORT
Definition osgAnimation/Export:40