Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
bb4ef9be
Commit
bb4ef9be
authored
Dec 10, 2011
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added slightly adapted OSG 3.0.1 headers (changed std::isnan to std::fpclassify= FP_NAN)
parent
a445c615
Changes
535
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
535 changed files
with
89397 additions
and
3 deletions
+89397
-3
.gitignore
.gitignore
+1
-1
.gitignore
lib/mac32-gcc40/include/.gitignore
+0
-2
Atomic
lib/mac32-gcc40/include/OpenThreads/Atomic
+287
-0
Barrier
lib/mac32-gcc40/include/OpenThreads/Barrier
+100
-0
Block
lib/mac32-gcc40/include/OpenThreads/Block
+177
-0
Condition
lib/mac32-gcc40/include/OpenThreads/Condition
+93
-0
Config
lib/mac32-gcc40/include/OpenThreads/Config
+34
-0
Exports
lib/mac32-gcc40/include/OpenThreads/Exports
+44
-0
Mutex
lib/mac32-gcc40/include/OpenThreads/Mutex
+100
-0
ReadWriteMutex
lib/mac32-gcc40/include/OpenThreads/ReadWriteMutex
+114
-0
ReentrantMutex
lib/mac32-gcc40/include/OpenThreads/ReentrantMutex
+34
-0
ScopedLock
lib/mac32-gcc40/include/OpenThreads/ScopedLock
+70
-0
Thread
lib/mac32-gcc40/include/OpenThreads/Thread
+389
-0
Version
lib/mac32-gcc40/include/OpenThreads/Version
+38
-0
AlphaFunc
lib/mac32-gcc40/include/osg/AlphaFunc
+102
-0
AnimationPath
lib/mac32-gcc40/include/osg/AnimationPath
+314
-0
ApplicationUsage
lib/mac32-gcc40/include/osg/ApplicationUsage
+122
-0
ArgumentParser
lib/mac32-gcc40/include/osg/ArgumentParser
+213
-0
Array
lib/mac32-gcc40/include/osg/Array
+491
-0
ArrayDispatchers
lib/mac32-gcc40/include/osg/ArrayDispatchers
+138
-0
AudioStream
lib/mac32-gcc40/include/osg/AudioStream
+86
-0
AutoTransform
lib/mac32-gcc40/include/osg/AutoTransform
+161
-0
Billboard
lib/mac32-gcc40/include/osg/Billboard
+132
-0
BlendColor
lib/mac32-gcc40/include/osg/BlendColor
+125
-0
BlendEquation
lib/mac32-gcc40/include/osg/BlendEquation
+161
-0
BlendFunc
lib/mac32-gcc40/include/osg/BlendFunc
+221
-0
BoundingBox
lib/mac32-gcc40/include/osg/BoundingBox
+243
-0
BoundingSphere
lib/mac32-gcc40/include/osg/BoundingSphere
+306
-0
BoundsChecking
lib/mac32-gcc40/include/osg/BoundsChecking
+216
-0
BufferIndexBinding
lib/mac32-gcc40/include/osg/BufferIndexBinding
+134
-0
BufferObject
lib/mac32-gcc40/include/osg/BufferObject
+828
-0
Camera
lib/mac32-gcc40/include/osg/Camera
+674
-0
CameraNode
lib/mac32-gcc40/include/osg/CameraNode
+27
-0
CameraView
lib/mac32-gcc40/include/osg/CameraView
+105
-0
ClampColor
lib/mac32-gcc40/include/osg/ClampColor
+139
-0
ClearNode
lib/mac32-gcc40/include/osg/ClearNode
+75
-0
ClipNode
lib/mac32-gcc40/include/osg/ClipNode
+113
-0
ClipPlane
lib/mac32-gcc40/include/osg/ClipPlane
+127
-0
ClusterCullingCallback
lib/mac32-gcc40/include/osg/ClusterCullingCallback
+75
-0
CollectOccludersVisitor
lib/mac32-gcc40/include/osg/CollectOccludersVisitor
+109
-0
ColorMask
lib/mac32-gcc40/include/osg/ColorMask
+100
-0
ColorMatrix
lib/mac32-gcc40/include/osg/ColorMatrix
+72
-0
ComputeBoundsVisitor
lib/mac32-gcc40/include/osg/ComputeBoundsVisitor
+61
-0
Config
lib/mac32-gcc40/include/osg/Config
+47
-0
ConvexPlanarOccluder
lib/mac32-gcc40/include/osg/ConvexPlanarOccluder
+67
-0
ConvexPlanarPolygon
lib/mac32-gcc40/include/osg/ConvexPlanarPolygon
+49
-0
CoordinateSystemNode
lib/mac32-gcc40/include/osg/CoordinateSystemNode
+248
-0
CopyOp
lib/mac32-gcc40/include/osg/CopyOp
+93
-0
CullFace
lib/mac32-gcc40/include/osg/CullFace
+79
-0
CullSettings
lib/mac32-gcc40/include/osg/CullSettings
+274
-0
CullStack
lib/mac32-gcc40/include/osg/CullStack
+302
-0
CullingSet
lib/mac32-gcc40/include/osg/CullingSet
+350
-0
DeleteHandler
lib/mac32-gcc40/include/osg/DeleteHandler
+88
-0
Depth
lib/mac32-gcc40/include/osg/Depth
+112
-0
DisplaySettings
lib/mac32-gcc40/include/osg/DisplaySettings
+337
-0
DrawPixels
lib/mac32-gcc40/include/osg/DrawPixels
+80
-0
Drawable
lib/mac32-gcc40/include/osg/Drawable
+920
-0
Endian
lib/mac32-gcc40/include/osg/Endian
+85
-0
Export
lib/mac32-gcc40/include/osg/Export
+72
-0
Fog
lib/mac32-gcc40/include/osg/Fog
+146
-0
FragmentProgram
lib/mac32-gcc40/include/osg/FragmentProgram
+312
-0
FrameBufferObject
lib/mac32-gcc40/include/osg/FrameBufferObject
+518
-0
FrameStamp
lib/mac32-gcc40/include/osg/FrameStamp
+91
-0
FrontFace
lib/mac32-gcc40/include/osg/FrontFace
+70
-0
GL
lib/mac32-gcc40/include/osg/GL
+221
-0
GL2Extensions
lib/mac32-gcc40/include/osg/GL2Extensions
+791
-0
GLBeginEndAdapter
lib/mac32-gcc40/include/osg/GLBeginEndAdapter
+164
-0
GLExtensions
lib/mac32-gcc40/include/osg/GLExtensions
+155
-0
GLObjects
lib/mac32-gcc40/include/osg/GLObjects
+42
-0
GLU
lib/mac32-gcc40/include/osg/GLU
+186
-0
Geode
lib/mac32-gcc40/include/osg/Geode
+167
-0
Geometry
lib/mac32-gcc40/include/osg/Geometry
+463
-0
GraphicsContext
lib/mac32-gcc40/include/osg/GraphicsContext
+530
-0
GraphicsCostEstimator
lib/mac32-gcc40/include/osg/GraphicsCostEstimator
+142
-0
GraphicsThread
lib/mac32-gcc40/include/osg/GraphicsThread
+136
-0
Group
lib/mac32-gcc40/include/osg/Group
+172
-0
Hint
lib/mac32-gcc40/include/osg/Hint
+81
-0
Image
lib/mac32-gcc40/include/osg/Image
+433
-0
ImageSequence
lib/mac32-gcc40/include/osg/ImageSequence
+151
-0
ImageStream
lib/mac32-gcc40/include/osg/ImageStream
+111
-0
ImageUtils
lib/mac32-gcc40/include/osg/ImageUtils
+160
-0
KdTree
lib/mac32-gcc40/include/osg/KdTree
+198
-0
LOD
lib/mac32-gcc40/include/osg/LOD
+140
-0
Light
lib/mac32-gcc40/include/osg/Light
+199
-0
LightModel
lib/mac32-gcc40/include/osg/LightModel
+95
-0
LightSource
lib/mac32-gcc40/include/osg/LightSource
+93
-0
LineSegment
lib/mac32-gcc40/include/osg/LineSegment
+101
-0
LineStipple
lib/mac32-gcc40/include/osg/LineStipple
+83
-0
LineWidth
lib/mac32-gcc40/include/osg/LineWidth
+64
-0
LogicOp
lib/mac32-gcc40/include/osg/LogicOp
+113
-0
Material
lib/mac32-gcc40/include/osg/Material
+205
-0
Math
lib/mac32-gcc40/include/osg/Math
+254
-0
Matrix
lib/mac32-gcc40/include/osg/Matrix
+34
-0
MatrixTransform
lib/mac32-gcc40/include/osg/MatrixTransform
+84
-0
Matrixd
lib/mac32-gcc40/include/osg/Matrixd
+815
-0
Matrixf
lib/mac32-gcc40/include/osg/Matrixf
+914
-0
MixinVector
lib/mac32-gcc40/include/osg/MixinVector
+199
-0
Multisample
lib/mac32-gcc40/include/osg/Multisample
+158
-0
Node
lib/mac32-gcc40/include/osg/Node
+465
-0
NodeCallback
lib/mac32-gcc40/include/osg/NodeCallback
+98
-0
NodeTrackerCallback
lib/mac32-gcc40/include/osg/NodeTrackerCallback
+54
-0
NodeVisitor
lib/mac32-gcc40/include/osg/NodeVisitor
+369
-0
Notify
lib/mac32-gcc40/include/osg/Notify
+145
-0
Object
lib/mac32-gcc40/include/osg/Object
+267
-0
Observer
lib/mac32-gcc40/include/osg/Observer
+77
-0
ObserverNodePath
lib/mac32-gcc40/include/osg/ObserverNodePath
+76
-0
OccluderNode
lib/mac32-gcc40/include/osg/OccluderNode
+59
-0
OcclusionQueryNode
lib/mac32-gcc40/include/osg/OcclusionQueryNode
+202
-0
OperationThread
lib/mac32-gcc40/include/osg/OperationThread
+227
-0
PagedLOD
lib/mac32-gcc40/include/osg/PagedLOD
+160
-0
Plane
lib/mac32-gcc40/include/osg/Plane
+362
-0
Point
lib/mac32-gcc40/include/osg/Point
+157
-0
PointSprite
lib/mac32-gcc40/include/osg/PointSprite
+80
-0
PolygonMode
lib/mac32-gcc40/include/osg/PolygonMode
+90
-0
PolygonOffset
lib/mac32-gcc40/include/osg/PolygonOffset
+99
-0
PolygonStipple
lib/mac32-gcc40/include/osg/PolygonStipple
+68
-0
Polytope
lib/mac32-gcc40/include/osg/Polytope
+406
-0
PositionAttitudeTransform
lib/mac32-gcc40/include/osg/PositionAttitudeTransform
+78
-0
PrimitiveSet
lib/mac32-gcc40/include/osg/PrimitiveSet
+565
-0
Program
lib/mac32-gcc40/include/osg/Program
+406
-0
Projection
lib/mac32-gcc40/include/osg/Projection
+61
-0
ProxyNode
lib/mac32-gcc40/include/osg/ProxyNode
+141
-0
Quat
lib/mac32-gcc40/include/osg/Quat
+393
-0
Referenced
lib/mac32-gcc40/include/osg/Referenced
+210
-0
RenderInfo
lib/mac32-gcc40/include/osg/RenderInfo
+79
-0
Scissor
lib/mac32-gcc40/include/osg/Scissor
+110
-0
Sequence
lib/mac32-gcc40/include/osg/Sequence
+252
-0
ShadeModel
lib/mac32-gcc40/include/osg/ShadeModel
+77
-0
Shader
lib/mac32-gcc40/include/osg/Shader
+311
-0
ShaderAttribute
lib/mac32-gcc40/include/osg/ShaderAttribute
+79
-0
ShaderComposer
lib/mac32-gcc40/include/osg/ShaderComposer
+58
-0
ShadowVolumeOccluder
lib/mac32-gcc40/include/osg/ShadowVolumeOccluder
+172
-0
Shape
lib/mac32-gcc40/include/osg/Shape
+651
-0
ShapeDrawable
lib/mac32-gcc40/include/osg/ShapeDrawable
+201
-0
State
lib/mac32-gcc40/include/osg/State
+2676
-0
StateAttribute
lib/mac32-gcc40/include/osg/StateAttribute
+358
-0
StateAttributeCallback
lib/mac32-gcc40/include/osg/StateAttributeCallback
+39
-0
StateSet
lib/mac32-gcc40/include/osg/StateSet
+520
-0
Stats
lib/mac32-gcc40/include/osg/Stats
+125
-0
Stencil
lib/mac32-gcc40/include/osg/Stencil
+228
-0
StencilTwoSided
lib/mac32-gcc40/include/osg/StencilTwoSided
+231
-0
Switch
lib/mac32-gcc40/include/osg/Switch
+98
-0
TemplatePrimitiveFunctor
lib/mac32-gcc40/include/osg/TemplatePrimitiveFunctor
+317
-0
TexEnv
lib/mac32-gcc40/include/osg/TexEnv
+95
-0
TexEnvCombine
lib/mac32-gcc40/include/osg/TexEnvCombine
+287
-0
TexEnvFilter
lib/mac32-gcc40/include/osg/TexEnvFilter
+70
-0
TexGen
lib/mac32-gcc40/include/osg/TexGen
+142
-0
TexGenNode
lib/mac32-gcc40/include/osg/TexGenNode
+78
-0
TexMat
lib/mac32-gcc40/include/osg/TexMat
+89
-0
Texture
lib/mac32-gcc40/include/osg/Texture
+1284
-0
Texture1D
lib/mac32-gcc40/include/osg/Texture1D
+162
-0
Texture2D
lib/mac32-gcc40/include/osg/Texture2D
+172
-0
Texture2DArray
lib/mac32-gcc40/include/osg/Texture2DArray
+230
-0
Texture2DMultisample
lib/mac32-gcc40/include/osg/Texture2DMultisample
+95
-0
Texture3D
lib/mac32-gcc40/include/osg/Texture3D
+230
-0
TextureCubeMap
lib/mac32-gcc40/include/osg/TextureCubeMap
+188
-0
TextureRectangle
lib/mac32-gcc40/include/osg/TextureRectangle
+148
-0
Timer
lib/mac32-gcc40/include/osg/Timer
+153
-0
TransferFunction
lib/mac32-gcc40/include/osg/TransferFunction
+128
-0
Transform
lib/mac32-gcc40/include/osg/Transform
+167
-0
TriangleFunctor
lib/mac32-gcc40/include/osg/TriangleFunctor
+397
-0
TriangleIndexFunctor
lib/mac32-gcc40/include/osg/TriangleIndexFunctor
+344
-0
Uniform
lib/mac32-gcc40/include/osg/Uniform
+518
-0
UserDataContainer
lib/mac32-gcc40/include/osg/UserDataContainer
+192
-0
ValueObject
lib/mac32-gcc40/include/osg/ValueObject
+207
-0
Vec2
lib/mac32-gcc40/include/osg/Vec2
+25
-0
Vec2b
lib/mac32-gcc40/include/osg/Vec2b
+155
-0
Vec2d
lib/mac32-gcc40/include/osg/Vec2d
+193
-0
Vec2f
lib/mac32-gcc40/include/osg/Vec2f
+190
-0
Vec2s
lib/mac32-gcc40/include/osg/Vec2s
+149
-0
Vec3
lib/mac32-gcc40/include/osg/Vec3
+25
-0
Vec3b
lib/mac32-gcc40/include/osg/Vec3b
+160
-0
Vec3d
lib/mac32-gcc40/include/osg/Vec3d
+225
-0
Vec3f
lib/mac32-gcc40/include/osg/Vec3f
+224
-0
Vec3s
lib/mac32-gcc40/include/osg/Vec3s
+171
-0
Vec4
lib/mac32-gcc40/include/osg/Vec4
+25
-0
Vec4b
lib/mac32-gcc40/include/osg/Vec4b
+170
-0
Vec4d
lib/mac32-gcc40/include/osg/Vec4d
+299
-0
Vec4f
lib/mac32-gcc40/include/osg/Vec4f
+269
-0
Vec4s
lib/mac32-gcc40/include/osg/Vec4s
+193
-0
Vec4ub
lib/mac32-gcc40/include/osg/Vec4ub
+161
-0
Version
lib/mac32-gcc40/include/osg/Version
+73
-0
VertexProgram
lib/mac32-gcc40/include/osg/VertexProgram
+320
-0
View
lib/mac32-gcc40/include/osg/View
+185
-0
Viewport
lib/mac32-gcc40/include/osg/Viewport
+137
-0
buffered_value
lib/mac32-gcc40/include/osg/buffered_value
+132
-0
fast_back_stack
lib/mac32-gcc40/include/osg/fast_back_stack
+97
-0
io_utils
lib/mac32-gcc40/include/osg/io_utils
+338
-0
observer_ptr
lib/mac32-gcc40/include/osg/observer_ptr
+159
-0
ref_ptr
lib/mac32-gcc40/include/osg/ref_ptr
+138
-0
Action
lib/mac32-gcc40/include/osgAnimation/Action
+147
-0
ActionAnimation
lib/mac32-gcc40/include/osgAnimation/ActionAnimation
+41
-0
ActionBlendIn
lib/mac32-gcc40/include/osgAnimation/ActionBlendIn
+44
-0
ActionBlendOut
lib/mac32-gcc40/include/osgAnimation/ActionBlendOut
+45
-0
ActionCallback
lib/mac32-gcc40/include/osgAnimation/ActionCallback
+41
-0
ActionStripAnimation
lib/mac32-gcc40/include/osgAnimation/ActionStripAnimation
+57
-0
ActionVisitor
lib/mac32-gcc40/include/osgAnimation/ActionVisitor
+117
-0
Animation
lib/mac32-gcc40/include/osgAnimation/Animation
+104
-0
AnimationManagerBase
lib/mac32-gcc40/include/osgAnimation/AnimationManagerBase
+70
-0
AnimationUpdateCallback
lib/mac32-gcc40/include/osgAnimation/AnimationUpdateCallback
+72
-0
BasicAnimationManager
lib/mac32-gcc40/include/osgAnimation/BasicAnimationManager
+53
-0
Bone
lib/mac32-gcc40/include/osgAnimation/Bone
+61
-0
BoneMapVisitor
lib/mac32-gcc40/include/osgAnimation/BoneMapVisitor
+42
-0
Channel
lib/mac32-gcc40/include/osgAnimation/Channel
+185
-0
CubicBezier
lib/mac32-gcc40/include/osgAnimation/CubicBezier
+79
-0
EaseMotion
lib/mac32-gcc40/include/osgAnimation/EaseMotion
+530
-0
Export
lib/mac32-gcc40/include/osgAnimation/Export
+67
-0
FrameAction
lib/mac32-gcc40/include/osgAnimation/FrameAction
+26
-0
Interpolator
lib/mac32-gcc40/include/osgAnimation/Interpolator
+240
-0
Keyframe
lib/mac32-gcc40/include/osgAnimation/Keyframe
+141
-0
LinkVisitor
lib/mac32-gcc40/include/osgAnimation/LinkVisitor
+56
-0
MorphGeometry
lib/mac32-gcc40/include/osgAnimation/MorphGeometry
+154
-0
RigGeometry
lib/mac32-gcc40/include/osgAnimation/RigGeometry
+136
-0
RigTransform
lib/mac32-gcc40/include/osgAnimation/RigTransform
+36
-0
RigTransformHardware
lib/mac32-gcc40/include/osgAnimation/RigTransformHardware
+85
-0
RigTransformSoftware
lib/mac32-gcc40/include/osgAnimation/RigTransformSoftware
+172
-0
Sampler
lib/mac32-gcc40/include/osgAnimation/Sampler
+138
-0
Skeleton
lib/mac32-gcc40/include/osgAnimation/Skeleton
+49
-0
StackedMatrixElement
lib/mac32-gcc40/include/osgAnimation/StackedMatrixElement
+54
-0
StackedQuaternionElement
...mac32-gcc40/include/osgAnimation/StackedQuaternionElement
+54
-0
StackedRotateAxisElement
...mac32-gcc40/include/osgAnimation/StackedRotateAxisElement
+59
-0
StackedScaleElement
lib/mac32-gcc40/include/osgAnimation/StackedScaleElement
+56
-0
StackedTransform
lib/mac32-gcc40/include/osgAnimation/StackedTransform
+42
-0
StackedTransformElement
lib/mac32-gcc40/include/osgAnimation/StackedTransformElement
+42
-0
StackedTranslateElement
lib/mac32-gcc40/include/osgAnimation/StackedTranslateElement
+54
-0
StatsHandler
lib/mac32-gcc40/include/osgAnimation/StatsHandler
+113
-0
StatsVisitor
lib/mac32-gcc40/include/osgAnimation/StatsVisitor
+53
-0
Target
lib/mac32-gcc40/include/osgAnimation/Target
+134
-0
Timeline
lib/mac32-gcc40/include/osgAnimation/Timeline
+122
-0
TimelineAnimationManager
...mac32-gcc40/include/osgAnimation/TimelineAnimationManager
+44
-0
UpdateBone
lib/mac32-gcc40/include/osgAnimation/UpdateBone
+36
-0
UpdateMaterial
lib/mac32-gcc40/include/osgAnimation/UpdateMaterial
+46
-0
UpdateMatrixTransform
lib/mac32-gcc40/include/osgAnimation/UpdateMatrixTransform
+48
-0
Vec3Packed
lib/mac32-gcc40/include/osgAnimation/Vec3Packed
+119
-0
VertexInfluence
lib/mac32-gcc40/include/osgAnimation/VertexInfluence
+103
-0
Archive
lib/mac32-gcc40/include/osgDB/Archive
+86
-0
AuthenticationMap
lib/mac32-gcc40/include/osgDB/AuthenticationMap
+79
-0
Callbacks
lib/mac32-gcc40/include/osgDB/Callbacks
+110
-0
ConvertUTF
lib/mac32-gcc40/include/osgDB/ConvertUTF
+52
-0
DataTypes
lib/mac32-gcc40/include/osgDB/DataTypes
+135
-0
DatabasePager
lib/mac32-gcc40/include/osgDB/DatabasePager
+476
-0
DatabaseRevisions
lib/mac32-gcc40/include/osgDB/DatabaseRevisions
+133
-0
DotOsgWrapper
lib/mac32-gcc40/include/osgDB/DotOsgWrapper
+171
-0
DynamicLibrary
lib/mac32-gcc40/include/osgDB/DynamicLibrary
+79
-0
Export
lib/mac32-gcc40/include/osgDB/Export
+51
-0
ExternalFileWriter
lib/mac32-gcc40/include/osgDB/ExternalFileWriter
+106
-0
FileCache
lib/mac32-gcc40/include/osgDB/FileCache
+77
-0
FileNameUtils
lib/mac32-gcc40/include/osgDB/FileNameUtils
+86
-0
FileUtils
lib/mac32-gcc40/include/osgDB/FileUtils
+137
-0
ImageOptions
lib/mac32-gcc40/include/osgDB/ImageOptions
+149
-0
ImagePager
lib/mac32-gcc40/include/osgDB/ImagePager
+175
-0
ImageProcessor
lib/mac32-gcc40/include/osgDB/ImageProcessor
+54
-0
Input
lib/mac32-gcc40/include/osgDB/Input
+306
-0
InputStream
lib/mac32-gcc40/include/osgDB/InputStream
+196
-0
ObjectWrapper
lib/mac32-gcc40/include/osgDB/ObjectWrapper
+181
-0
Options
lib/mac32-gcc40/include/osgDB/Options
+273
-0
Output
lib/mac32-gcc40/include/osgDB/Output
+141
-0
OutputStream
lib/mac32-gcc40/include/osgDB/OutputStream
+196
-0
ParameterOutput
lib/mac32-gcc40/include/osgDB/ParameterOutput
+186
-0
PluginQuery
lib/mac32-gcc40/include/osgDB/PluginQuery
+57
-0
ReadFile
lib/mac32-gcc40/include/osgDB/ReadFile
+284
-0
ReaderWriter
lib/mac32-gcc40/include/osgDB/ReaderWriter
+266
-0
Registry
lib/mac32-gcc40/include/osgDB/Registry
+724
-0
Serializer
lib/mac32-gcc40/include/osgDB/Serializer
+985
-0
SharedStateManager
lib/mac32-gcc40/include/osgDB/SharedStateManager
+141
-0
StreamOperator
lib/mac32-gcc40/include/osgDB/StreamOperator
+111
-0
Version
lib/mac32-gcc40/include/osgDB/Version
+46
-0
WriteFile
lib/mac32-gcc40/include/osgDB/WriteFile
+130
-0
XmlParser
lib/mac32-gcc40/include/osgDB/XmlParser
+156
-0
fstream
lib/mac32-gcc40/include/osgDB/fstream
+69
-0
AnisotropicLighting
lib/mac32-gcc40/include/osgFX/AnisotropicLighting
+122
-0
BumpMapping
lib/mac32-gcc40/include/osgFX/BumpMapping
+198
-0
Cartoon
lib/mac32-gcc40/include/osgFX/Cartoon
+122
-0
Effect
lib/mac32-gcc40/include/osgFX/Effect
+217
-0
Export
lib/mac32-gcc40/include/osgFX/Export
+40
-0
MultiTextureControl
lib/mac32-gcc40/include/osgFX/MultiTextureControl
+53
-0
Outline
lib/mac32-gcc40/include/osgFX/Outline
+97
-0
Registry
lib/mac32-gcc40/include/osgFX/Registry
+74
-0
Scribe
lib/mac32-gcc40/include/osgFX/Scribe
+101
-0
SpecularHighlights
lib/mac32-gcc40/include/osgFX/SpecularHighlights
+138
-0
Technique
lib/mac32-gcc40/include/osgFX/Technique
+158
-0
Validator
lib/mac32-gcc40/include/osgFX/Validator
+75
-0
Version
lib/mac32-gcc40/include/osgFX/Version
+46
-0
AnimationPathManipulator
lib/mac32-gcc40/include/osgGA/AnimationPathManipulator
+121
-0
CameraManipulator
lib/mac32-gcc40/include/osgGA/CameraManipulator
+188
-0
CameraViewSwitchManipulator
lib/mac32-gcc40/include/osgGA/CameraViewSwitchManipulator
+79
-0
DriveManipulator
lib/mac32-gcc40/include/osgGA/DriveManipulator
+123
-0
EventQueue
lib/mac32-gcc40/include/osgGA/EventQueue
+239
-0
EventVisitor
lib/mac32-gcc40/include/osgGA/EventVisitor
+146
-0
Export
lib/mac32-gcc40/include/osgGA/Export
+74
-0
FirstPersonManipulator
lib/mac32-gcc40/include/osgGA/FirstPersonManipulator
+112
-0
FlightManipulator
lib/mac32-gcc40/include/osgGA/FlightManipulator
+83
-0
GUIActionAdapter
lib/mac32-gcc40/include/osgGA/GUIActionAdapter
+91
-0
GUIEventAdapter
lib/mac32-gcc40/include/osgGA/GUIEventAdapter
+630
-0
GUIEventHandler
lib/mac32-gcc40/include/osgGA/GUIEventHandler
+138
-0
KeySwitchMatrixManipulator
lib/mac32-gcc40/include/osgGA/KeySwitchMatrixManipulator
+136
-0
MultiTouchTrackballManipulator
lib/mac32-gcc40/include/osgGA/MultiTouchTrackballManipulator
+47
-0
NodeTrackerManipulator
lib/mac32-gcc40/include/osgGA/NodeTrackerManipulator
+107
-0
OrbitManipulator
lib/mac32-gcc40/include/osgGA/OrbitManipulator
+127
-0
SphericalManipulator
lib/mac32-gcc40/include/osgGA/SphericalManipulator
+178
-0
StandardManipulator
lib/mac32-gcc40/include/osgGA/StandardManipulator
+203
-0
StateSetManipulator
lib/mac32-gcc40/include/osgGA/StateSetManipulator
+110
-0
TerrainManipulator
lib/mac32-gcc40/include/osgGA/TerrainManipulator
+64
-0
TrackballManipulator
lib/mac32-gcc40/include/osgGA/TrackballManipulator
+40
-0
UFOManipulator
lib/mac32-gcc40/include/osgGA/UFOManipulator
+188
-0
Version
lib/mac32-gcc40/include/osgGA/Version
+48
-0
AntiSquish
lib/mac32-gcc40/include/osgManipulator/AntiSquish
+84
-0
Command
lib/mac32-gcc40/include/osgManipulator/Command
+318
-0
CommandManager
lib/mac32-gcc40/include/osgManipulator/CommandManager
+83
-0
Constraint
lib/mac32-gcc40/include/osgManipulator/Constraint
+99
-0
Dragger
lib/mac32-gcc40/include/osgManipulator/Dragger
+345
-0
Export
lib/mac32-gcc40/include/osgManipulator/Export
+44
-0
Projector
lib/mac32-gcc40/include/osgManipulator/Projector
+302
-0
RotateCylinderDragger
lib/mac32-gcc40/include/osgManipulator/RotateCylinderDragger
+73
-0
RotateSphereDragger
lib/mac32-gcc40/include/osgManipulator/RotateSphereDragger
+72
-0
Scale1DDragger
lib/mac32-gcc40/include/osgManipulator/Scale1DDragger
+99
-0
Scale2DDragger
lib/mac32-gcc40/include/osgManipulator/Scale2DDragger
+117
-0
ScaleAxisDragger
lib/mac32-gcc40/include/osgManipulator/ScaleAxisDragger
+48
-0
Selection
lib/mac32-gcc40/include/osgManipulator/Selection
+29
-0
TabBoxDragger
lib/mac32-gcc40/include/osgManipulator/TabBoxDragger
+49
-0
TabBoxTrackballDragger
...mac32-gcc40/include/osgManipulator/TabBoxTrackballDragger
+48
-0
TabPlaneDragger
lib/mac32-gcc40/include/osgManipulator/TabPlaneDragger
+58
-0
TabPlaneTrackballDragger
...c32-gcc40/include/osgManipulator/TabPlaneTrackballDragger
+50
-0
TrackballDragger
lib/mac32-gcc40/include/osgManipulator/TrackballDragger
+50
-0
Translate1DDragger
lib/mac32-gcc40/include/osgManipulator/Translate1DDragger
+70
-0
Translate2DDragger
lib/mac32-gcc40/include/osgManipulator/Translate2DDragger
+68
-0
TranslateAxisDragger
lib/mac32-gcc40/include/osgManipulator/TranslateAxisDragger
+48
-0
TranslatePlaneDragger
lib/mac32-gcc40/include/osgManipulator/TranslatePlaneDragger
+57
-0
Version
lib/mac32-gcc40/include/osgManipulator/Version
+48
-0
AccelOperator
lib/mac32-gcc40/include/osgParticle/AccelOperator
+108
-0
AngularAccelOperator
lib/mac32-gcc40/include/osgParticle/AngularAccelOperator
+99
-0
AngularDampingOperator
lib/mac32-gcc40/include/osgParticle/AngularDampingOperator
+94
-0
BounceOperator
lib/mac32-gcc40/include/osgParticle/BounceOperator
+78
-0
BoxPlacer
lib/mac32-gcc40/include/osgParticle/BoxPlacer
+174
-0
CenteredPlacer
lib/mac32-gcc40/include/osgParticle/CenteredPlacer
+84
-0
CompositePlacer
lib/mac32-gcc40/include/osgParticle/CompositePlacer
+104
-0
ConnectedParticleSystem
lib/mac32-gcc40/include/osgParticle/ConnectedParticleSystem
+79
-0
ConstantRateCounter
lib/mac32-gcc40/include/osgParticle/ConstantRateCounter
+77
-0
Counter
lib/mac32-gcc40/include/osgParticle/Counter
+54
-0
DampingOperator
lib/mac32-gcc40/include/osgParticle/DampingOperator
+94
-0
DomainOperator
lib/mac32-gcc40/include/osgParticle/DomainOperator
+235
-0
Emitter
lib/mac32-gcc40/include/osgParticle/Emitter
+105
-0
ExplosionDebrisEffect
lib/mac32-gcc40/include/osgParticle/ExplosionDebrisEffect
+56
-0
ExplosionEffect
lib/mac32-gcc40/include/osgParticle/ExplosionEffect
+56
-0
ExplosionOperator
lib/mac32-gcc40/include/osgParticle/ExplosionOperator
+127
-0
Export
lib/mac32-gcc40/include/osgParticle/Export
+51
-0
FireEffect
lib/mac32-gcc40/include/osgParticle/FireEffect
+57
-0
FluidFrictionOperator
lib/mac32-gcc40/include/osgParticle/FluidFrictionOperator
+148
-0
FluidProgram
lib/mac32-gcc40/include/osgParticle/FluidProgram
+114
-0
ForceOperator
lib/mac32-gcc40/include/osgParticle/ForceOperator
+98
-0
Interpolator
lib/mac32-gcc40/include/osgParticle/Interpolator
+87
-0
LinearInterpolator
lib/mac32-gcc40/include/osgParticle/LinearInterpolator
+51
-0
ModularEmitter
lib/mac32-gcc40/include/osgParticle/ModularEmitter
+158
-0
ModularProgram
lib/mac32-gcc40/include/osgParticle/ModularProgram
+99
-0
MultiSegmentPlacer
lib/mac32-gcc40/include/osgParticle/MultiSegmentPlacer
+144
-0
Operator
lib/mac32-gcc40/include/osgParticle/Operator
+115
-0
OrbitOperator
lib/mac32-gcc40/include/osgParticle/OrbitOperator
+112
-0
Particle
lib/mac32-gcc40/include/osgParticle/Particle
+636
-0
ParticleEffect
lib/mac32-gcc40/include/osgParticle/ParticleEffect
+118
-0
ParticleProcessor
lib/mac32-gcc40/include/osgParticle/ParticleProcessor
+340
-0
ParticleSystem
lib/mac32-gcc40/include/osgParticle/ParticleSystem
+527
-0
ParticleSystemUpdater
lib/mac32-gcc40/include/osgParticle/ParticleSystemUpdater
+134
-0
Placer
lib/mac32-gcc40/include/osgParticle/Placer
+68
-0
PointPlacer
lib/mac32-gcc40/include/osgParticle/PointPlacer
+78
-0
PrecipitationEffect
lib/mac32-gcc40/include/osgParticle/PrecipitationEffect
+265
-0
Program
lib/mac32-gcc40/include/osgParticle/Program
+68
-0
RadialShooter
lib/mac32-gcc40/include/osgParticle/RadialShooter
+196
-0
RandomRateCounter
lib/mac32-gcc40/include/osgParticle/RandomRateCounter
+76
-0
SectorPlacer
lib/mac32-gcc40/include/osgParticle/SectorPlacer
+149
-0
SegmentPlacer
lib/mac32-gcc40/include/osgParticle/SegmentPlacer
+144
-0
Shooter
lib/mac32-gcc40/include/osgParticle/Shooter
+64
-0
SinkOperator
lib/mac32-gcc40/include/osgParticle/SinkOperator
+100
-0
SmokeEffect
lib/mac32-gcc40/include/osgParticle/SmokeEffect
+56
-0
SmokeTrailEffect
lib/mac32-gcc40/include/osgParticle/SmokeTrailEffect
+56
-0
VariableRateCounter
lib/mac32-gcc40/include/osgParticle/VariableRateCounter
+77
-0
Version
lib/mac32-gcc40/include/osgParticle/Version
+48
-0
range
lib/mac32-gcc40/include/osgParticle/range
+89
-0
AnimationMaterial
lib/mac32-gcc40/include/osgPresentation/AnimationMaterial
+173
-0
CompileSlideCallback
lib/mac32-gcc40/include/osgPresentation/CompileSlideCallback
+45
-0
Export
lib/mac32-gcc40/include/osgPresentation/Export
+49
-0
PickEventHandler
lib/mac32-gcc40/include/osgPresentation/PickEventHandler
+71
-0
SlideEventHandler
lib/mac32-gcc40/include/osgPresentation/SlideEventHandler
+323
-0
SlideShowConstructor
lib/mac32-gcc40/include/osgPresentation/SlideShowConstructor
+520
-0
ConvexPolyhedron
lib/mac32-gcc40/include/osgShadow/ConvexPolyhedron
+123
-0
DebugShadowMap
lib/mac32-gcc40/include/osgShadow/DebugShadowMap
+192
-0
Export
lib/mac32-gcc40/include/osgShadow/Export
+49
-0
LightSpacePerspectiveShadowMap
...32-gcc40/include/osgShadow/LightSpacePerspectiveShadowMap
+122
-0
MinimalCullBoundsShadowMap
lib/mac32-gcc40/include/osgShadow/MinimalCullBoundsShadowMap
+82
-0
MinimalDrawBoundsShadowMap
lib/mac32-gcc40/include/osgShadow/MinimalDrawBoundsShadowMap
+128
-0
MinimalShadowMap
lib/mac32-gcc40/include/osgShadow/MinimalShadowMap
+164
-0
OccluderGeometry
lib/mac32-gcc40/include/osgShadow/OccluderGeometry
+259
-0
ParallelSplitShadowMap
lib/mac32-gcc40/include/osgShadow/ParallelSplitShadowMap
+216
-0
ProjectionShadowMap
lib/mac32-gcc40/include/osgShadow/ProjectionShadowMap
+85
-0
ShadowMap
lib/mac32-gcc40/include/osgShadow/ShadowMap
+123
-0
ShadowTechnique
lib/mac32-gcc40/include/osgShadow/ShadowTechnique
+87
-0
ShadowTexture
lib/mac32-gcc40/include/osgShadow/ShadowTexture
+68
-0
ShadowVolume
lib/mac32-gcc40/include/osgShadow/ShadowVolume
+83
-0
ShadowedScene
lib/mac32-gcc40/include/osgShadow/ShadowedScene
+68
-0
SoftShadowMap
lib/mac32-gcc40/include/osgShadow/SoftShadowMap
+92
-0
StandardShadowMap
lib/mac32-gcc40/include/osgShadow/StandardShadowMap
+200
-0
Version
lib/mac32-gcc40/include/osgShadow/Version
+46
-0
ViewDependentShadowTechnique
...ac32-gcc40/include/osgShadow/ViewDependentShadowTechnique
+232
-0
BlinkSequence
lib/mac32-gcc40/include/osgSim/BlinkSequence
+185
-0
ColorRange
lib/mac32-gcc40/include/osgSim/ColorRange
+66
-0
DOFTransform
lib/mac32-gcc40/include/osgSim/DOFTransform
+175
-0
ElevationSlice
lib/mac32-gcc40/include/osgSim/ElevationSlice
+101
-0
Export
lib/mac32-gcc40/include/osgSim/Export
+59
-0
GeographicLocation
lib/mac32-gcc40/include/osgSim/GeographicLocation
+87
-0
HeightAboveTerrain
lib/mac32-gcc40/include/osgSim/HeightAboveTerrain
+116
-0
Impostor
lib/mac32-gcc40/include/osgSim/Impostor
+121
-0
ImpostorSprite
lib/mac32-gcc40/include/osgSim/ImpostorSprite
+241
-0
InsertImpostorsVisitor
lib/mac32-gcc40/include/osgSim/InsertImpostorsVisitor
+68
-0
LightPoint
lib/mac32-gcc40/include/osgSim/LightPoint
+72
-0
LightPointNode
lib/mac32-gcc40/include/osgSim/LightPointNode
+114
-0
LightPointSystem
lib/mac32-gcc40/include/osgSim/LightPointSystem
+63
-0
LineOfSight
lib/mac32-gcc40/include/osgSim/LineOfSight
+129
-0
MultiSwitch
lib/mac32-gcc40/include/osgSim/MultiSwitch
+107
-0
ObjectRecordData
lib/mac32-gcc40/include/osgSim/ObjectRecordData
+73
-0
OverlayNode
lib/mac32-gcc40/include/osgSim/OverlayNode
+195
-0
ScalarBar
lib/mac32-gcc40/include/osgSim/ScalarBar
+248
-0
ScalarsToColors
lib/mac32-gcc40/include/osgSim/ScalarsToColors
+53
-0
Sector
lib/mac32-gcc40/include/osgSim/Sector
+314
-0
ShapeAttribute
lib/mac32-gcc40/include/osgSim/ShapeAttribute
+128
-0
SphereSegment
lib/mac32-gcc40/include/osgSim/SphereSegment
+317
-0
Version
lib/mac32-gcc40/include/osgSim/Version
+46
-0
VisibilityGroup
lib/mac32-gcc40/include/osgSim/VisibilityGroup
+76
-0
Export
lib/mac32-gcc40/include/osgTerrain/Export
+49
-0
GeometryTechnique
lib/mac32-gcc40/include/osgTerrain/GeometryTechnique
+116
-0
Layer
lib/mac32-gcc40/include/osgTerrain/Layer
+611
-0
Locator
lib/mac32-gcc40/include/osgTerrain/Locator
+132
-0
Terrain
lib/mac32-gcc40/include/osgTerrain/Terrain
+122
-0
TerrainTechnique
lib/mac32-gcc40/include/osgTerrain/TerrainTechnique
+105
-0
TerrainTile
lib/mac32-gcc40/include/osgTerrain/TerrainTile
+293
-0
ValidDataOperator
lib/mac32-gcc40/include/osgTerrain/ValidDataOperator
+74
-0
Version
lib/mac32-gcc40/include/osgTerrain/Version
+46
-0
Export
lib/mac32-gcc40/include/osgText/Export
+49
-0
FadeText
lib/mac32-gcc40/include/osgText/FadeText
+63
-0
Font
lib/mac32-gcc40/include/osgText/Font
+247
-0
Font3D
lib/mac32-gcc40/include/osgText/Font3D
+55
-0
Glyph
lib/mac32-gcc40/include/osgText/Glyph
+296
-0
KerningType
lib/mac32-gcc40/include/osgText/KerningType
+30
-0
String
lib/mac32-gcc40/include/osgText/String
+95
-0
Style
lib/mac32-gcc40/include/osgText/Style
+113
-0
Text
lib/mac32-gcc40/include/osgText/Text
+411
-0
Text3D
lib/mac32-gcc40/include/osgText/Text3D
+157
-0
TextBase
lib/mac32-gcc40/include/osgText/TextBase
+336
-0
Version
lib/mac32-gcc40/include/osgText/Version
+46
-0
ConvertVec
lib/mac32-gcc40/include/osgUtil/ConvertVec
+139
-0
CubeMapGenerator
lib/mac32-gcc40/include/osgUtil/CubeMapGenerator
+121
-0
CullVisitor
lib/mac32-gcc40/include/osgUtil/CullVisitor
+456
-0
DelaunayTriangulator
lib/mac32-gcc40/include/osgUtil/DelaunayTriangulator
+182
-0
DisplayRequirementsVisitor
lib/mac32-gcc40/include/osgUtil/DisplayRequirementsVisitor
+61
-0
DrawElementTypeSimplifier
lib/mac32-gcc40/include/osgUtil/DrawElementTypeSimplifier
+42
-0
EdgeCollector
lib/mac32-gcc40/include/osgUtil/EdgeCollector
+210
-0
Export
lib/mac32-gcc40/include/osgUtil/Export
+52
-0
GLObjectsVisitor
lib/mac32-gcc40/include/osgUtil/GLObjectsVisitor
+137
-0
HalfWayMapGenerator
lib/mac32-gcc40/include/osgUtil/HalfWayMapGenerator
+53
-0
HighlightMapGenerator
lib/mac32-gcc40/include/osgUtil/HighlightMapGenerator
+63
-0
IncrementalCompileOperation
lib/mac32-gcc40/include/osgUtil/IncrementalCompileOperation
+324
-0
IntersectVisitor
lib/mac32-gcc40/include/osgUtil/IntersectVisitor
+228
-0
IntersectionVisitor
lib/mac32-gcc40/include/osgUtil/IntersectionVisitor
+289
-0
LineSegmentIntersector
lib/mac32-gcc40/include/osgUtil/LineSegmentIntersector
+113
-0
MeshOptimizers
lib/mac32-gcc40/include/osgUtil/MeshOptimizers
+101
-0
OperationArrayFunctor
lib/mac32-gcc40/include/osgUtil/OperationArrayFunctor
+116
-0
Optimizer
lib/mac32-gcc40/include/osgUtil/Optimizer
+881
-0
PlaneIntersector
lib/mac32-gcc40/include/osgUtil/PlaneIntersector
+108
-0
PolytopeIntersector
lib/mac32-gcc40/include/osgUtil/PolytopeIntersector
+134
-0
PositionalStateContainer
lib/mac32-gcc40/include/osgUtil/PositionalStateContainer
+77
-0
PrintVisitor
lib/mac32-gcc40/include/osgUtil/PrintVisitor
+53
-0
ReflectionMapGenerator
lib/mac32-gcc40/include/osgUtil/ReflectionMapGenerator
+55
-0
RenderBin
lib/mac32-gcc40/include/osgUtil/RenderBin
+181
-0
RenderLeaf
lib/mac32-gcc40/include/osgUtil/RenderLeaf
+118
-0
RenderStage
lib/mac32-gcc40/include/osgUtil/RenderStage
+318
-0
ReversePrimitiveFunctor
lib/mac32-gcc40/include/osgUtil/ReversePrimitiveFunctor
+60
-0
SceneGraphBuilder
lib/mac32-gcc40/include/osgUtil/SceneGraphBuilder
+186
-0
SceneView
lib/mac32-gcc40/include/osgUtil/SceneView
+560
-0
ShaderGen
lib/mac32-gcc40/include/osgUtil/ShaderGen
+84
-0
Simplifier
lib/mac32-gcc40/include/osgUtil/Simplifier
+121
-0
SmoothingVisitor
lib/mac32-gcc40/include/osgUtil/SmoothingVisitor
+55
-0
StateGraph
lib/mac32-gcc40/include/osgUtil/StateGraph
+317
-0
Statistics
lib/mac32-gcc40/include/osgUtil/Statistics
+232
-0
TangentSpaceGenerator
lib/mac32-gcc40/include/osgUtil/TangentSpaceGenerator
+78
-0
Tessellator
lib/mac32-gcc40/include/osgUtil/Tessellator
+246
-0
TransformAttributeFunctor
lib/mac32-gcc40/include/osgUtil/TransformAttributeFunctor
+46
-0
TransformCallback
lib/mac32-gcc40/include/osgUtil/TransformCallback
+51
-0
TriStripVisitor
lib/mac32-gcc40/include/osgUtil/TriStripVisitor
+91
-0
UpdateVisitor
lib/mac32-gcc40/include/osgUtil/UpdateVisitor
+114
-0
Version
lib/mac32-gcc40/include/osgUtil/Version
+48
-0
CompositeViewer
lib/mac32-gcc40/include/osgViewer/CompositeViewer
+144
-0
Export
lib/mac32-gcc40/include/osgViewer/Export
+57
-0
GraphicsWindow
lib/mac32-gcc40/include/osgViewer/GraphicsWindow
+294
-0
Renderer
lib/mac32-gcc40/include/osgViewer/Renderer
+122
-0
Scene
lib/mac32-gcc40/include/osgViewer/Scene
+75
-0
Version
lib/mac32-gcc40/include/osgViewer/Version
+48
-0
View
lib/mac32-gcc40/include/osgViewer/View
+267
-0
Viewer
lib/mac32-gcc40/include/osgViewer/Viewer
+130
-0
ViewerBase
lib/mac32-gcc40/include/osgViewer/ViewerBase
+330
-0
ViewerEventHandlers
lib/mac32-gcc40/include/osgViewer/ViewerEventHandlers
+544
-0
GraphicsHandleX11
lib/mac32-gcc40/include/osgViewer/api/X11/GraphicsHandleX11
+80
-0
GraphicsWindowX11
lib/mac32-gcc40/include/osgViewer/api/X11/GraphicsWindowX11
+204
-0
PixelBufferX11
lib/mac32-gcc40/include/osgViewer/api/X11/PixelBufferX11
+90
-0
Export
lib/mac32-gcc40/include/osgVolume/Export
+49
-0
FixedFunctionTechnique
lib/mac32-gcc40/include/osgVolume/FixedFunctionTechnique
+60
-0
Layer
lib/mac32-gcc40/include/osgVolume/Layer
+275
-0
Locator
lib/mac32-gcc40/include/osgVolume/Locator
+100
-0
Property
lib/mac32-gcc40/include/osgVolume/Property
+416
-0
RayTracedTechnique
lib/mac32-gcc40/include/osgVolume/RayTracedTechnique
+60
-0
Version
lib/mac32-gcc40/include/osgVolume/Version
+46
-0
Volume
lib/mac32-gcc40/include/osgVolume/Volume
+79
-0
VolumeTechnique
lib/mac32-gcc40/include/osgVolume/VolumeTechnique
+68
-0
VolumeTile
lib/mac32-gcc40/include/osgVolume/VolumeTile
+157
-0
Box
lib/mac32-gcc40/include/osgWidget/Box
+61
-0
Browser
lib/mac32-gcc40/include/osgWidget/Browser
+90
-0
Canvas
lib/mac32-gcc40/include/osgWidget/Canvas
+42
-0
EventInterface
lib/mac32-gcc40/include/osgWidget/EventInterface
+412
-0
Export
lib/mac32-gcc40/include/osgWidget/Export
+52
-0
Frame
lib/mac32-gcc40/include/osgWidget/Frame
+254
-0
Input
lib/mac32-gcc40/include/osgWidget/Input
+112
-0
Label
lib/mac32-gcc40/include/osgWidget/Label
+66
-0
Lua
lib/mac32-gcc40/include/osgWidget/Lua
+46
-0
PdfReader
lib/mac32-gcc40/include/osgWidget/PdfReader
+147
-0
Python
lib/mac32-gcc40/include/osgWidget/Python
+42
-0
ScriptEngine
lib/mac32-gcc40/include/osgWidget/ScriptEngine
+42
-0
StyleInterface
lib/mac32-gcc40/include/osgWidget/StyleInterface
+42
-0
StyleManager
lib/mac32-gcc40/include/osgWidget/StyleManager
+208
-0
Table
lib/mac32-gcc40/include/osgWidget/Table
+78
-0
Types
lib/mac32-gcc40/include/osgWidget/Types
+48
-0
UIObjectParent
lib/mac32-gcc40/include/osgWidget/UIObjectParent
+130
-0
Util
lib/mac32-gcc40/include/osgWidget/Util
+83
-0
Version
lib/mac32-gcc40/include/osgWidget/Version
+35
-0
ViewerEventHandlers
lib/mac32-gcc40/include/osgWidget/ViewerEventHandlers
+125
-0
VncClient
lib/mac32-gcc40/include/osgWidget/VncClient
+63
-0
Widget
lib/mac32-gcc40/include/osgWidget/Widget
+651
-0
Window
lib/mac32-gcc40/include/osgWidget/Window
+662
-0
WindowManager
lib/mac32-gcc40/include/osgWidget/WindowManager
+389
-0
No files found.
.gitignore
View file @
bb4ef9be
...
...
@@ -6,6 +6,7 @@ tags
build
Info.plist
obj
.DS_Store
*.log
*~
*~.skp
...
...
@@ -31,7 +32,6 @@ deploy/qgroundcontrol*
controller_log*
user_config.pri
*.app
*.ncb
*.vcproj
*.vcxproj*
...
...
lib/mac32-gcc40/include/.gitignore
deleted
100644 → 0
View file @
a445c615
OpenThreads
osg*
lib/mac32-gcc40/include/OpenThreads/Atomic
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2008 The Open Thread Group
*
* 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 _OPENTHREADS_ATOMIC_
#define _OPENTHREADS_ATOMIC_
#include <OpenThreads/Config>
#include <OpenThreads/Exports>
#if defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
# include <libkern/OSAtomic.h>
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
#elif defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS) && defined(__i386__)
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
#elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
# include <atomic.h>
# include "Mutex"
# include "ScopedLock"
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
# include "Mutex"
# include "ScopedLock"
#endif
#if defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES)
#define _OPENTHREADS_ATOMIC_INLINE
#else
#define _OPENTHREADS_ATOMIC_INLINE inline
#endif
namespace
OpenThreads
{
/**
* @class Atomic
* @brief This class provides an atomic increment and decrement operation.
*/
class
OPENTHREAD_EXPORT_DIRECTIVE
Atomic
{
public:
Atomic
(
unsigned
value
=
0
)
:
_value
(
value
)
{
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
operator
++
();
_OPENTHREADS_ATOMIC_INLINE
unsigned
operator
--
();
_OPENTHREADS_ATOMIC_INLINE
unsigned
AND
(
unsigned
value
);
_OPENTHREADS_ATOMIC_INLINE
unsigned
OR
(
unsigned
value
);
_OPENTHREADS_ATOMIC_INLINE
unsigned
XOR
(
unsigned
value
);
_OPENTHREADS_ATOMIC_INLINE
unsigned
exchange
(
unsigned
value
=
0
);
_OPENTHREADS_ATOMIC_INLINE
operator
unsigned
()
const
;
private:
Atomic
(
const
Atomic
&
);
Atomic
&
operator
=
(
const
Atomic
&
);
#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
mutable
Mutex
_mutex
;
#endif
#if defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
volatile
long
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
volatile
int32_t
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
volatile
uint_t
_value
;
mutable
Mutex
_mutex
;
// needed for xor
#else
volatile
unsigned
_value
;
#endif
};
/**
* @class AtomicPtr
* @brief This class provides an atomic pointer assignment using cas operations.
*/
class
OPENTHREAD_EXPORT_DIRECTIVE
AtomicPtr
{
public:
AtomicPtr
(
void
*
ptr
=
0
)
:
_ptr
(
ptr
)
{
}
~
AtomicPtr
()
{
_ptr
=
0
;
}
// assigns a new pointer
_OPENTHREADS_ATOMIC_INLINE
bool
assign
(
void
*
ptrNew
,
const
void
*
const
ptrOld
);
_OPENTHREADS_ATOMIC_INLINE
void
*
get
()
const
;
private:
AtomicPtr
(
const
AtomicPtr
&
);
AtomicPtr
&
operator
=
(
const
AtomicPtr
&
);
#if defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
mutable
Mutex
_mutex
;
#endif
void
*
volatile
_ptr
;
};
#if !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES)
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
operator
++
()
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_add_and_fetch
(
&
_value
,
1
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__add_and_fetch
(
&
_value
,
1
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
atomic_inc_uint_nv
(
&
_value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
return
++
_value
;
#else
return
++
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
operator
--
()
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_sub_and_fetch
(
&
_value
,
1
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__sub_and_fetch
(
&
_value
,
1
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
atomic_dec_uint_nv
(
&
_value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
return
--
_value
;
#else
return
--
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
AND
(
unsigned
value
)
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_fetch_and_and
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__and_and_fetch
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
atomic_and_uint_nv
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
_value
&=
value
;
return
_value
;
#else
_value
&=
value
;
return
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
OR
(
unsigned
value
)
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_fetch_and_or
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__or_and_fetch
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
atomic_or_uint_nv
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
_value
|=
value
;
return
_value
;
#else
_value
|=
value
;
return
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
XOR
(
unsigned
value
)
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_fetch_and_xor
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__xor_and_fetch
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
_value
^=
value
;
return
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
_value
^=
value
;
return
_value
;
#else
_value
^=
value
;
return
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
unsigned
Atomic
::
exchange
(
unsigned
value
)
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_lock_test_and_set
(
&
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__compare_and_swap
(
&
_value
,
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
atomic_cas_uint
(
&
_value
,
_value
,
value
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
unsigned
oldval
=
_value
;
_value
=
value
;
return
oldval
;
#else
unsigned
oldval
=
_value
;
_value
=
value
;
return
oldval
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
Atomic
::
operator
unsigned
()
const
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
__sync_synchronize
();
return
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
__synchronize
();
return
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
membar_consumer
();
// Hmm, do we need???
return
_value
;
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
return
_value
;
#else
return
_value
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
bool
AtomicPtr
::
assign
(
void
*
ptrNew
,
const
void
*
const
ptrOld
)
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
return
__sync_bool_compare_and_swap
(
&
_ptr
,
ptrOld
,
ptrNew
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
return
__compare_and_swap
((
unsigned
long
*
)
&
_ptr
,
(
unsigned
long
)
ptrOld
,
(
unsigned
long
)
ptrNew
);
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
return
ptrOld
==
atomic_cas_ptr
(
&
_ptr
,
const_cast
<
void
*>
(
ptrOld
),
ptrNew
);
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
if
(
_ptr
!=
ptrOld
)
return
false
;
_ptr
=
ptrNew
;
return
true
;
#else
if
(
_ptr
!=
ptrOld
)
return
false
;
_ptr
=
ptrNew
;
return
true
;
#endif
}
_OPENTHREADS_ATOMIC_INLINE
void
*
AtomicPtr
::
get
()
const
{
#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)
__sync_synchronize
();
return
_ptr
;
#elif defined(_OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS)
__synchronize
();
return
_ptr
;
#elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
membar_consumer
();
// Hmm, do we need???
return
_ptr
;
#elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
ScopedLock
<
Mutex
>
lock
(
_mutex
);
return
_ptr
;
#else
return
_ptr
;
#endif
}
#endif // !defined(_OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES)
}
#endif // _OPENTHREADS_ATOMIC_
lib/mac32-gcc40/include/OpenThreads/Barrier
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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.
*/
//
// Barrier - C++ barrier class
// ~~~~~~~
//
#ifndef _OPENTHREADS_BARRIER_
#define _OPENTHREADS_BARRIER_
#include <OpenThreads/Exports>
namespace
OpenThreads
{
/**
* @class Barrier
* @brief This class provides an object-oriented thread barrier interface
*
* @warning It is unwise to use the construct "Barrier barrier" in the
* global namespace on sgi's. The object "barrier"
* will confilict with the c-library sproc function "barrier" and
* unpredictable results may occur. You have been warned.
*/
class
OPENTHREAD_EXPORT_DIRECTIVE
Barrier
{
public:
/**
* Constructor
*/
Barrier
(
int
numThreads
=
0
);
/**
* Destructor
*/
virtual
~
Barrier
();
/**
* Reset the barrier to it's original state.
*/
virtual
void
reset
();
/**
* Block until numThreads threads have entered the barrier.
*/
virtual
void
block
(
unsigned
int
numThreads
=
0
);
/**
* Release the barrier, now.
*/
virtual
void
release
();
/**
* Return the number of threads currently blocked in the barrier,
* Return -1 if error.
*/
virtual
int
numThreadsCurrentlyBlocked
();
void
invalidate
();
private:
/**
* Private copy constructor, to prevent tampering.
*/
Barrier
(
const
Barrier
&
/*b*/
)
{};
/**
* Private copy assignment, to prevent tampering.
*/
Barrier
&
operator
=
(
const
Barrier
&
/*b*/
)
{
return
*
(
this
);};
/**
* Implementation-specific private data.
*/
void
*
_prvData
;
bool
_valid
;
};
}
#endif // !_OPENTHREADS_BARRIER_
lib/mac32-gcc40/include/OpenThreads/Block
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 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 _OPENTHREADS_BLOCK_
#define _OPENTHREADS_BLOCK_
#include <OpenThreads/Thread>
#include <OpenThreads/Barrier>
#include <OpenThreads/Condition>
#include <OpenThreads/ScopedLock>
namespace
OpenThreads
{
/** Block is a block that can be used to halt a thread that is waiting another thread to release it.*/
class
Block
{
public:
Block
()
:
_released
(
false
)
{}
~
Block
()
{
release
();
}
inline
bool
block
()
{
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
!
_released
)
{
return
_cond
.
wait
(
&
_mut
)
==
0
;
}
else
{
return
true
;
}
}
inline
bool
block
(
unsigned
long
timeout
)
{
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
!
_released
)
{
return
_cond
.
wait
(
&
_mut
,
timeout
)
==
0
;
}
else
{
return
true
;
}
}
inline
void
release
()
{
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
!
_released
)
{
_released
=
true
;
_cond
.
broadcast
();
}
}
inline
void
reset
()
{
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
_released
=
false
;
}
inline
void
set
(
bool
doRelease
)
{
if
(
doRelease
!=
_released
)
{
if
(
doRelease
)
release
();
else
reset
();
}
}
protected:
Mutex
_mut
;
Condition
_cond
;
bool
_released
;
private:
Block
(
const
Block
&
)
{}
};
/** BlockCount is a block that can be used to halt a thread that is waiting for a specified number of operations to be completed.*/
class
BlockCount
{
public:
BlockCount
(
unsigned
int
blockCount
)
:
_blockCount
(
blockCount
),
_currentCount
(
0
)
{}
~
BlockCount
()
{
_blockCount
=
0
;
release
();
}
inline
void
completed
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
_currentCount
>
0
)
{
--
_currentCount
;
if
(
_currentCount
==
0
)
{
// osg::notify(osg::NOTICE)<<"Released"<<std::endl;
_cond
.
broadcast
();
}
}
}
inline
void
block
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
_currentCount
)
_cond
.
wait
(
&
_mut
);
}
inline
void
reset
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
_currentCount
!=
_blockCount
)
{
if
(
_blockCount
==
0
)
_cond
.
broadcast
();
_currentCount
=
_blockCount
;
}
}
inline
void
release
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
mutlock
(
_mut
);
if
(
_currentCount
)
{
_currentCount
=
0
;
_cond
.
broadcast
();
}
}
inline
void
setBlockCount
(
unsigned
int
blockCount
)
{
_blockCount
=
blockCount
;
}
inline
unsigned
int
getBlockCount
()
const
{
return
_blockCount
;
}
inline
unsigned
int
getCurrentCount
()
const
{
return
_currentCount
;
}
protected:
OpenThreads
::
Mutex
_mut
;
OpenThreads
::
Condition
_cond
;
unsigned
int
_blockCount
;
unsigned
int
_currentCount
;
private:
BlockCount
(
const
BlockCount
&
)
{}
};
}
#endif
lib/mac32-gcc40/include/OpenThreads/Condition
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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.
*/
//
// Condition - C++ condition class
// ~~~~~~~~~
//
#ifndef _OPENTHREADS_CONDITION_
#define _OPENTHREADS_CONDITION_
#include <OpenThreads/Exports>
#include <OpenThreads/Mutex>
namespace
OpenThreads
{
/**
* @class Condition
* @brief This class provides an object-oriented thread condition interface.
*/
class
OPENTHREAD_EXPORT_DIRECTIVE
Condition
{
public:
/**
* Constructor
*/
Condition
();
/**
* Destructor
*/
virtual
~
Condition
();
/**
* Wait on a mutex.
*/
virtual
int
wait
(
Mutex
*
mutex
);
/**
* Wait on a mutex for a given amount of time (ms)
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
wait
(
Mutex
*
mutex
,
unsigned
long
int
ms
);
/**
* Signal a SINGLE thread to wake if it's waiting.
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
signal
();
/**
* Wake all threads waiting on this condition.
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
broadcast
();
private:
/**
* Private copy constructor, to prevent tampering.
*/
Condition
(
const
Condition
&
/*c*/
)
{};
/**
* Private copy assignment, to prevent tampering.
*/
Condition
&
operator
=
(
const
Condition
&
/*c*/
)
{
return
*
(
this
);};
/**
* Implementation-specific data
*/
void
*
_prvData
;
};
}
#endif // !_OPENTHREADS_CONDITION_
lib/mac32-gcc40/include/OpenThreads/Config
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenSceneGraph - Copyright (C) 2008 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.
*/
/****************************************************************************
* THIS FILE IS AUTOGENERATED BY CMAKE. DO NOT EDIT!
****************************************************************************/
/* Changes to the configuration reflected here can be made with ccmake on
* unix or with cmake-gui on windows. Alternatively you can use cmake's -D
* or -P switches to set some configuration values at cmake configuration time.
*/
#ifndef _OPENTHREADS_CONFIG
#define _OPENTHREADS_CONFIG
#define _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
/* #undef _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS */
/* #undef _OPENTHREADS_ATOMIC_USE_SUN */
/* #undef _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED */
#define _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
/* #undef _OPENTHREADS_ATOMIC_USE_MUTEX */
/* #undef OT_LIBRARY_STATIC */
#endif
lib/mac32-gcc40/include/OpenThreads/Exports
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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 _OPENTHREAD_EXPORTS_H_
#define _OPENTHREAD_EXPORTS_H_
#include <OpenThreads/Config>
#ifndef WIN32
#define OPENTHREAD_EXPORT_DIRECTIVE
#else
#if defined( OT_LIBRARY_STATIC )
#define OPENTHREAD_EXPORT_DIRECTIVE
#elif defined( OPENTHREADS_EXPORTS )
#define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllexport)
#else
#define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllimport)
#if 0 // Commented out for now
#ifdef _MSC_VER
#ifdef _DEBUG
#pragma comment(lib ,"OpenThreadsWin32d")
#else
#pragma comment(lib, "OpenThreadsWin32")
#endif
#endif
#endif
#endif
#endif
#endif
lib/mac32-gcc40/include/OpenThreads/Mutex
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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.
*/
//
// Mutex - C++ mutex class
// ~~~~~
//
#ifndef _OPENTHREADS_MUTEX_
#define _OPENTHREADS_MUTEX_
#include <OpenThreads/Exports>
namespace
OpenThreads
{
/**
* @class Mutex
* @brief This class provides an object-oriented thread mutex interface.
*/
class
OPENTHREAD_EXPORT_DIRECTIVE
Mutex
{
friend
class
Condition
;
public:
enum
MutexType
{
MUTEX_NORMAL
,
MUTEX_RECURSIVE
};
/**
* Constructor
*/
Mutex
(
MutexType
type
=
MUTEX_NORMAL
);
/**
* Destructor
*/
virtual
~
Mutex
();
MutexType
getMutexType
()
const
{
return
_mutexType
;
}
/**
* Lock the mutex
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
lock
();
/**
* Unlock the mutex
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
unlock
();
/**
* Test if mutex can be locked.
*
* @return 0 if normal, -1 if errno set, errno code otherwise.
*/
virtual
int
trylock
();
private:
/**
* Private copy constructor, to prevent tampering.
*/
Mutex
(
const
Mutex
&
/*m*/
)
{};
/**
* Private copy assignment, to prevent tampering.
*/
Mutex
&
operator
=
(
const
Mutex
&
/*m*/
)
{
return
*
(
this
);};
/**
* Implementation-specific private data.
*/
void
*
_prvData
;
MutexType
_mutexType
;
};
}
#endif // _OPENTHREADS_MUTEX_
lib/mac32-gcc40/include/OpenThreads/ReadWriteMutex
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 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 _OPENTHREADS_READWRITEMUTEX_
#define _OPENTHREADS_READWRITEMUTEX_
#include <OpenThreads/Thread>
#include <OpenThreads/ReentrantMutex>
namespace
OpenThreads
{
class
ReadWriteMutex
{
public:
ReadWriteMutex
()
:
_readCount
(
0
)
{}
virtual
~
ReadWriteMutex
()
{}
virtual
int
readLock
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
lock
(
_readCountMutex
);
int
result
=
0
;
if
(
_readCount
==
0
)
{
result
=
_readWriteMutex
.
lock
();
}
++
_readCount
;
return
result
;
}
virtual
int
readUnlock
()
{
OpenThreads
::
ScopedLock
<
OpenThreads
::
Mutex
>
lock
(
_readCountMutex
);
int
result
=
0
;
if
(
_readCount
>
0
)
{
--
_readCount
;
if
(
_readCount
==
0
)
{
result
=
_readWriteMutex
.
unlock
();
}
}
return
result
;
}
virtual
int
writeLock
()
{
return
_readWriteMutex
.
lock
();
}
virtual
int
writeUnlock
()
{
return
_readWriteMutex
.
unlock
();
}
protected:
ReadWriteMutex
(
const
ReadWriteMutex
&
)
{}
ReadWriteMutex
&
operator
=
(
const
ReadWriteMutex
&
)
{
return
*
(
this
);
}
#if 0
ReentrantMutex _readWriteMutex;
ReentrantMutex _readCountMutex;
#else
OpenThreads
::
Mutex
_readWriteMutex
;
OpenThreads
::
Mutex
_readCountMutex
;
#endif
unsigned
int
_readCount
;
};
class
ScopedReadLock
{
public:
ScopedReadLock
(
ReadWriteMutex
&
mutex
)
:
_mutex
(
mutex
)
{
_mutex
.
readLock
();
}
~
ScopedReadLock
()
{
_mutex
.
readUnlock
();
}
protected:
ReadWriteMutex
&
_mutex
;
ScopedReadLock
&
operator
=
(
const
ScopedReadLock
&
)
{
return
*
this
;
}
};
class
ScopedWriteLock
{
public:
ScopedWriteLock
(
ReadWriteMutex
&
mutex
)
:
_mutex
(
mutex
)
{
_mutex
.
writeLock
();
}
~
ScopedWriteLock
()
{
_mutex
.
writeUnlock
();
}
protected:
ReadWriteMutex
&
_mutex
;
ScopedWriteLock
&
operator
=
(
const
ScopedWriteLock
&
)
{
return
*
this
;
}
};
}
#endif
lib/mac32-gcc40/include/OpenThreads/ReentrantMutex
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 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 _OPENTHREADS_REENTRANTMUTEX_
#define _OPENTHREADS_REENTRANTMUTEX_
#include <OpenThreads/Thread>
#include <OpenThreads/Mutex>
#include <OpenThreads/ScopedLock>
namespace
OpenThreads
{
class
ReentrantMutex
:
public
OpenThreads
::
Mutex
{
public:
ReentrantMutex
()
:
Mutex
(
MUTEX_RECURSIVE
)
{}
};
}
#endif
lib/mac32-gcc40/include/OpenThreads/ScopedLock
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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.
*/
//
// ScopedLock and ReverseScopedLock templates
// ~~~~~~~
//
#ifndef _ScopedLock_
#define _ScopedLock_
namespace
OpenThreads
{
template
<
class
M
>
class
ScopedLock
{
private:
M
&
m_lock
;
ScopedLock
(
const
ScopedLock
&
);
// prevent copy
ScopedLock
&
operator
=
(
const
ScopedLock
&
);
// prevent assign
public:
explicit
ScopedLock
(
M
&
m
)
:
m_lock
(
m
)
{
m_lock
.
lock
();}
~
ScopedLock
(){
m_lock
.
unlock
();}
};
template
<
class
M
>
class
ReverseScopedLock
{
private:
M
&
m_lock
;
ReverseScopedLock
(
const
ReverseScopedLock
&
);
// prevent copy
ReverseScopedLock
&
operator
=
(
const
ReverseScopedLock
&
);
// prevent assign
public:
explicit
ReverseScopedLock
(
M
&
m
)
:
m_lock
(
m
)
{
m_lock
.
unlock
();}
~
ReverseScopedLock
(){
m_lock
.
lock
();}
};
template
<
class
M
>
class
ScopedPointerLock
{
private:
M
*
m_lock
;
ScopedPointerLock
(
const
ScopedPointerLock
&
);
// prevent copy
ScopedPointerLock
&
operator
=
(
const
ScopedPointerLock
&
);
// prevent assign
public:
explicit
ScopedPointerLock
(
M
*
m
)
:
m_lock
(
m
)
{
if
(
m_lock
)
m_lock
->
lock
();}
~
ScopedPointerLock
(){
if
(
m_lock
)
m_lock
->
unlock
();}
};
template
<
class
M
>
class
ReverseScopedPointerLock
{
private:
M
*
m_lock
;
ReverseScopedPointerLock
(
const
ReverseScopedPointerLock
&
);
// prevent copy
ReverseScopedPointerLock
&
operator
=
(
const
ReverseScopedPointerLock
&
);
// prevent assign
public:
explicit
ReverseScopedPointerLock
(
M
*
m
)
:
m_lock
(
m
)
{
if
(
m_lock
)
m_lock
->
unlock
();}
~
ReverseScopedPointerLock
(){
if
(
m_lock
)
m_lock
->
lock
();}
};
}
#endif
lib/mac32-gcc40/include/OpenThreads/Thread
0 → 100644
View file @
bb4ef9be
This diff is collapsed.
Click to expand it.
lib/mac32-gcc40/include/OpenThreads/Version
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* 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 OPENTHREADS_VERSION
#define OPENTHREADS_VERSION 1
#include <OpenThreads/Exports>
extern
"C"
{
#define OPENTHREADS_MAJOR_VERSION 2
#define OPENTHREADS_MINOR_VERSION 6
#define OPENTHREADS_PATCH_VERSION 0
#define OPENTHREADS_SOVERSION 12
/** OpenThreadsGetVersion() returns the library version number.
* Numbering convention : OpenThreads-1.0 will return 1.0 from OpenThreadsGetVersion. */
extern
OPENTHREAD_EXPORT_DIRECTIVE
const
char
*
OpenThreadsGetVersion
();
/** The OpenThreadsGetSOVersion() method returns the OpenSceneGraph soversion number. */
extern
OPENTHREAD_EXPORT_DIRECTIVE
const
char
*
OpenThreadsGetSOVersion
();
/** The OpenThreadsGetLibraryName() method returns the library name in human-friendly form. */
extern
OPENTHREAD_EXPORT_DIRECTIVE
const
char
*
OpenThreadsGetLibraryName
();
}
#endif
lib/mac32-gcc40/include/osg/AlphaFunc
0 → 100644
View file @
bb4ef9be
/* -*-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_ALPHAFUNC
#define OSG_ALPHAFUNC 1
#include <osg/StateAttribute>
#ifndef GL_ALPHA_TEST
#define GL_ALPHA_TEST 0x0BC0
#endif
namespace
osg
{
/** Encapsulates OpenGL glAlphaFunc.
*/
class
OSG_EXPORT
AlphaFunc
:
public
StateAttribute
{
public
:
enum
ComparisonFunction
{
NEVER
=
GL_NEVER
,
LESS
=
GL_LESS
,
EQUAL
=
GL_EQUAL
,
LEQUAL
=
GL_LEQUAL
,
GREATER
=
GL_GREATER
,
NOTEQUAL
=
GL_NOTEQUAL
,
GEQUAL
=
GL_GEQUAL
,
ALWAYS
=
GL_ALWAYS
};
AlphaFunc
();
AlphaFunc
(
ComparisonFunction
func
,
float
ref
)
:
_comparisonFunc
(
func
),
_referenceValue
(
ref
)
{}
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
AlphaFunc
(
const
AlphaFunc
&
af
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
)
:
StateAttribute
(
af
,
copyop
),
_comparisonFunc
(
af
.
_comparisonFunc
),
_referenceValue
(
af
.
_referenceValue
)
{}
META_StateAttribute
(
osg
,
AlphaFunc
,
ALPHAFUNC
);
/** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */
virtual
int
compare
(
const
StateAttribute
&
sa
)
const
{
// Check for equal types, then create the rhs variable
// used by the COMPARE_StateAttribute_Parameter macros below.
COMPARE_StateAttribute_Types
(
AlphaFunc
,
sa
)
// Compare each parameter in turn against the rhs.
COMPARE_StateAttribute_Parameter
(
_comparisonFunc
)
COMPARE_StateAttribute_Parameter
(
_referenceValue
)
return
0
;
// Passed all the above comparison macros, so must be equal.
}
virtual
bool
getModeUsage
(
StateAttribute
::
ModeUsage
&
usage
)
const
{
usage
.
usesMode
(
GL_ALPHA_TEST
);
return
true
;
}
inline
void
setFunction
(
ComparisonFunction
func
,
float
ref
)
{
_comparisonFunc
=
func
;
_referenceValue
=
ref
;
}
inline
void
setFunction
(
ComparisonFunction
func
)
{
_comparisonFunc
=
func
;
}
inline
ComparisonFunction
getFunction
()
const
{
return
_comparisonFunc
;
}
inline
void
setReferenceValue
(
float
value
)
{
_referenceValue
=
value
;
}
inline
float
getReferenceValue
()
const
{
return
_referenceValue
;
}
virtual
void
apply
(
State
&
state
)
const
;
protected:
virtual
~
AlphaFunc
();
ComparisonFunction
_comparisonFunc
;
float
_referenceValue
;
};
}
#endif
lib/mac32-gcc40/include/osg/AnimationPath
0 → 100644
View file @
bb4ef9be
This diff is collapsed.
Click to expand it.
lib/mac32-gcc40/include/osg/ApplicationUsage
0 → 100644
View file @
bb4ef9be
/* -*-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_APPLICATIONUSAGE
#define OSG_APPLICATIONUSAGE 1
#include <osg/Referenced>
#include <map>
#include <string>
#include <ostream>
namespace
osg
{
class
OSG_EXPORT
ApplicationUsage
:
public
osg
::
Referenced
{
public:
static
ApplicationUsage
*
instance
();
ApplicationUsage
()
{}
ApplicationUsage
(
const
std
::
string
&
commandLineUsage
);
typedef
std
::
map
<
std
::
string
,
std
::
string
>
UsageMap
;
/** The ApplicationName is often displayed when logging errors, and frequently incorporated into the Description (below). */
void
setApplicationName
(
const
std
::
string
&
name
)
{
_applicationName
=
name
;
}
const
std
::
string
&
getApplicationName
()
const
{
return
_applicationName
;
}
/** If non-empty, the Description is typically shown by the Help Handler
* as text on the Help display (which also lists keyboard abbreviations. */
void
setDescription
(
const
std
::
string
&
desc
)
{
_description
=
desc
;
}
const
std
::
string
&
getDescription
()
const
{
return
_description
;
}
enum
Type
{
NO_HELP
=
0x0
,
COMMAND_LINE_OPTION
=
0x1
,
ENVIRONMENTAL_VARIABLE
=
0x2
,
KEYBOARD_MOUSE_BINDING
=
0x4
,
HELP_ALL
=
KEYBOARD_MOUSE_BINDING
|
ENVIRONMENTAL_VARIABLE
|
COMMAND_LINE_OPTION
};
void
addUsageExplanation
(
Type
type
,
const
std
::
string
&
option
,
const
std
::
string
&
explanation
);
void
setCommandLineUsage
(
const
std
::
string
&
explanation
)
{
_commandLineUsage
=
explanation
;
}
const
std
::
string
&
getCommandLineUsage
()
const
{
return
_commandLineUsage
;
}
void
addCommandLineOption
(
const
std
::
string
&
option
,
const
std
::
string
&
explanation
,
const
std
::
string
&
defaultValue
=
""
);
void
setCommandLineOptions
(
const
UsageMap
&
usageMap
)
{
_commandLineOptions
=
usageMap
;
}
const
UsageMap
&
getCommandLineOptions
()
const
{
return
_commandLineOptions
;
}
void
setCommandLineOptionsDefaults
(
const
UsageMap
&
usageMap
)
{
_commandLineOptionsDefaults
=
usageMap
;
}
const
UsageMap
&
getCommandLineOptionsDefaults
()
const
{
return
_commandLineOptionsDefaults
;
}
void
addEnvironmentalVariable
(
const
std
::
string
&
option
,
const
std
::
string
&
explanation
,
const
std
::
string
&
defaultValue
=
""
);
void
setEnvironmentalVariables
(
const
UsageMap
&
usageMap
)
{
_environmentalVariables
=
usageMap
;
}
const
UsageMap
&
getEnvironmentalVariables
()
const
{
return
_environmentalVariables
;
}
void
setEnvironmentalVariablesDefaults
(
const
UsageMap
&
usageMap
)
{
_environmentalVariablesDefaults
=
usageMap
;
}
const
UsageMap
&
getEnvironmentalVariablesDefaults
()
const
{
return
_environmentalVariablesDefaults
;
}
void
addKeyboardMouseBinding
(
const
std
::
string
&
option
,
const
std
::
string
&
explanation
);
void
setKeyboardMouseBindings
(
const
UsageMap
&
usageMap
)
{
_keyboardMouse
=
usageMap
;
}
const
UsageMap
&
getKeyboardMouseBindings
()
const
{
return
_keyboardMouse
;
}
void
getFormattedString
(
std
::
string
&
str
,
const
UsageMap
&
um
,
unsigned
int
widthOfOutput
=
80
,
bool
showDefaults
=
false
,
const
UsageMap
&
ud
=
UsageMap
());
void
write
(
std
::
ostream
&
output
,
const
UsageMap
&
um
,
unsigned
int
widthOfOutput
=
80
,
bool
showDefaults
=
false
,
const
UsageMap
&
ud
=
UsageMap
());
void
write
(
std
::
ostream
&
output
,
unsigned
int
type
=
COMMAND_LINE_OPTION
,
unsigned
int
widthOfOutput
=
80
,
bool
showDefaults
=
false
);
void
writeEnvironmentSettings
(
std
::
ostream
&
output
);
protected:
virtual
~
ApplicationUsage
()
{}
std
::
string
_applicationName
;
std
::
string
_description
;
std
::
string
_commandLineUsage
;
UsageMap
_commandLineOptions
;
UsageMap
_environmentalVariables
;
UsageMap
_keyboardMouse
;
UsageMap
_environmentalVariablesDefaults
;
UsageMap
_commandLineOptionsDefaults
;
};
class
ApplicationUsageProxy
{
public:
/** register an explanation of commandline/environmentvariable/keyboard mouse usage.*/
ApplicationUsageProxy
(
ApplicationUsage
::
Type
type
,
const
std
::
string
&
option
,
const
std
::
string
&
explanation
)
{
ApplicationUsage
::
instance
()
->
addUsageExplanation
(
type
,
option
,
explanation
);
}
};
}
#endif
lib/mac32-gcc40/include/osg/ArgumentParser
0 → 100644
View file @
bb4ef9be
/* -*-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_ARGUMENTPARSER
#define OSG_ARGUMENTPARSER 1
#include <osg/Export>
#include <osg/ref_ptr>
#include <osg/ApplicationUsage>
#include <map>
#include <string>
#include <ostream>
namespace
osg
{
class
OSG_EXPORT
ArgumentParser
{
public:
class
OSG_EXPORT
Parameter
{
public:
enum
ParameterType
{
BOOL_PARAMETER
,
FLOAT_PARAMETER
,
DOUBLE_PARAMETER
,
INT_PARAMETER
,
UNSIGNED_INT_PARAMETER
,
STRING_PARAMETER
};
union
ValueUnion
{
bool
*
_bool
;
float
*
_float
;
double
*
_double
;
int
*
_int
;
unsigned
int
*
_uint
;
std
::
string
*
_string
;
};
Parameter
(
bool
&
value
)
{
_type
=
BOOL_PARAMETER
;
_value
.
_bool
=
&
value
;
}
Parameter
(
float
&
value
)
{
_type
=
FLOAT_PARAMETER
;
_value
.
_float
=
&
value
;
}
Parameter
(
double
&
value
)
{
_type
=
DOUBLE_PARAMETER
;
_value
.
_double
=
&
value
;
}
Parameter
(
int
&
value
)
{
_type
=
INT_PARAMETER
;
_value
.
_int
=
&
value
;
}
Parameter
(
unsigned
int
&
value
)
{
_type
=
UNSIGNED_INT_PARAMETER
;
_value
.
_uint
=
&
value
;
}
Parameter
(
std
::
string
&
value
)
{
_type
=
STRING_PARAMETER
;
_value
.
_string
=
&
value
;
}
Parameter
(
const
Parameter
&
param
)
{
_type
=
param
.
_type
;
_value
=
param
.
_value
;
}
Parameter
&
operator
=
(
const
Parameter
&
param
)
{
_type
=
param
.
_type
;
_value
=
param
.
_value
;
return
*
this
;
}
bool
valid
(
const
char
*
str
)
const
;
bool
assign
(
const
char
*
str
);
protected:
ParameterType
_type
;
ValueUnion
_value
;
};
/** Return true if the specified string is an option in the form
* -option or --option. */
static
bool
isOption
(
const
char
*
str
);
/** Return true if string is non-NULL and not an option in the form
* -option or --option. */
static
bool
isString
(
const
char
*
str
);
/** Return true if specified parameter is a number. */
static
bool
isNumber
(
const
char
*
str
);
/** Return true if specified parameter is a bool. */
static
bool
isBool
(
const
char
*
str
);
public:
ArgumentParser
(
int
*
argc
,
char
**
argv
);
void
setApplicationUsage
(
ApplicationUsage
*
usage
)
{
_usage
=
usage
;
}
ApplicationUsage
*
getApplicationUsage
()
{
return
_usage
.
get
();
}
const
ApplicationUsage
*
getApplicationUsage
()
const
{
return
_usage
.
get
();
}
/** Return the argument count. */
int
&
argc
()
{
return
*
_argc
;
}
/** Return the argument array. */
char
**
argv
()
{
return
_argv
;
}
/** Return the char* argument at the specified position. */
char
*
operator
[]
(
int
pos
)
{
return
_argv
[
pos
];
}
/** Return the const char* argument at the specified position. */
const
char
*
operator
[]
(
int
pos
)
const
{
return
_argv
[
pos
];
}
/** Return the application name, as specified by argv[0] */
std
::
string
getApplicationName
()
const
;
/** Return the position of an occurrence of a string in the argument list.
* Return -1 if no string is found. */
int
find
(
const
std
::
string
&
str
)
const
;
/** Return true if the specified parameter is an option in the form of
* -option or --option. */
bool
isOption
(
int
pos
)
const
;
/** Return true if the specified parameter is a string not in
* the form of an option. */
bool
isString
(
int
pos
)
const
;
/** Return true if the specified parameter is a number. */
bool
isNumber
(
int
pos
)
const
;
bool
containsOptions
()
const
;
/** Remove one or more arguments from the argv argument list,
* and decrement the argc respectively. */
void
remove
(
int
pos
,
int
num
=
1
);
/** Return true if the specified argument matches the given string. */
bool
match
(
int
pos
,
const
std
::
string
&
str
)
const
;
/** Search for an occurrence of a string in the argument list. If found,
* remove that occurrence and return true. Otherwise, return false. */
bool
read
(
const
std
::
string
&
str
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
,
Parameter
value7
);
bool
read
(
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
,
Parameter
value7
,
Parameter
value8
);
/** If the argument value at the specified position matches the given string,
* and subsequent parameters are also matched, then set the parameter values,
* remove the arguments from the list, and return true. Otherwise, return false. */
bool
read
(
int
pos
,
const
std
::
string
&
str
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
,
Parameter
value7
);
bool
read
(
int
pos
,
const
std
::
string
&
str
,
Parameter
value1
,
Parameter
value2
,
Parameter
value3
,
Parameter
value4
,
Parameter
value5
,
Parameter
value6
,
Parameter
value7
,
Parameter
value8
);
enum
ErrorSeverity
{
BENIGN
=
0
,
CRITICAL
=
1
};
typedef
std
::
map
<
std
::
string
,
ErrorSeverity
>
ErrorMessageMap
;
/** Return the error flag, true if an error has occurred when reading arguments. */
bool
errors
(
ErrorSeverity
severity
=
BENIGN
)
const
;
/** Report an error message by adding to the ErrorMessageMap. */
void
reportError
(
const
std
::
string
&
message
,
ErrorSeverity
severity
=
CRITICAL
);
/** For each remaining option, report it as unrecognized. */
void
reportRemainingOptionsAsUnrecognized
(
ErrorSeverity
severity
=
BENIGN
);
/** Return the error message, if any has occurred. */
ErrorMessageMap
&
getErrorMessageMap
()
{
return
_errorMessageMap
;
}
/** Return the error message, if any has occurred. */
const
ErrorMessageMap
&
getErrorMessageMap
()
const
{
return
_errorMessageMap
;
}
/** Write error messages to the given ostream, if at or above the given severity. */
void
writeErrorMessages
(
std
::
ostream
&
output
,
ErrorSeverity
sevrity
=
BENIGN
);
/** This convenience method handles help requests on the command line.
* Return the type(s) of help requested. The return value of this
* function is suitable for passing into getApplicationUsage()->write().
* If ApplicationUsage::NO_HELP is returned then no help commandline option
* was found on the command line. */
ApplicationUsage
::
Type
readHelpType
();
protected:
int
*
_argc
;
char
**
_argv
;
ErrorMessageMap
_errorMessageMap
;
ref_ptr
<
ApplicationUsage
>
_usage
;
};
}
#endif
lib/mac32-gcc40/include/osg/Array
0 → 100644
View file @
bb4ef9be
This diff is collapsed.
Click to expand it.
lib/mac32-gcc40/include/osg/ArrayDispatchers
0 → 100644
View file @
bb4ef9be
/* -*-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_ArrayDispatchers
#define OSG_ArrayDispatchers 1
#include <osg/ref_ptr>
#include <osg/Array>
#include <osg/Matrixd>
#include <osg/GLBeginEndAdapter>
namespace
osg
{
// forward declare
class
State
;
class
AttributeDispatchMap
;
struct
AttributeDispatch
:
public
osg
::
Referenced
{
virtual
void
assign
(
const
GLvoid
*
,
const
IndexArray
*
)
{}
virtual
void
operator
()
(
unsigned
int
)
{};
};
/** Helper class for managing the dispatch to OpenGL of various attribute arrays such as stored in osg::Geometry.*/
class
OSG_EXPORT
ArrayDispatchers
:
public
osg
::
Referenced
{
public:
ArrayDispatchers
();
~
ArrayDispatchers
();
void
setState
(
osg
::
State
*
state
);
AttributeDispatch
*
vertexDispatcher
(
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
normalDispatcher
(
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
colorDispatcher
(
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
secondaryColorDispatcher
(
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
fogCoordDispatcher
(
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
texCoordDispatcher
(
unsigned
int
unit
,
Array
*
array
,
IndexArray
*
indices
);
AttributeDispatch
*
vertexAttribDispatcher
(
unsigned
int
unit
,
Array
*
array
,
IndexArray
*
indices
);
void
reset
();
void
setUseGLBeginEndAdapter
(
bool
flag
)
{
_useGLBeginEndAdapter
=
flag
;
}
bool
getUseGLBeginEndAdapter
()
const
{
return
_useGLBeginEndAdapter
;
}
void
setUseVertexAttribAlias
(
bool
flag
)
{
_useVertexAttribAlias
=
flag
;
}
bool
getUseVertexAttribAlias
()
const
{
return
_useVertexAttribAlias
;
}
void
activate
(
unsigned
int
binding
,
AttributeDispatch
*
at
)
{
if
(
at
)
_activeDispatchList
[
binding
].
push_back
(
at
);
}
void
activateVertexArray
(
unsigned
int
binding
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
vertexDispatcher
(
array
,
indices
));
}
void
activateColorArray
(
unsigned
int
binding
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
colorDispatcher
(
array
,
indices
));
}
void
activateNormalArray
(
unsigned
int
binding
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
normalDispatcher
(
array
,
indices
));
}
void
activateSecondaryColorArray
(
unsigned
int
binding
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
secondaryColorDispatcher
(
array
,
indices
));
}
void
activateFogCoordArray
(
unsigned
int
binding
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
fogCoordDispatcher
(
array
,
indices
));
}
void
activateTexCoordArray
(
unsigned
int
binding
,
unsigned
int
unit
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
texCoordDispatcher
(
unit
,
array
,
indices
));
}
void
activateVertexAttribArray
(
unsigned
int
binding
,
unsigned
int
unit
,
osg
::
Array
*
array
,
osg
::
IndexArray
*
indices
)
{
if
(
binding
&&
array
)
activate
(
binding
,
vertexAttribDispatcher
(
unit
,
array
,
indices
));
}
void
dispatch
(
unsigned
int
binding
,
unsigned
int
index
)
{
AttributeDispatchList
&
ad
=
_activeDispatchList
[
binding
];
for
(
AttributeDispatchList
::
iterator
itr
=
ad
.
begin
();
itr
!=
ad
.
end
();
++
itr
)
{
(
*
(
*
itr
))(
index
);
}
}
bool
active
(
unsigned
int
binding
)
const
{
return
!
_activeDispatchList
[
binding
].
empty
();
}
void
Begin
(
GLenum
mode
)
{
#ifdef OSG_GL1_AVAILABLE
if
(
_useGLBeginEndAdapter
)
_glBeginEndAdapter
->
Begin
(
mode
);
else
::
glBegin
(
mode
);
#else
_glBeginEndAdapter
->
Begin
(
mode
);
#endif
}
void
End
()
{
#ifdef OSG_GL1_AVAILABLE
if
(
_useGLBeginEndAdapter
)
_glBeginEndAdapter
->
End
();
else
::
glEnd
();
#else
_glBeginEndAdapter
->
End
();
#endif
}
protected:
void
init
();
void
assignTexCoordDispatchers
(
unsigned
int
unit
);
void
assignVertexAttribDispatchers
(
unsigned
int
unit
);
bool
_initialized
;
State
*
_state
;
GLBeginEndAdapter
*
_glBeginEndAdapter
;
AttributeDispatchMap
*
_vertexDispatchers
;
AttributeDispatchMap
*
_normalDispatchers
;
AttributeDispatchMap
*
_colorDispatchers
;
AttributeDispatchMap
*
_secondaryColorDispatchers
;
AttributeDispatchMap
*
_fogCoordDispatchers
;
typedef
std
::
vector
<
AttributeDispatchMap
*>
AttributeDispatchMapList
;
AttributeDispatchMapList
_texCoordDispatchers
;
AttributeDispatchMapList
_vertexAttribDispatchers
;
typedef
std
::
vector
<
AttributeDispatch
*>
AttributeDispatchList
;
typedef
std
::
vector
<
AttributeDispatchList
>
ActiveDispatchList
;
ActiveDispatchList
_activeDispatchList
;
bool
_useVertexAttribAlias
;
bool
_useGLBeginEndAdapter
;
};
}
#endif
lib/mac32-gcc40/include/osg/AudioStream
0 → 100644
View file @
bb4ef9be
/* -*-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_AUDIOSTREAM
#define OSG_AUDIOSTREAM 1
#include <osg/Image>
#include <stdlib.h>
namespace
osg
{
/** Pure virtual AudioSink bass class that is used to connect the audio system with AudioStreams. */
class
OSG_EXPORT
AudioSink
:
public
osg
::
Object
{
public:
AudioSink
();
virtual
const
char
*
libraryName
()
const
{
return
"osg"
;
}
virtual
const
char
*
className
()
const
{
return
"AudioSinkInterface"
;
}
virtual
void
play
()
=
0
;
virtual
void
pause
()
=
0
;
virtual
void
stop
()
=
0
;
virtual
bool
playing
()
const
=
0
;
virtual
double
getDelay
()
const
{
return
_delay
;
}
virtual
void
setDelay
(
const
double
delay
)
{
_delay
=
delay
;
}
virtual
void
setVolume
(
float
)
{}
virtual
float
getVolume
()
const
{
return
0.0
f
;
}
private:
virtual
AudioSink
*
cloneType
()
const
{
return
0
;
}
virtual
AudioSink
*
clone
(
const
osg
::
CopyOp
&
)
const
{
return
0
;
}
double
_delay
;
};
/** Pure virtual AudioStream base class. Subclasses provide mechanism for reading/generating audio data*/
class
OSG_EXPORT
AudioStream
:
public
osg
::
Object
{
public:
AudioStream
();
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
AudioStream
(
const
AudioStream
&
audio
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
);
virtual
bool
isSameKindAs
(
const
Object
*
obj
)
const
{
return
dynamic_cast
<
const
AudioStream
*>
(
obj
)
!=
0
;
}
virtual
const
char
*
libraryName
()
const
{
return
"osg"
;
}
virtual
const
char
*
className
()
const
{
return
"AudioStream"
;
}
virtual
void
setAudioSink
(
osg
::
AudioSink
*
audio_sink
)
=
0
;
virtual
void
consumeAudioBuffer
(
void
*
const
buffer
,
const
size_t
size
)
=
0
;
virtual
int
audioFrequency
()
const
=
0
;
virtual
int
audioNbChannels
()
const
=
0
;
enum
SampleFormat
{
SAMPLE_FORMAT_U8
,
SAMPLE_FORMAT_S16
,
SAMPLE_FORMAT_S24
,
SAMPLE_FORMAT_S32
,
SAMPLE_FORMAT_F32
};
virtual
SampleFormat
audioSampleFormat
()
const
=
0
;
};
}
// namespace
#endif
lib/mac32-gcc40/include/osg/AutoTransform
0 → 100644
View file @
bb4ef9be
/* -*-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_AUTOTRANSFORM
#define OSG_AUTOTRANSFORM 1
#include <osg/Group>
#include <osg/Transform>
#include <osg/Quat>
#include <osg/Viewport>
namespace
osg
{
/** AutoTransform is a derived form of Transform that automatically
* scales or rotates to keep its children aligned with screen coordinates.
*/
class
OSG_EXPORT
AutoTransform
:
public
Transform
{
public
:
AutoTransform
();
AutoTransform
(
const
AutoTransform
&
pat
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
);
virtual
osg
::
Object
*
cloneType
()
const
{
return
new
AutoTransform
();
}
virtual
osg
::
Object
*
clone
(
const
osg
::
CopyOp
&
copyop
)
const
{
return
new
AutoTransform
(
*
this
,
copyop
);
}
virtual
bool
isSameKindAs
(
const
osg
::
Object
*
obj
)
const
{
return
dynamic_cast
<
const
AutoTransform
*>
(
obj
)
!=
NULL
;
}
virtual
const
char
*
className
()
const
{
return
"AutoTransform"
;
}
virtual
const
char
*
libraryName
()
const
{
return
"osg"
;
}
virtual
void
accept
(
NodeVisitor
&
nv
);
virtual
AutoTransform
*
asAutoTransform
()
{
return
this
;
}
virtual
const
AutoTransform
*
asAutoTransform
()
const
{
return
this
;
}
inline
void
setPosition
(
const
Vec3d
&
pos
)
{
_position
=
pos
;
_matrixDirty
=
true
;
dirtyBound
();
}
inline
const
Vec3d
&
getPosition
()
const
{
return
_position
;
}
inline
void
setRotation
(
const
Quat
&
quat
)
{
_rotation
=
quat
;
_matrixDirty
=
true
;
dirtyBound
();
}
inline
const
Quat
&
getRotation
()
const
{
return
_rotation
;
}
inline
void
setScale
(
double
scale
)
{
setScale
(
osg
::
Vec3
(
scale
,
scale
,
scale
));
}
void
setScale
(
const
Vec3d
&
scale
);
inline
const
Vec3d
&
getScale
()
const
{
return
_scale
;
}
void
setMinimumScale
(
double
minimumScale
)
{
_minimumScale
=
minimumScale
;
}
double
getMinimumScale
()
const
{
return
_minimumScale
;
}
void
setMaximumScale
(
double
maximumScale
)
{
_maximumScale
=
maximumScale
;
}
double
getMaximumScale
()
const
{
return
_maximumScale
;
}
inline
void
setPivotPoint
(
const
Vec3d
&
pivot
)
{
_pivotPoint
=
pivot
;
_matrixDirty
=
true
;
dirtyBound
();
}
inline
const
Vec3d
&
getPivotPoint
()
const
{
return
_pivotPoint
;
}
void
setAutoUpdateEyeMovementTolerance
(
float
tolerance
)
{
_autoUpdateEyeMovementTolerance
=
tolerance
;
}
float
getAutoUpdateEyeMovementTolerance
()
const
{
return
_autoUpdateEyeMovementTolerance
;
}
enum
AutoRotateMode
{
NO_ROTATION
,
ROTATE_TO_SCREEN
,
ROTATE_TO_CAMERA
,
ROTATE_TO_AXIS
};
void
setAutoRotateMode
(
AutoRotateMode
mode
);
AutoRotateMode
getAutoRotateMode
()
const
{
return
_autoRotateMode
;
}
/** Set the rotation axis for the AutoTransform's child nodes.
* Only utilized when _autoRotateMode==ROTATE_TO_AXIS. */
void
setAxis
(
const
Vec3
&
axis
);
/** Get the rotation axis. */
inline
const
Vec3
&
getAxis
()
const
{
return
_axis
;
}
/** This normal defines child Nodes' front face direction when unrotated. */
void
setNormal
(
const
Vec3
&
normal
);
/** Get the front face direction normal. */
inline
const
Vec3
&
getNormal
()
const
{
return
_normal
;
}
void
setAutoScaleToScreen
(
bool
autoScaleToScreen
)
{
_autoScaleToScreen
=
autoScaleToScreen
;
_matrixDirty
=
true
;
}
bool
getAutoScaleToScreen
()
const
{
return
_autoScaleToScreen
;
}
void
setAutoScaleTransitionWidthRatio
(
float
ratio
)
{
_autoScaleTransitionWidthRatio
=
ratio
;
}
float
getAutoScaleTransitionWidthRatio
()
const
{
return
_autoScaleTransitionWidthRatio
;
}
virtual
bool
computeLocalToWorldMatrix
(
Matrix
&
matrix
,
NodeVisitor
*
nv
)
const
;
virtual
bool
computeWorldToLocalMatrix
(
Matrix
&
matrix
,
NodeVisitor
*
nv
)
const
;
virtual
BoundingSphere
computeBound
()
const
;
protected
:
virtual
~
AutoTransform
()
{}
Vec3d
_position
;
Vec3d
_pivotPoint
;
double
_autoUpdateEyeMovementTolerance
;
AutoRotateMode
_autoRotateMode
;
bool
_autoScaleToScreen
;
mutable
Quat
_rotation
;
mutable
Vec3d
_scale
;
mutable
bool
_firstTimeToInitEyePoint
;
mutable
osg
::
Vec3
_previousEyePoint
;
mutable
osg
::
Vec3
_previousLocalUp
;
mutable
Viewport
::
value_type
_previousWidth
;
mutable
Viewport
::
value_type
_previousHeight
;
mutable
osg
::
Matrixd
_previousProjection
;
mutable
osg
::
Vec3d
_previousPosition
;
double
_minimumScale
;
double
_maximumScale
;
double
_autoScaleTransitionWidthRatio
;
void
computeMatrix
()
const
;
mutable
bool
_matrixDirty
;
mutable
osg
::
Matrixd
_cachedMatrix
;
enum
AxisAligned
{
AXIAL_ROT_X_AXIS
=
ROTATE_TO_AXIS
+
1
,
AXIAL_ROT_Y_AXIS
,
AXIAL_ROT_Z_AXIS
,
CACHE_DIRTY
};
Vec3
_axis
;
Vec3
_normal
;
// used internally as cache of which what _axis is aligned to help
// decide which method of rotation to use.
int
_cachedMode
;
Vec3
_side
;
void
updateCache
();
};
}
#endif
lib/mac32-gcc40/include/osg/Billboard
0 → 100644
View file @
bb4ef9be
/* -*-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_BILLBOARD
#define OSG_BILLBOARD 1
#include <osg/Matrix>
#include <osg/Geode>
namespace
osg
{
/** Billboard is a derived form of Geode that orients its osg::Drawable
* children to face the eye point. Typical uses include trees and
* particle explosions,
*/
class
OSG_EXPORT
Billboard
:
public
Geode
{
public:
enum
Mode
{
POINT_ROT_EYE
,
POINT_ROT_WORLD
,
AXIAL_ROT
};
Billboard
();
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
Billboard
(
const
Billboard
&
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
);
META_Node
(
osg
,
Billboard
);
/** Set the billboard rotation mode. */
void
setMode
(
Mode
mode
);
/** Get the billboard rotation mode. */
inline
Mode
getMode
()
const
{
return
_mode
;
}
/** Set the rotation axis for the billboard's child Drawables.
* Only utilized when mode==AXIAL_ROT. */
void
setAxis
(
const
Vec3
&
axis
);
/** Get the rotation axis. */
inline
const
Vec3
&
getAxis
()
const
{
return
_axis
;
}
/** This normal defines child Drawables' front face direction when unrotated. */
void
setNormal
(
const
Vec3
&
normal
);
/** Get the front face direction normal. */
inline
const
Vec3
&
getNormal
()
const
{
return
_normal
;
}
/** Set the specified child Drawable's position. */
inline
void
setPosition
(
unsigned
int
i
,
const
Vec3
&
pos
)
{
_positionList
[
i
]
=
pos
;
}
/** Get the specified child Drawable's position. */
inline
const
Vec3
&
getPosition
(
unsigned
int
i
)
const
{
return
_positionList
[
i
];
}
/** Type definition for pivot point position list. */
typedef
std
::
vector
<
Vec3
>
PositionList
;
/** Set the list of pivot point positions. */
inline
void
setPositionList
(
PositionList
&
pl
)
{
_positionList
=
pl
;
}
/** Get the list of pivot point positions. */
inline
PositionList
&
getPositionList
()
{
return
_positionList
;
}
/** Get a const list of pivot point positions. */
inline
const
PositionList
&
getPositionList
()
const
{
return
_positionList
;
}
/** Add a Drawable with a default position of Vec3(0,0,0).
* Call the base-class Geode::addDrawble() to add the given Drawable
* gset as a child. If Geode::addDrawable() returns true, add the
* default position to the pivot point position list and return true.
* Otherwise, return false. */
virtual
bool
addDrawable
(
Drawable
*
gset
);
/** Add a Drawable with a specified position.
* Call the base-class Geode::addDrawble() to add the given Drawable
* gset as a child. If Geode::addDrawable() returns true, add the
* given position pos to the pivot point position list and return true.
* Otherwise, return false. */
virtual
bool
addDrawable
(
Drawable
*
gset
,
const
Vec3
&
pos
);
/** Remove a Drawable and its associated position.
* If gset is a child, remove it, decrement its reference count,
* remove its pivot point position. and return true.
* Otherwise, return false. */
virtual
bool
removeDrawable
(
Drawable
*
gset
);
bool
computeMatrix
(
Matrix
&
modelview
,
const
Vec3
&
eye_local
,
const
Vec3
&
pos_local
)
const
;
virtual
BoundingSphere
computeBound
()
const
;
protected:
virtual
~
Billboard
();
enum
AxisAligned
{
AXIAL_ROT_X_AXIS
=
AXIAL_ROT
+
1
,
AXIAL_ROT_Y_AXIS
,
AXIAL_ROT_Z_AXIS
,
POINT_ROT_WORLD_Z_AXIS
,
CACHE_DIRTY
};
Mode
_mode
;
Vec3
_axis
;
Vec3
_normal
;
Matrix
_rotateNormalToZAxis
;
PositionList
_positionList
;
// used internally as cache of which what _axis is aligned to help
// decide which method of rotation to use.
int
_cachedMode
;
Vec3
_side
;
void
updateCache
();
};
}
#endif
lib/mac32-gcc40/include/osg/BlendColor
0 → 100644
View file @
bb4ef9be
/* -*-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_BLENDCOLOR
#define OSG_BLENDCOLOR 1
#include <osg/GL>
#include <osg/StateAttribute>
#include <osg/ref_ptr>
#include <osg/Vec4>
namespace
osg
{
/** Encapsulates OpenGL blend/transparency state. */
class
OSG_EXPORT
BlendColor
:
public
StateAttribute
{
public
:
BlendColor
();
BlendColor
(
const
osg
::
Vec4
&
constantColor
);
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
BlendColor
(
const
BlendColor
&
trans
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
)
:
StateAttribute
(
trans
,
copyop
),
_constantColor
(
trans
.
_constantColor
)
{}
META_StateAttribute
(
osg
,
BlendColor
,
BLENDCOLOR
);
/** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */
virtual
int
compare
(
const
StateAttribute
&
sa
)
const
{
// Check for equal types, then create the rhs variable
// used by the COMPARE_StateAttribute_Parameter macros below.
COMPARE_StateAttribute_Types
(
BlendColor
,
sa
)
// Compare each parameter in turn against the rhs.
COMPARE_StateAttribute_Parameter
(
_constantColor
)
return
0
;
// Passed all the above comparison macros, so must be equal.
}
virtual
bool
getModeUsage
(
StateAttribute
::
ModeUsage
&
usage
)
const
{
usage
.
usesMode
(
GL_BLEND
);
return
true
;
}
void
setConstantColor
(
const
osg
::
Vec4
&
color
)
{
_constantColor
=
color
;
}
inline
osg
::
Vec4
&
getConstantColor
()
{
return
_constantColor
;
}
inline
const
osg
::
Vec4
&
getConstantColor
()
const
{
return
_constantColor
;
}
virtual
void
apply
(
State
&
state
)
const
;
/** Encapsulates queries of extension availability, obtains extension
* function pointers, and provides convenience wrappers for
* calling extension functions. */
class
OSG_EXPORT
Extensions
:
public
osg
::
Referenced
{
public:
Extensions
(
unsigned
int
contextID
);
Extensions
(
const
Extensions
&
rhs
);
void
lowestCommonDenominator
(
const
Extensions
&
rhs
);
void
setupGLExtensions
(
unsigned
int
contextID
);
void
setBlendColorSupported
(
bool
flag
)
{
_isBlendColorSupported
=
flag
;
}
bool
isBlendColorSupported
()
const
{
return
_isBlendColorSupported
;
}
void
glBlendColor
(
GLclampf
red
,
GLclampf
green
,
GLclampf
blue
,
GLclampf
alpha
)
const
;
protected:
~
Extensions
()
{}
typedef
void
(
GL_APIENTRY
*
GLBlendColorProc
)
(
GLclampf
red
,
GLclampf
green
,
GLclampf
blue
,
GLclampf
alpha
);
bool
_isBlendColorSupported
;
GLBlendColorProc
_glBlendColor
;
};
/** Returns the Extensions object for the given context.
* If createIfNotInitalized is true and the Extensions object doesn't
* exist, getExtensions() creates it on the given context.
* Returns NULL if createIfNotInitalized is false and the Extensions
* object doesn't exist. */
static
Extensions
*
getExtensions
(
unsigned
int
contextID
,
bool
createIfNotInitalized
);
/** setExtensions() allows users to override the extensions across graphics contexts.
* Typically used when you have different extensions supported across graphics pipes,
* but need to ensure that they all use the same low common denominator extensions. */
static
void
setExtensions
(
unsigned
int
contextID
,
Extensions
*
extensions
);
protected
:
virtual
~
BlendColor
();
osg
::
Vec4
_constantColor
;
};
}
#endif
lib/mac32-gcc40/include/osg/BlendEquation
0 → 100644
View file @
bb4ef9be
/* -*-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_BLENDEQUATION
#define OSG_BLENDEQUATION 1
#include <osg/StateAttribute>
#ifndef GL_VERSION_1_2
/* Logic Ops */
#define GL_MIN 0x8007
#define GL_MAX 0x8008
#define GL_FUNC_ADD 0x8006
#define GL_FUNC_SUBTRACT 0x800A
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
#endif
#ifndef GL_LOGIC_OP
#define GL_LOGIC_OP 0x0BF1
#endif
#ifndef GL_ALPHA_MIN_SGIX
#define GL_ALPHA_MIN_SGIX 0x8320
#define GL_ALPHA_MAX_SGIX 0x8321
#endif
namespace
osg
{
/** Encapsulates OpenGL BlendEquation state. */
class
OSG_EXPORT
BlendEquation
:
public
StateAttribute
{
public
:
enum
Equation
{
RGBA_MIN
=
GL_MIN
,
RGBA_MAX
=
GL_MAX
,
ALPHA_MIN
=
GL_ALPHA_MIN_SGIX
,
ALPHA_MAX
=
GL_ALPHA_MAX_SGIX
,
LOGIC_OP
=
GL_LOGIC_OP
,
FUNC_ADD
=
GL_FUNC_ADD
,
FUNC_SUBTRACT
=
GL_FUNC_SUBTRACT
,
FUNC_REVERSE_SUBTRACT
=
GL_FUNC_REVERSE_SUBTRACT
};
BlendEquation
();
BlendEquation
(
Equation
equation
);
BlendEquation
(
Equation
equationRGB
,
Equation
equationAlpha
);
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
BlendEquation
(
const
BlendEquation
&
trans
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
)
:
StateAttribute
(
trans
,
copyop
),
_equationRGB
(
trans
.
_equationRGB
),
_equationAlpha
(
trans
.
_equationAlpha
){}
META_StateAttribute
(
osg
,
BlendEquation
,
BLENDEQUATION
);
/** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */
virtual
int
compare
(
const
StateAttribute
&
sa
)
const
{
// Check for equal types, then create the rhs variable
// used by the COMPARE_StateAttribute_Parameter macros below.
COMPARE_StateAttribute_Types
(
BlendEquation
,
sa
)
// Compare each parameter in turn against the rhs.
COMPARE_StateAttribute_Parameter
(
_equationRGB
)
COMPARE_StateAttribute_Parameter
(
_equationAlpha
)
return
0
;
// Passed all the above comparison macros, so must be equal.
}
virtual
bool
getModeUsage
(
StateAttribute
::
ModeUsage
&
usage
)
const
{
usage
.
usesMode
(
GL_BLEND
);
return
true
;
}
inline
void
setEquation
(
Equation
equation
)
{
_equationRGB
=
_equationAlpha
=
equation
;
}
inline
Equation
getEquation
()
const
{
return
_equationRGB
;
}
inline
void
setEquationRGB
(
Equation
equation
)
{
_equationRGB
=
equation
;
}
inline
Equation
getEquationRGB
()
const
{
return
_equationRGB
;
}
inline
void
setEquationAlpha
(
Equation
equation
)
{
_equationAlpha
=
equation
;
}
inline
Equation
getEquationAlpha
()
const
{
return
_equationAlpha
;
}
virtual
void
apply
(
State
&
state
)
const
;
/** Encapsulates queries of extension availability, obtains extension
* function pointers, and provides convenience wrappers for
* calling extension functions. */
class
OSG_EXPORT
Extensions
:
public
osg
::
Referenced
{
public:
Extensions
(
unsigned
int
contextID
);
Extensions
(
const
Extensions
&
rhs
);
void
lowestCommonDenominator
(
const
Extensions
&
rhs
);
void
setupGLExtensions
(
unsigned
int
contextID
);
bool
isBlendEquationSupported
()
const
{
return
_isBlendEquationSupported
;
}
bool
isBlendEquationSeparateSupported
()
const
{
return
_isBlendEquationSeparateSupported
;
}
bool
isSGIXMinMaxSupported
()
const
{
return
_isSGIXMinMaxSupported
;
}
bool
isLogicOpSupported
()
const
{
return
_isLogicOpSupported
;
}
void
glBlendEquation
(
GLenum
mode
)
const
;
void
glBlendEquationSeparate
(
GLenum
modeRGB
,
GLenum
modeAlpha
)
const
;
protected:
~
Extensions
()
{}
typedef
void
(
GL_APIENTRY
*
GLBlendEquationProc
)(
GLenum
mode
);
typedef
void
(
GL_APIENTRY
*
GLBlendEquationSeparateProc
)(
GLenum
modeRGB
,
GLenum
modeAlpha
);
bool
_isBlendEquationSupported
;
bool
_isBlendEquationSeparateSupported
;
bool
_isSGIXMinMaxSupported
;
bool
_isLogicOpSupported
;
GLBlendEquationProc
_glBlendEquation
;
GLBlendEquationSeparateProc
_glBlendEquationSeparate
;
};
/** Returns the Extensions object for the given context.
* If createIfNotInitalized is true and the Extensions object doesn't
* exist, getExtensions() creates it on the given context.
* Returns NULL if createIfNotInitalized is false and the Extensions
* object doesn't exist. */
static
Extensions
*
getExtensions
(
unsigned
int
contextID
,
bool
createIfNotInitalized
);
/** setExtensions() allows users to override the extensions across graphics contexts.
* Typically used when you have different extensions supported across graphics pipes,
* but need to ensure that they all use the same low common denominator extensions. */
static
void
setExtensions
(
unsigned
int
contextID
,
Extensions
*
extensions
);
protected
:
virtual
~
BlendEquation
();
Equation
_equationRGB
,
_equationAlpha
;
};
}
#endif
lib/mac32-gcc40/include/osg/BlendFunc
0 → 100644
View file @
bb4ef9be
/* -*-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_BLENDFUNC
#define OSG_BLENDFUNC 1
#include <osg/StateAttribute>
#ifndef GL_VERSION_1_2
#define GL_CONSTANT_COLOR 0x8001
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
#define GL_CONSTANT_ALPHA 0x8003
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
#define GL_BLEND_COLOR 0x8005
#endif
#ifndef GL_VERSION_1_4
#define GL_BLEND_DST_RGB 0x80C8
#define GL_BLEND_SRC_RGB 0x80C9
#define GL_BLEND_DST_ALPHA 0x80CA
#define GL_BLEND_SRC_ALPHA 0x80CB
#endif
namespace
osg
{
/** Encapsulates OpenGL blend/transparency state.
*
* Blending combines incoming fragment with a fragment
* already present in the target buffer.
*
* OpenGL 1.1 supports following source and destination blending factors:
* GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
* GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA,
* GL_ZERO, GL_ONE.
*
* Moreover, there are three source-only blending factors:
* GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA_SATURATE
* and two destination-only blending factors:
* GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR.
* OpenGL 1.4 allowed to use these five blending factors
* as both - source and destination blending factors.
*
* Following four source and destination blending factors
* were added by Imaging subset of OpenGL 1.2
* and made mandatory by OpenGL 1.4:
* GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
* GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA
*
* OpenGL 1.4 further provides glBlendFuncSeparate
* (promoted from GL_EXT_blend_func_separate).
* It makes possible to set blending functions for RGB and Alpha separately.
* Before, it was possible to set just one blending function for RGBA.
*/
class
OSG_EXPORT
BlendFunc
:
public
StateAttribute
{
public
:
BlendFunc
();
BlendFunc
(
GLenum
source
,
GLenum
destination
);
BlendFunc
(
GLenum
source
,
GLenum
destination
,
GLenum
source_alpha
,
GLenum
destination_alpha
);
/** Copy constructor using CopyOp to manage deep vs shallow copy. */
BlendFunc
(
const
BlendFunc
&
trans
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
)
:
StateAttribute
(
trans
,
copyop
),
_source_factor
(
trans
.
_source_factor
),
_destination_factor
(
trans
.
_destination_factor
),
_source_factor_alpha
(
trans
.
_source_factor_alpha
),
_destination_factor_alpha
(
trans
.
_destination_factor_alpha
)
{}
META_StateAttribute
(
osg
,
BlendFunc
,
BLENDFUNC
);
/** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */
virtual
int
compare
(
const
StateAttribute
&
sa
)
const
{
// Check for equal types, then create the rhs variable
// used by the COMPARE_StateAttribute_Parameter macros below.
COMPARE_StateAttribute_Types
(
BlendFunc
,
sa
)
// Compare each parameter in turn against the rhs.
COMPARE_StateAttribute_Parameter
(
_source_factor
)
COMPARE_StateAttribute_Parameter
(
_destination_factor
)
COMPARE_StateAttribute_Parameter
(
_source_factor_alpha
)
COMPARE_StateAttribute_Parameter
(
_destination_factor_alpha
)
return
0
;
// Passed all the above comparison macros, so must be equal.
}
virtual
bool
getModeUsage
(
StateAttribute
::
ModeUsage
&
usage
)
const
{
usage
.
usesMode
(
GL_BLEND
);
return
true
;
}
enum
BlendFuncMode
{
DST_ALPHA
=
GL_DST_ALPHA
,
DST_COLOR
=
GL_DST_COLOR
,
ONE
=
GL_ONE
,
ONE_MINUS_DST_ALPHA
=
GL_ONE_MINUS_DST_ALPHA
,
ONE_MINUS_DST_COLOR
=
GL_ONE_MINUS_DST_COLOR
,
ONE_MINUS_SRC_ALPHA
=
GL_ONE_MINUS_SRC_ALPHA
,
ONE_MINUS_SRC_COLOR
=
GL_ONE_MINUS_SRC_COLOR
,
SRC_ALPHA
=
GL_SRC_ALPHA
,
SRC_ALPHA_SATURATE
=
GL_SRC_ALPHA_SATURATE
,
SRC_COLOR
=
GL_SRC_COLOR
,
CONSTANT_COLOR
=
GL_CONSTANT_COLOR
,
ONE_MINUS_CONSTANT_COLOR
=
GL_ONE_MINUS_CONSTANT_COLOR
,
CONSTANT_ALPHA
=
GL_CONSTANT_ALPHA
,
ONE_MINUS_CONSTANT_ALPHA
=
GL_ONE_MINUS_CONSTANT_ALPHA
,
ZERO
=
GL_ZERO
};
inline
void
setFunction
(
GLenum
source
,
GLenum
destination
)
{
_source_factor
=
source
;
_destination_factor
=
destination
;
_source_factor_alpha
=
source
;
_destination_factor_alpha
=
destination
;
}
inline
void
setFunction
(
GLenum
source_rgb
,
GLenum
destination_rgb
,
GLenum
source_alpha
,
GLenum
destination_alpha
)
{
_source_factor
=
source_rgb
;
_destination_factor
=
destination_rgb
;
_source_factor_alpha
=
source_alpha
;
_destination_factor_alpha
=
destination_alpha
;
}
void
setSource
(
GLenum
source
)
{
_source_factor
=
_source_factor_alpha
=
source
;
}
inline
GLenum
getSource
()
const
{
return
_source_factor
;
}
void
setSourceRGB
(
GLenum
source
)
{
_source_factor
=
source
;
}
inline
GLenum
getSourceRGB
()
const
{
return
_source_factor
;
}
void
setSourceAlpha
(
GLenum
source
)
{
_source_factor_alpha
=
source
;
}
inline
GLenum
getSourceAlpha
()
const
{
return
_source_factor_alpha
;
}
void
setDestination
(
GLenum
destination
)
{
_destination_factor
=
_destination_factor_alpha
=
destination
;
}
inline
GLenum
getDestination
()
const
{
return
_destination_factor
;
}
void
setDestinationRGB
(
GLenum
destination
)
{
_destination_factor
=
destination
;
}
inline
GLenum
getDestinationRGB
()
const
{
return
_destination_factor
;
}
void
setDestinationAlpha
(
GLenum
destination
)
{
_destination_factor_alpha
=
destination
;
}
inline
GLenum
getDestinationAlpha
()
const
{
return
_destination_factor_alpha
;
}
virtual
void
apply
(
State
&
state
)
const
;
/** Encapsulates queries of extension availability, obtains extension
* function pointers, and provides convenience wrappers for
* calling extension functions. */
class
OSG_EXPORT
Extensions
:
public
osg
::
Referenced
{
public:
Extensions
(
unsigned
int
contextID
);
Extensions
(
const
Extensions
&
rhs
);
void
lowestCommonDenominator
(
const
Extensions
&
rhs
);
void
setupGLExtensions
(
unsigned
int
contextID
);
void
setBlendFuncSeparateSupported
(
bool
flag
)
{
_isBlendFuncSeparateSupported
=
flag
;
}
bool
isBlendFuncSeparateSupported
()
const
{
return
_isBlendFuncSeparateSupported
;
}
void
glBlendFuncSeparate
(
GLenum
sfactorRGB
,
GLenum
dfactorRGB
,
GLenum
sfactorAlpha
,
GLenum
dfactorAlpha
)
const
;
protected:
~
Extensions
()
{}
typedef
void
(
GL_APIENTRY
*
GLBlendFuncSeparateProc
)
(
GLenum
sfactorRGB
,
GLenum
dfactorRGB
,
GLenum
sfactorAlpha
,
GLenum
dfactorAlpha
);
bool
_isBlendFuncSeparateSupported
;
GLBlendFuncSeparateProc
_glBlendFuncSeparate
;
};
/** Returns the Extensions object for the given context.
* If createIfNotInitalized is true and the Extensions object doesn't
* exist, getExtensions() creates it on the given context.
* Returns NULL if createIfNotInitalized is false and the Extensions
* object doesn't exist. */
static
Extensions
*
getExtensions
(
unsigned
int
contextID
,
bool
createIfNotInitalized
);
/** setExtensions() allows users to override the extensions across graphics contexts.
* Typically used when you have different extensions supported across graphics pipes,
* but need to ensure that they all use the same low common denominator extensions. */
static
void
setExtensions
(
unsigned
int
contextID
,
Extensions
*
extensions
);
protected
:
virtual
~
BlendFunc
();
GLenum
_source_factor
;
GLenum
_destination_factor
;
GLenum
_source_factor_alpha
;
GLenum
_destination_factor_alpha
;
};
}
#endif
lib/mac32-gcc40/include/osg/BoundingBox
0 → 100644
View file @
bb4ef9be
/* -*-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_BOUNDINGBOX
#define OSG_BOUNDINGBOX 1
#include <osg/Config>
#include <osg/Export>
#include <osg/Vec3>
#include <osg/Vec3d>
#include <float.h>
namespace
osg
{
template
<
typename
VT
>
class
BoundingSphereImpl
;
/** General purpose axis-aligned bounding box class for enclosing objects/vertices.
* Bounds leaf objects in a scene such as osg::Drawable objects. Used for frustum
* culling etc.
*/
template
<
typename
VT
>
class
BoundingBoxImpl
{
public:
typedef
VT
vec_type
;
typedef
typename
VT
::
value_type
value_type
;
/** Minimum extent. (Smallest X, Y, and Z values of all coordinates.) */
vec_type
_min
;
/** Maximum extent. (Greatest X, Y, and Z values of all coordinates.) */
vec_type
_max
;
/** Creates an uninitialized bounding box. */
inline
BoundingBoxImpl
()
:
_min
(
FLT_MAX
,
FLT_MAX
,
FLT_MAX
),
_max
(
-
FLT_MAX
,
-
FLT_MAX
,
-
FLT_MAX
)
{}
/** Creates a bounding box initialized to the given extents. */
inline
BoundingBoxImpl
(
value_type
xmin
,
value_type
ymin
,
value_type
zmin
,
value_type
xmax
,
value_type
ymax
,
value_type
zmax
)
:
_min
(
xmin
,
ymin
,
zmin
),
_max
(
xmax
,
ymax
,
zmax
)
{}
/** Creates a bounding box initialized to the given extents. */
inline
BoundingBoxImpl
(
const
vec_type
&
min
,
const
vec_type
&
max
)
:
_min
(
min
),
_max
(
max
)
{}
/** Clear the bounding box. Erases existing minimum and maximum extents. */
inline
void
init
()
{
_min
.
set
(
FLT_MAX
,
FLT_MAX
,
FLT_MAX
);
_max
.
set
(
-
FLT_MAX
,
-
FLT_MAX
,
-
FLT_MAX
);
}
/** Returns true if the bounding box extents are valid, false otherwise. */
inline
bool
valid
()
const
{
return
_max
.
x
()
>=
_min
.
x
()
&&
_max
.
y
()
>=
_min
.
y
()
&&
_max
.
z
()
>=
_min
.
z
();
}
/** Sets the bounding box extents. */
inline
void
set
(
value_type
xmin
,
value_type
ymin
,
value_type
zmin
,
value_type
xmax
,
value_type
ymax
,
value_type
zmax
)
{
_min
.
set
(
xmin
,
ymin
,
zmin
);
_max
.
set
(
xmax
,
ymax
,
zmax
);
}
/** Sets the bounding box extents. */
inline
void
set
(
const
vec_type
&
min
,
const
vec_type
&
max
)
{
_min
=
min
;
_max
=
max
;
}
inline
value_type
&
xMin
()
{
return
_min
.
x
();
}
inline
value_type
xMin
()
const
{
return
_min
.
x
();
}
inline
value_type
&
yMin
()
{
return
_min
.
y
();
}
inline
value_type
yMin
()
const
{
return
_min
.
y
();
}
inline
value_type
&
zMin
()
{
return
_min
.
z
();
}
inline
value_type
zMin
()
const
{
return
_min
.
z
();
}
inline
value_type
&
xMax
()
{
return
_max
.
x
();
}
inline
value_type
xMax
()
const
{
return
_max
.
x
();
}
inline
value_type
&
yMax
()
{
return
_max
.
y
();
}
inline
value_type
yMax
()
const
{
return
_max
.
y
();
}
inline
value_type
&
zMax
()
{
return
_max
.
z
();
}
inline
value_type
zMax
()
const
{
return
_max
.
z
();
}
/** Calculates and returns the bounding box center. */
inline
const
vec_type
center
()
const
{
return
(
_min
+
_max
)
*
0.5
;
}
/** Calculates and returns the bounding box radius. */
inline
value_type
radius
()
const
{
return
sqrt
(
radius2
());
}
/** Calculates and returns the squared length of the bounding box radius.
* Note, radius2() is faster to calculate than radius(). */
inline
value_type
radius2
()
const
{
return
0.25
*
((
_max
-
_min
).
length2
());
}
/** Returns a specific corner of the bounding box.
* pos specifies the corner as a number between 0 and 7.
* Each bit selects an axis, X, Y, or Z from least- to
* most-significant. Unset bits select the minimum value
* for that axis, and set bits select the maximum. */
inline
const
vec_type
corner
(
unsigned
int
pos
)
const
{
return
vec_type
(
pos
&
1
?
_max
.
x
()
:
_min
.
x
(),
pos
&
2
?
_max
.
y
()
:
_min
.
y
(),
pos
&
4
?
_max
.
z
()
:
_min
.
z
());
}
/** Expands the bounding box to include the given coordinate.
* If the box is uninitialized, set its min and max extents to v. */
inline
void
expandBy
(
const
vec_type
&
v
)
{
if
(
v
.
x
()
<
_min
.
x
())
_min
.
x
()
=
v
.
x
();
if
(
v
.
x
()
>
_max
.
x
())
_max
.
x
()
=
v
.
x
();
if
(
v
.
y
()
<
_min
.
y
())
_min
.
y
()
=
v
.
y
();
if
(
v
.
y
()
>
_max
.
y
())
_max
.
y
()
=
v
.
y
();
if
(
v
.
z
()
<
_min
.
z
())
_min
.
z
()
=
v
.
z
();
if
(
v
.
z
()
>
_max
.
z
())
_max
.
z
()
=
v
.
z
();
}
/** Expands the bounding box to include the given coordinate.
* If the box is uninitialized, set its min and max extents to
* Vec3(x,y,z). */
inline
void
expandBy
(
value_type
x
,
value_type
y
,
value_type
z
)
{
if
(
x
<
_min
.
x
())
_min
.
x
()
=
x
;
if
(
x
>
_max
.
x
())
_max
.
x
()
=
x
;
if
(
y
<
_min
.
y
())
_min
.
y
()
=
y
;
if
(
y
>
_max
.
y
())
_max
.
y
()
=
y
;
if
(
z
<
_min
.
z
())
_min
.
z
()
=
z
;
if
(
z
>
_max
.
z
())
_max
.
z
()
=
z
;
}
/** Expands this bounding box to include the given bounding box.
* If this box is uninitialized, set it equal to bb. */
void
expandBy
(
const
BoundingBoxImpl
&
bb
)
{
if
(
!
bb
.
valid
())
return
;
if
(
bb
.
_min
.
x
()
<
_min
.
x
())
_min
.
x
()
=
bb
.
_min
.
x
();
if
(
bb
.
_max
.
x
()
>
_max
.
x
())
_max
.
x
()
=
bb
.
_max
.
x
();
if
(
bb
.
_min
.
y
()
<
_min
.
y
())
_min
.
y
()
=
bb
.
_min
.
y
();
if
(
bb
.
_max
.
y
()
>
_max
.
y
())
_max
.
y
()
=
bb
.
_max
.
y
();
if
(
bb
.
_min
.
z
()
<
_min
.
z
())
_min
.
z
()
=
bb
.
_min
.
z
();
if
(
bb
.
_max
.
z
()
>
_max
.
z
())
_max
.
z
()
=
bb
.
_max
.
z
();
}
/** Expands this bounding box to include the given sphere.
* If this box is uninitialized, set it to include sh. */
void
expandBy
(
const
BoundingSphereImpl
<
VT
>&
sh
)
{
if
(
!
sh
.
valid
())
return
;
if
(
sh
.
_center
.
x
()
-
sh
.
_radius
<
_min
.
x
())
_min
.
x
()
=
sh
.
_center
.
x
()
-
sh
.
_radius
;
if
(
sh
.
_center
.
x
()
+
sh
.
_radius
>
_max
.
x
())
_max
.
x
()
=
sh
.
_center
.
x
()
+
sh
.
_radius
;
if
(
sh
.
_center
.
y
()
-
sh
.
_radius
<
_min
.
y
())
_min
.
y
()
=
sh
.
_center
.
y
()
-
sh
.
_radius
;
if
(
sh
.
_center
.
y
()
+
sh
.
_radius
>
_max
.
y
())
_max
.
y
()
=
sh
.
_center
.
y
()
+
sh
.
_radius
;
if
(
sh
.
_center
.
z
()
-
sh
.
_radius
<
_min
.
z
())
_min
.
z
()
=
sh
.
_center
.
z
()
-
sh
.
_radius
;
if
(
sh
.
_center
.
z
()
+
sh
.
_radius
>
_max
.
z
())
_max
.
z
()
=
sh
.
_center
.
z
()
+
sh
.
_radius
;
}
/** Returns the intersection of this bounding box and the specified bounding box. */
BoundingBoxImpl
intersect
(
const
BoundingBoxImpl
&
bb
)
const
{
return
BoundingBoxImpl
(
osg
::
maximum
(
xMin
(),
bb
.
xMin
()),
osg
::
maximum
(
yMin
(),
bb
.
yMin
()),
osg
::
maximum
(
zMin
(),
bb
.
zMin
()),
osg
::
minimum
(
xMax
(),
bb
.
xMax
()),
osg
::
minimum
(
yMax
(),
bb
.
yMax
()),
osg
::
minimum
(
zMax
(),
bb
.
zMax
()));
}
/** Return true if this bounding box intersects the specified bounding box. */
bool
intersects
(
const
BoundingBoxImpl
&
bb
)
const
{
return
osg
::
maximum
(
xMin
(),
bb
.
xMin
())
<=
osg
::
minimum
(
xMax
(),
bb
.
xMax
())
&&
osg
::
maximum
(
yMin
(),
bb
.
yMin
())
<=
osg
::
minimum
(
yMax
(),
bb
.
yMax
())
&&
osg
::
maximum
(
zMin
(),
bb
.
zMin
())
<=
osg
::
minimum
(
zMax
(),
bb
.
zMax
());
}
/** Returns true if this bounding box contains the specified coordinate. */
inline
bool
contains
(
const
vec_type
&
v
)
const
{
return
valid
()
&&
(
v
.
x
()
>=
_min
.
x
()
&&
v
.
x
()
<=
_max
.
x
())
&&
(
v
.
y
()
>=
_min
.
y
()
&&
v
.
y
()
<=
_max
.
y
())
&&
(
v
.
z
()
>=
_min
.
z
()
&&
v
.
z
()
<=
_max
.
z
());
}
};
typedef
BoundingBoxImpl
<
Vec3f
>
BoundingBoxf
;
typedef
BoundingBoxImpl
<
Vec3d
>
BoundingBoxd
;
#ifdef OSG_USE_FLOAT_BOUNDINGBOX
typedef
BoundingBoxf
BoundingBox
;
#else
typedef
BoundingBoxd
BoundingBox
;
#endif
}
#endif
lib/mac32-gcc40/include/osg/BoundingSphere
0 → 100644
View file @
bb4ef9be
/* -*-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_BOUNDINGSPHERE
#define OSG_BOUNDINGSPHERE 1
#include <osg/Config>
#include <osg/Export>
#include <osg/Vec3f>
#include <osg/Vec3d>
namespace
osg
{
template
<
typename
VT
>
class
BoundingBoxImpl
;
/** General purpose bounding sphere class for enclosing nodes/objects/vertices.
* Bounds internal osg::Nodes in the scene, assists in view frustum culling,
* etc. Similar in function to BoundingBox, it's quicker for evaluating
* culling but generally will not cull as aggressively because it encloses a
* greater volume.
*/
template
<
typename
VT
>
class
BoundingSphereImpl
{
public:
typedef
VT
vec_type
;
typedef
typename
VT
::
value_type
value_type
;
vec_type
_center
;
value_type
_radius
;
/** Construct a default bounding sphere with radius to -1.0f, representing an invalid/unset bounding sphere.*/
BoundingSphereImpl
()
:
_center
(
0.0
,
0.0
,
0.0
),
_radius
(
-
1.0
)
{}
/** Creates a bounding sphere initialized to the given extents. */
BoundingSphereImpl
(
const
vec_type
&
center
,
value_type
radius
)
:
_center
(
center
),
_radius
(
radius
)
{}
/** Creates a bounding sphere initialized to the given extents. */
BoundingSphereImpl
(
const
BoundingSphereImpl
&
bs
)
:
_center
(
bs
.
_center
),
_radius
(
bs
.
_radius
)
{}
/** Creates a bounding sphere initialized to the given extents. */
BoundingSphereImpl
(
const
BoundingBoxImpl
<
VT
>&
bb
)
:
_center
(
0.0
,
0.0
,
0.0
),
_radius
(
-
1.0
)
{
expandBy
(
bb
);
}
/** Clear the bounding sphere. Reset to default values. */
inline
void
init
()
{
_center
.
set
(
0.0
,
0.0
,
0.0
);
_radius
=
-
1.0
;
}
/** Returns true of the bounding sphere extents are valid, false
* otherwise. */
inline
bool
valid
()
const
{
return
_radius
>=
0.0
;
}
/** Set the bounding sphere to the given center/radius using floats. */
inline
void
set
(
const
vec_type
&
center
,
value_type
radius
)
{
_center
=
center
;
_radius
=
radius
;
}
/** Returns the center of the bounding sphere. */
inline
vec_type
&
center
()
{
return
_center
;
}
/** Returns the const center of the bounding sphere. */
inline
const
vec_type
&
center
()
const
{
return
_center
;
}
/** Returns the radius of the bounding sphere. */
inline
value_type
&
radius
()
{
return
_radius
;
}
/** Returns the const radius of the bounding sphere. */
inline
value_type
radius
()
const
{
return
_radius
;
}
/** Returns the squared length of the radius. Note, For performance
* reasons, the calling method is responsible for checking to make
* sure the sphere is valid. */
inline
value_type
radius2
()
const
{
return
_radius
*
_radius
;
}
/** Expands the sphere to encompass the given point. Repositions the
* sphere center to minimize the radius increase. If the sphere is
* uninitialized, set its center to v and radius to zero. */
template
<
typename
vector_type
>
void
expandBy
(
const
vector_type
&
v
);
/** Expands the sphere to encompass the given point. Does not
* reposition the sphere center. If the sphere is
* uninitialized, set its center to v and radius to zero. */
template
<
typename
vector_type
>
void
expandRadiusBy
(
const
vector_type
&
v
);
/** Expands the sphere to encompass the given sphere. Repositions the
* sphere center to minimize the radius increase. If the sphere is
* uninitialized, set its center and radius to match sh. */
void
expandBy
(
const
BoundingSphereImpl
&
sh
);
/** Expands the sphere to encompass the given sphere. Does not
* repositions the sphere center. If the sphere is
* uninitialized, set its center and radius to match sh. */
void
expandRadiusBy
(
const
BoundingSphereImpl
&
sh
);
/** Expands the sphere to encompass the given box. Repositions the
* sphere center to minimize the radius increase. */
void
expandBy
(
const
BoundingBoxImpl
<
VT
>&
bb
);
/** Expands the sphere to encompass the given box. Does not
* repositions the sphere center. */
void
expandRadiusBy
(
const
BoundingBoxImpl
<
VT
>&
bb
);
/** Returns true if v is within the sphere. */
inline
bool
contains
(
const
vec_type
&
v
)
const
{
return
valid
()
&&
((
v
-
_center
).
length2
()
<=
radius2
());
}
/** Returns true if there is a non-empty intersection with the given
* bounding sphere. */
inline
bool
intersects
(
const
BoundingSphereImpl
&
bs
)
const
{
return
valid
()
&&
bs
.
valid
()
&&
((
_center
-
bs
.
_center
).
length2
()
<=
(
_radius
+
bs
.
_radius
)
*
(
_radius
+
bs
.
_radius
));
}
};
template
<
typename
VT
>
template
<
typename
vector_type
>
void
BoundingSphereImpl
<
VT
>::
expandBy
(
const
vector_type
&
v
)
{
if
(
valid
())
{
vec_type
dv
=
v
-
_center
;
value_type
r
=
dv
.
length
();
if
(
r
>
_radius
)
{
value_type
dr
=
(
r
-
_radius
)
*
0.5
;
_center
+=
dv
*
(
dr
/
r
);
_radius
+=
dr
;
}
// else do nothing as vertex is within sphere.
}
else
{
_center
=
v
;
_radius
=
0.0
;
}
}
template
<
typename
VT
>
template
<
typename
vector_type
>
void
BoundingSphereImpl
<
VT
>::
expandRadiusBy
(
const
vector_type
&
v
)
{
if
(
valid
())
{
value_type
r
=
(
v
-
_center
).
length
();
if
(
r
>
_radius
)
_radius
=
r
;
// else do nothing as vertex is within sphere.
}
else
{
_center
=
v
;
_radius
=
0.0
;
}
}
template
<
typename
VT
>
void
BoundingSphereImpl
<
VT
>::
expandBy
(
const
BoundingSphereImpl
&
sh
)
{
// ignore operation if incomming BoundingSphere is invalid.
if
(
!
sh
.
valid
())
return
;
// This sphere is not set so use the inbound sphere
if
(
!
valid
())
{
_center
=
sh
.
_center
;
_radius
=
sh
.
_radius
;
return
;
}
// Calculate d == The distance between the sphere centers
double
d
=
(
_center
-
sh
.
center
()
).
length
();
// New sphere is already inside this one
if
(
d
+
sh
.
radius
()
<=
_radius
)
{
return
;
}
// New sphere completely contains this one
if
(
d
+
_radius
<=
sh
.
radius
()
)
{
_center
=
sh
.
_center
;
_radius
=
sh
.
_radius
;
return
;
}
// Build a new sphere that completely contains the other two:
//
// The center point lies halfway along the line between the furthest
// points on the edges of the two spheres.
//
// Computing those two points is ugly - so we'll use similar triangles
double
new_radius
=
(
_radius
+
d
+
sh
.
radius
()
)
*
0.5
;
double
ratio
=
(
new_radius
-
_radius
)
/
d
;
_center
[
0
]
+=
(
sh
.
center
()[
0
]
-
_center
[
0
]
)
*
ratio
;
_center
[
1
]
+=
(
sh
.
center
()[
1
]
-
_center
[
1
]
)
*
ratio
;
_center
[
2
]
+=
(
sh
.
center
()[
2
]
-
_center
[
2
]
)
*
ratio
;
_radius
=
new_radius
;
}
template
<
typename
VT
>
void
BoundingSphereImpl
<
VT
>::
expandRadiusBy
(
const
BoundingSphereImpl
&
sh
)
{
if
(
sh
.
valid
())
{
if
(
valid
())
{
value_type
r
=
(
sh
.
_center
-
_center
).
length
()
+
sh
.
_radius
;
if
(
r
>
_radius
)
_radius
=
r
;
// else do nothing as vertex is within sphere.
}
else
{
_center
=
sh
.
_center
;
_radius
=
sh
.
_radius
;
}
}
}
template
<
typename
VT
>
void
BoundingSphereImpl
<
VT
>::
expandBy
(
const
BoundingBoxImpl
<
VT
>&
bb
)
{
if
(
bb
.
valid
())
{
if
(
valid
())
{
BoundingBoxImpl
<
vec_type
>
newbb
(
bb
);
for
(
unsigned
int
c
=
0
;
c
<
8
;
++
c
)
{
vec_type
v
=
bb
.
corner
(
c
)
-
_center
;
// get the direction vector from corner
v
.
normalize
();
// normalise it.
v
*=
-
_radius
;
// move the vector in the opposite direction distance radius.
v
+=
_center
;
// move to absolute position.
newbb
.
expandBy
(
v
);
// add it into the new bounding box.
}
_center
=
newbb
.
center
();
_radius
=
newbb
.
radius
();
}
else
{
_center
=
bb
.
center
();
_radius
=
bb
.
radius
();
}
}
}
template
<
typename
VT
>
void
BoundingSphereImpl
<
VT
>::
expandRadiusBy
(
const
BoundingBoxImpl
<
VT
>&
bb
)
{
if
(
bb
.
valid
())
{
if
(
valid
())
{
for
(
unsigned
int
c
=
0
;
c
<
8
;
++
c
)
{
expandRadiusBy
(
bb
.
corner
(
c
));
}
}
else
{
_center
=
bb
.
center
();
_radius
=
bb
.
radius
();
}
}
}
typedef
BoundingSphereImpl
<
Vec3f
>
BoundingSpheref
;
typedef
BoundingSphereImpl
<
Vec3d
>
BoundingSphered
;
#ifdef OSG_USE_FLOAT_BOUNDINGSPHERE
typedef
BoundingSpheref
BoundingSphere
;
#else
typedef
BoundingSphered
BoundingSphere
;
#endif
}
#endif
lib/mac32-gcc40/include/osg/BoundsChecking
0 → 100644
View file @
bb4ef9be
/* -*-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_BOUNDSCHECKING
#define OSG_BOUNDSCHECKING 1
#include <osg/Notify>
namespace
osg
{
/** If value is greater than or equal to minValue do nothing - legal value,
* Otherwise set value to minValue, and warn that valueName was clamped.
* Note this is effectively A=max(A,B). */
template
<
typename
T
>
inline
void
clampGEQUAL
(
T
&
value
,
const
T
minValue
,
const
char
*
valueName
)
{
if
(
value
<
minValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
" of "
<<
value
<<
" is below permitted minimum, clampping to "
<<
minValue
<<
"."
<<
std
::
endl
;
value
=
minValue
;
}
}
/** If value is less than or equal to maxValue do nothing - legal value,
* Otherwise set value to maxValue, and warn that valueName was clamped.
* Note this is effectively A=min(A,B). */
template
<
typename
T
>
inline
void
clampLEQUAL
(
T
&
value
,
const
T
maxValue
,
const
char
*
valueName
)
{
if
(
value
>
maxValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
" of "
<<
value
<<
" is above permitted maximum, clampping to "
<<
maxValue
<<
"."
<<
std
::
endl
;
value
=
maxValue
;
}
}
/** If value is between or equal to minValue and maxValue do nothing - legal
* value, Otherwise clamp value to specified range and warn that valueName
* was clamped. Equivilant to calling
* clampGEQUAL( value, minValue, valueName );
* clampLEQUAL( value, maxValue, valueName ); */
template
<
typename
T
>
inline
void
clampBetweenRange
(
T
&
value
,
const
T
minValue
,
const
T
maxValue
,
const
char
*
valueName
)
{
if
(
value
<
minValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
" of "
<<
value
<<
" is below permitted minimum, clampping to "
<<
minValue
<<
"."
<<
std
::
endl
;
value
=
minValue
;
}
else
if
(
value
>
maxValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
" of "
<<
value
<<
" is above permitted maximum, clampping to "
<<
maxValue
<<
"."
<<
std
::
endl
;
value
=
maxValue
;
}
}
/** If value[i] is greater than or equal to minValue do nothing - legal value,
* Otherwise set value[i] to minValue, and warn that valueName[i] was clamped.
* Note this is effectively A[i]=max(A[i],B). */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementGEQUAL
(
A
&
value
,
unsigned
int
i
,
const
T
minValue
,
const
char
*
valueName
)
{
if
(
value
[
i
]
<
minValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
"["
<<
i
<<
"] of "
<<
value
[
i
]
<<
" is below permitted minimum, clampping to "
<<
minValue
<<
"."
<<
std
::
endl
;
value
[
i
]
=
minValue
;
}
}
/** If value[i] is less than or equal to maxValue do nothing - legal value,
* Otherwise set value[i] to maxValue, and warn that valueName[i] was clamped.
* Note this is effectively A[i]=min(A[i],B). */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementLEQUAL
(
A
&
value
,
unsigned
int
i
,
const
T
maxValue
,
const
char
*
valueName
)
{
if
(
value
[
i
]
>
maxValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
"["
<<
i
<<
"] of "
<<
value
[
i
]
<<
" is above permitted maximum, clampping to "
<<
maxValue
<<
"."
<<
std
::
endl
;
value
=
maxValue
;
}
}
/** If value[i] is between or equal to minValue and maxValue do nothing - legal
* value, Otherwise clamp value[i] to specified range and warn that
* valueName[i] was clamped. Equivilant to calling
* clampArrayElementGEQUAL( value, i, minValue, valueName );
* clampArrayElementLEQUAL( value, i, maxValue, valueName ); */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementBetweenRange
(
A
&
value
,
unsigned
int
i
,
const
T
minValue
,
const
T
maxValue
,
const
char
*
valueName
)
{
if
(
value
[
i
]
<
minValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
"["
<<
i
<<
"] of "
<<
value
[
i
]
<<
" is below permitted minimum, clampping to "
<<
minValue
<<
"."
<<
std
::
endl
;
value
[
i
]
=
minValue
;
}
else
if
(
value
[
i
]
>
maxValue
)
{
notify
(
WARN
)
<<
"Warning: "
<<
valueName
<<
"["
<<
i
<<
"] of "
<<
value
[
i
]
<<
" is above permitted maximum, clampping to "
<<
maxValue
<<
"."
<<
std
::
endl
;
value
[
i
]
=
maxValue
;
}
}
/** For each element of value[] in the range (first,last), if the element is
* greater than or equal to minValue do nothing - legal value, Otherwise
* clamp the element to minValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementsGEQUAL
(
A
&
value
,
unsigned
int
first
,
unsigned
int
last
,
const
T
minValue
,
const
char
*
valueName
)
{
for
(
unsigned
int
i
=
first
;
i
<=
last
;
++
i
)
clampArrayElementGEQUAL
(
value
,
i
,
minValue
,
valueName
);
}
/** For each element of value[] in the range (first,last), if the element is
* less than or equal to maxValue do nothing - legal value, Otherwise clamp
* the element to maxValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementsLEQUAL
(
A
&
value
,
unsigned
int
first
,
unsigned
int
last
,
const
T
maxValue
,
const
char
*
valueName
)
{
for
(
unsigned
int
i
=
first
;
i
<=
last
;
++
i
)
clampArrayElementLEQUAL
(
value
,
i
,
maxValue
,
valueName
);
}
/** For each element of value[] in the range (first,last), if the element is
* between or equal to minValue and maxValue do nothing - legal value,
* Otherwise clamp the element to the range and warn that valueName[i] was
* clamped. Equivalent to calling
* clampArrayElementsGEQUAL( value, first, last, minValue, valueName);
* clampArrayElementsLEQUAL( value, first, last, maxValue, valueName); */
template
<
typename
A
,
typename
T
>
inline
void
clampArrayElementsBetweenRange
(
A
&
value
,
unsigned
int
first
,
unsigned
int
last
,
const
T
minValue
,
const
T
maxValue
,
const
char
*
valueName
)
{
for
(
unsigned
int
i
=
first
;
i
<=
last
;
++
i
)
clampArrayElementBetweenRange
(
value
,
i
,
minValue
,
maxValue
,
valueName
);
}
/** For each element of the three-element array value[], if the element is
* greater than or equal to minValue do nothing - legal value, Otherwise
* clamp the element to minValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArray3GEQUAL
(
A
&
value
,
const
T
minValue
,
const
char
*
valueName
)
{
clampArrayElementsGEQUAL
(
value
,
0u
,
2u
,
minValue
,
valueName
);
}
/** For each element of the three-element array value[], if the element is
* less than or equal to maxValue do nothing - legal value, Otherwise clamp
* the element to maxValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArray3LEQUAL
(
A
&
value
,
const
T
maxValue
,
const
char
*
valueName
)
{
clampArrayElementsLEQUAL
(
value
,
0u
,
2u
,
maxValue
,
valueName
);
}
/** For each element of the three-element array value[], if the element is
* between or equal to minValue and maxValue do nothing - legal value,
* Otherwise clamp the element to the range and warn that valueName[i] was
* clamped. Equivalent to calling
* clampArray3GEQUAL( value, minValue, valueName);
* clampArray3LEQUAL( value, maxValue, valueName); */
template
<
typename
A
,
typename
T
>
inline
void
clampArray3BetweenRange
(
A
&
value
,
const
T
minValue
,
const
T
maxValue
,
const
char
*
valueName
)
{
clampArrayElementsBetweenRange
(
value
,
0u
,
2u
,
minValue
,
maxValue
,
valueName
);
}
/** For each element of the four-element array value[], if the element is
* greater than or equal to minValue do nothing - legal value, Otherwise
* clamp the element to minValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArray4GEQUAL
(
A
&
value
,
const
T
minValue
,
const
char
*
valueName
)
{
clampArrayElementsGEQUAL
(
value
,
0u
,
3u
,
minValue
,
valueName
);
}
/** For each element of the four-element array value[], if the element is
* less than or equal to maxValue do nothing - legal value, Otherwise clamp
* the element to maxValue, and warn that valueName[i] was clamped. */
template
<
typename
A
,
typename
T
>
inline
void
clampArray4LEQUAL
(
A
&
value
,
const
T
maxValue
,
const
char
*
valueName
)
{
clampArrayElementsLEQUAL
(
value
,
0u
,
3u
,
maxValue
,
valueName
);
}
/** For each element of the four-element array value[], if the element is
* between or equal to minValue and maxValue do nothing - legal value,
* Otherwise clamp the element to the range and warn that valueName[i] was
* clamped. Equivalent to calling
* clampArray4GEQUAL( value, minValue, valueName);
* clampArray4LEQUAL( value, maxValue, valueName); */
template
<
typename
A
,
typename
T
>
inline
void
clampArray4BetweenRange
(
A
&
value
,
const
T
minValue
,
const
T
maxValue
,
const
char
*
valueName
)
{
clampArrayElementsBetweenRange
(
value
,
0u
,
3u
,
minValue
,
maxValue
,
valueName
);
}
}
#endif
lib/mac32-gcc40/include/osg/BufferIndexBinding
0 → 100644
View file @
bb4ef9be
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
* Copyright (C) 2010 Tim Moore
*
* 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_BUFFERINDEXBINDING
#define OSG_BUFFERINDEXBINDING 1
#include <osg/Export>
#include <osg/BufferObject>
#include <osg/StateAttribute>
#ifndef GL_TRANSFORM_FEEDBACK_BUFFER
#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
#endif
namespace
osg
{
class
State
;
/** Encapsulate binding buffer objects to index targets. This
* specifically supports the uniform buffer and transform feedback
* targets.
*/
// Common implementation superclass
class
OSG_EXPORT
BufferIndexBinding
:
public
StateAttribute
{
protected:
BufferIndexBinding
(
GLenum
target
,
GLuint
index
);
BufferIndexBinding
(
GLenum
target
,
GLuint
index
,
BufferObject
*
bo
,
GLintptr
offset
,
GLsizeiptr
size
);
BufferIndexBinding
(
const
BufferIndexBinding
&
rhs
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
);
public:
// The member value is part of the key to this state attribute in
// the State class. Using the index target, we can seperately
// track the bindings for many different index targets.
virtual
unsigned
getMember
()
const
{
return
static_cast
<
unsigned
int
>
(
_index
);
}
GLenum
getTarget
()
const
{
return
_target
;
}
/** Get the index target.
*/
GLuint
getIndex
()
const
{
return
_index
;
}
/** Set the buffer object that will be bound to the index target.
*/
void
setBufferObject
(
BufferObject
*
bo
)
{
_bufferObject
=
bo
;
}
/** Get the buffer object to be bound.
*/
BufferObject
*
getBufferObject
()
const
{
return
_bufferObject
.
get
();
}
/** Set the starting offset into the buffer object for data for
the indexed target. Note: the required alignment on the offset
may be quite large (e.g., 256 bytes on NVidia 8600M). This
should be checked with glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT...).
*/
void
setOffset
(
GLintptr
offset
)
{
_offset
=
offset
;
}
GLintptr
getOffset
()
const
{
return
_offset
;
}
/** Set the size of data for the indexed target.
*/
void
setSize
(
GLsizeiptr
size
)
{
_size
=
size
;
}
GLsizeiptr
getSize
()
const
{
return
_size
;
}
virtual
void
apply
(
State
&
state
)
const
;
protected:
virtual
~
BufferIndexBinding
();
const
GLenum
_target
;
const
GLuint
_index
;
ref_ptr
<
BufferObject
>
_bufferObject
;
GLintptr
_offset
;
GLsizeiptr
_size
;
};
/** StateAttribute for binding a uniform buffer index target.
*/
class
OSG_EXPORT
UniformBufferBinding
:
public
BufferIndexBinding
{
public:
UniformBufferBinding
();
UniformBufferBinding
(
GLuint
index
);
/** Create a binding for a uniform buffer index target.
* @param index the index target
* @param bo associated buffer object
* @param offset offset into buffer object
* @param size size of data in buffer object
*/
UniformBufferBinding
(
GLuint
index
,
BufferObject
*
bo
,
GLintptr
offset
,
GLsizeiptr
size
);
UniformBufferBinding
(
const
UniformBufferBinding
&
rhs
,
const
CopyOp
&
copyop
=
CopyOp
::
SHALLOW_COPY
);
META_StateAttribute
(
osg
,
UniformBufferBinding
,
UNIFORMBUFFERBINDING
);
virtual
int
compare
(
const
StateAttribute
&
bb
)
const
{
COMPARE_StateAttribute_Types
(
UniformBufferBinding
,
bb
)