openscenegraph
include
osgAnimation
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
>
19
#include <
osgAnimation/RigTransform
>
20
#include <
osgAnimation/VertexInfluence
>
21
#include <
osgAnimation/Bone
>
22
#include <
osg/Matrix
>
23
#include <
osg/Array
>
24
26
#define MORPHTRANSHW_DEFAULTMORPHTEXTUREUNIT 7
27
28
namespace
osgAnimation
29
{
30
class
MorphGeometry;
31
33
class
OSGANIMATION_EXPORT
MorphTransformHardware
:
public
MorphTransform
34
{
35
public
:
36
37
MorphTransformHardware
();
38
39
MorphTransformHardware
(
const
MorphTransformHardware
& rth,
const
osg::CopyOp
& copyop);
40
41
META_Object
(
osgAnimation
,
MorphTransformHardware
);
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
55
bool
init
(
MorphGeometry
&);
56
57
osg::ref_ptr<osg::Uniform>
_uniformTargetsWeight
;
58
osg::ref_ptr<osg::Shader>
_shader
;
59
60
bool
_needInit
;
61
unsigned
int
_reservedTextureUnit
;
62
};
63
}
64
65
#endif
Array
Bone
Matrix
RigTransform
VertexInfluence
osgAnimation::MorphGeometry
Definition
MorphGeometry:28
osgAnimation::MorphTransformHardware
This class manage format for hardware morphing.
Definition
MorphTransformHardware:34
osgAnimation::MorphTransformHardware::_uniformTargetsWeight
osg::ref_ptr< osg::Uniform > _uniformTargetsWeight
Definition
MorphTransformHardware:57
osgAnimation::MorphTransformHardware::MorphTransformHardware
MorphTransformHardware(const MorphTransformHardware &rth, const osg::CopyOp ©op)
osgAnimation::MorphTransformHardware::META_Object
META_Object(osgAnimation, MorphTransformHardware)
osgAnimation::MorphTransformHardware::_reservedTextureUnit
unsigned int _reservedTextureUnit
Definition
MorphTransformHardware:61
osgAnimation::MorphTransformHardware::_needInit
bool _needInit
Definition
MorphTransformHardware:60
osgAnimation::MorphTransformHardware::operator()
virtual void operator()(MorphGeometry &)
osgAnimation::MorphTransformHardware::getShader
osg::Shader * getShader()
Definition
MorphTransformHardware:47
osgAnimation::MorphTransformHardware::MorphTransformHardware
MorphTransformHardware()
osgAnimation::MorphTransformHardware::_shader
osg::ref_ptr< osg::Shader > _shader
Definition
MorphTransformHardware:58
osgAnimation::MorphTransformHardware::getReservedTextureUnit
unsigned int getReservedTextureUnit() const
Definition
MorphTransformHardware:51
osgAnimation::MorphTransformHardware::init
bool init(MorphGeometry &)
osgAnimation::MorphTransformHardware::setShader
void setShader(osg::Shader *s)
Definition
MorphTransformHardware:45
osgAnimation::MorphTransformHardware::setReservedTextureUnit
void setReservedTextureUnit(unsigned int t)
texture unit reserved for morphtarget TBO default is 7
Definition
MorphTransformHardware:50
osgAnimation::MorphTransformHardware::getShader
const osg::Shader * getShader() const
Definition
MorphTransformHardware:46
osgAnimation::MorphTransform
Definition
RigTransform:47
osg::CopyOp
Definition
CopyOp:41
osg::Shader
Definition
Shader:89
osg::ref_ptr
Definition
ref_ptr:32
osgAnimation
Definition
Action:34
Export
OSGANIMATION_EXPORT
#define OSGANIMATION_EXPORT
Definition
osgAnimation/Export:40
Generated by
1.9.8