Ai
7 Star 22 Fork 16

Gitee 极速下载/OpenSceneGraph

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/openscenegraph/OpenSceneGraph
克隆/下载
CopyOp 3.42 KB
一键复制 编辑 原始数据 按行查看 历史
Robert Osfield 提交于 2016-11-23 00:38 +08:00 . Added CopyOp handling of Uniform.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSG_COPYOP
#define OSG_COPYOP 1
#include <osg/Export>
namespace osg {
class Referenced;
class Object;
class Image;
class Texture;
class StateSet;
class StateAttribute;
class StateAttributeCallback;
class Uniform;
class UniformBase;
class UniformCallback;
class Node;
class Drawable;
class Array;
class PrimitiveSet;
class Shape;
class Callback;
/** Copy Op(erator) used to control whether shallow or deep copy is used
* during copy construction and clone operation.*/
class OSG_EXPORT CopyOp
{
public:
enum Options
{
SHALLOW_COPY = 0,
DEEP_COPY_OBJECTS = 1<<0,
DEEP_COPY_NODES = 1<<1,
DEEP_COPY_DRAWABLES = 1<<2,
DEEP_COPY_STATESETS = 1<<3,
DEEP_COPY_STATEATTRIBUTES = 1<<4,
DEEP_COPY_TEXTURES = 1<<5,
DEEP_COPY_IMAGES = 1<<6,
DEEP_COPY_ARRAYS = 1<<7,
DEEP_COPY_PRIMITIVES = 1<<8,
DEEP_COPY_SHAPES = 1<<9,
DEEP_COPY_UNIFORMS = 1<<10,
DEEP_COPY_CALLBACKS = 1<<11,
DEEP_COPY_USERDATA = 1<<12,
DEEP_COPY_ALL = 0x7FFFFFFF
};
typedef unsigned int CopyFlags;
inline CopyOp(CopyFlags flags=SHALLOW_COPY):_flags(flags) {}
virtual ~CopyOp() {}
void setCopyFlags(CopyFlags flags) { _flags = flags; }
CopyFlags getCopyFlags() const { return _flags; }
virtual Referenced* operator() (const Referenced* ref) const;
virtual Object* operator() (const Object* obj) const;
virtual Node* operator() (const Node* node) const;
virtual Drawable* operator() (const Drawable* drawable) const;
virtual StateSet* operator() (const StateSet* stateset) const;
virtual StateAttribute* operator() (const StateAttribute* attr) const;
virtual Texture* operator() (const Texture* text) const;
virtual Image* operator() (const Image* image) const;
virtual Array* operator() (const Array* array) const;
virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const;
virtual Shape* operator() (const Shape* shape) const;
virtual UniformBase* operator() (const UniformBase* uniform) const;
virtual Uniform* operator() (const Uniform* uniform) const;
virtual Callback* operator() (const Callback* nodecallback) const;
virtual StateAttributeCallback* operator() (const StateAttributeCallback* stateattributecallback) const;
virtual UniformCallback* operator() (const UniformCallback* uniformcallback) const;
protected:
CopyFlags _flags;
};
}
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mirrors/OpenSceneGraph.git
git@gitee.com:mirrors/OpenSceneGraph.git
mirrors
OpenSceneGraph
OpenSceneGraph
master

搜索帮助