OpenSceneGraph API
osg.AlphaFuncosg.AnimationPathosg.AnimationPathCallbackosg.ApplicationUsageosg.ApplicationUsageProxyosg.ArgumentParserosg.Arrayosg.ArrayVisitorosg.AtomicCounterBufferBindingosg.AtomicCounterBufferObjectosg.AttributeDispatchosg.AttributeDispatchersosg.AttributeFunctorArrayVisitorosg.AudioSinkosg.AudioStreamosg.AutoTransformosg.BarrierOperationosg.Billboardosg.BindImageTextureosg.BlendColorosg.BlendEquationosg.BlendEquationiosg.BlendFuncosg.BlendFunciosg.BlockAndFlushOperationosg.BoundingBoxImplosg.BoundingSphereImplosg.Boxosg.BufferDataosg.buffered_objectosg.buffered_valueosg.BufferIndexBindingosg.BufferObjectosg.BufferObjectProfileosg.BufferTemplateosg.BuildShapeGeometryVisitorosg.Callbackosg.CallbackObjectosg.Cameraosg.CameraRenderOrderSortOposg.CameraViewosg.Capabilityosg.Capabilityiosg.Capsuleosg.CastAndScaleToFloatOperationosg.ClampColorosg.ClampedLinearCostFunction1Dosg.ClearNodeosg.ClipControlosg.ClipNodeosg.ClipPlaneosg.ClusterCullingCallbackosg.CollectOccludersVisitorosg.ColorMaskosg.ColorMaskiosg.ColorMatrixosg.CompositeShapeosg.ComputeBoundsVisitorosg.Coneosg.ConfigureBufferObjectsVisitorosg.ConstArrayVisitorosg.ConstAttributeFunctorArrayVisitorosg.ConstShapeVisitorosg.ConstValueVisitorosg.ContextDataosg.ConvexHullosg.ConvexPlanarOccluderosg.ConvexPlanarPolygonosg.CoordinateSystemNodeosg.CopyOposg.CullFaceosg.CullingSetosg.CullSettingsosg.CullStackosg.Cylinderosg.DefaultIndirectCommandDrawArraysosg.DefaultIndirectCommandDrawElementsosg.DefaultUserDataContainerosg.DeleteHandlerosg.depends_onosg.Depthosg.DepthRangeIndexedosg.Disableiosg.DispatchComputeosg.DisplaySettingsosg.Drawableosg.DrawableCullCallbackosg.DrawableEventCallbackosg.DrawableUpdateCallbackosg.DrawArrayLengthsosg.DrawArraysosg.DrawArraysIndirectosg.DrawArraysIndirectCommandosg.DrawElementsosg.DrawElementsIndirectosg.DrawElementsIndirectCommandosg.DrawElementsIndirectUByteosg.DrawElementsIndirectUIntosg.DrawElementsIndirectUShortosg.DrawElementsUByteosg.DrawElementsUIntosg.DrawElementsUShortosg.DrawIndirectBufferObjectosg.DrawPixelsosg.DummyObjectosg.ElapsedTimeosg.ElementBufferObjectosg.EllipsoidModelosg.Enableiosg.EndOfDynamicDrawBlockosg.fast_back_stackosg.FlushDeletedGLObjectsOperationosg.Fogosg.FragmentProgramosg.FrameBufferAttachmentosg.FrameBufferObjectosg.FrameStamposg.FrontFaceosg.Geodeosg.Geometryosg.GeometryCostEstimatorosg.GetScalarValueosg.GLBufferObjectosg.GLBufferObjectManagerosg.GLBufferObjectSetosg.GLExtensionsosg.GLFrameBufferObjectManagerosg.GLObjectManagerosg.GLRenderBufferManagerosg.GraphicsContextosg.GraphicsCostEstimatorosg.GraphicsObjectosg.GraphicsObjectManagerosg.GraphicsOperationosg.GraphicsThreadosg.Grouposg.HeightFieldosg.Hintosg.Identifierosg.Imageosg.ImageSequenceosg.ImageStreamosg.IndexArrayosg.IndirectCommandDrawArraysosg.IndirectCommandDrawElementsosg.InfinitePlaneosg.KdTreeosg.KdTreeBuilderosg.Lightosg.LightModelosg.LightSourceosg.LineSegmentosg.LineStippleosg.LineWidthosg.LODosg.LogicOposg.MakeStringosg.Materialosg.Matrix2Templateosg.Matrix2x3Templateosg.Matrix2x4Templateosg.Matrix3Templateosg.Matrix3x2Templateosg.Matrix3x4Templateosg.Matrix4x2Templateosg.Matrix4x3Templateosg.Matrixdosg.Matrixfosg.MatrixTransformosg.MixinVectorosg.MultiDrawArraysosg.MultiDrawArraysIndirectosg.MultiDrawElementsIndirectUByteosg.MultiDrawElementsIndirectUIntosg.MultiDrawElementsIndirectUShortosg.Multisampleosg.Nodeosg.NodeAcceptOposg.NodeCallbackosg.NodeTrackerCallbackosg.NodeVisitorosg.NotifyHandlerosg.Objectosg.Observerosg.observer_ptrosg.ObserverNodePathosg.ObserverSetosg.OccluderNodeosg.OcclusionQueryNodeosg.Operationosg.OperationQueueosg.OperationThreadosg.PagedLODosg.PatchParameterosg.PixelBufferObjectosg.PixelDataBufferObjectosg.PixelStorageModesosg.Planeosg.Pointosg.PointSpriteosg.PolygonModeosg.PolygonOffsetosg.PolygonStippleosg.Polytopeosg.PositionAttitudeTransformosg.PrimitiveFunctorosg.PrimitiveIndexFunctorosg.PrimitiveRestartIndexosg.PrimitiveSetosg.Programosg.ProgramCostEstimatorosg.Projectionosg.ProxyNodeosg.PushPopObjectosg.PushPopValueosg.Quatosg.QueryGeometryosg.ref_ptrosg.RefBlockosg.RefBlockCountosg.Referencedosg.RefMatrixdosg.RefMatrixfosg.ReleaseContext_Block_MakeCurrentOperationosg.RenderBufferosg.RenderInfoosg.RunOperationsosg.SampleMaskiosg.Samplerosg.Scissorosg.ScissorIndexedosg.Scriptosg.ScriptEngineosg.ScriptNodeCallbackosg.Sequenceosg.SetScalarValueosg.ShadeModelosg.Shaderosg.ShaderAttributeosg.ShaderBinaryosg.ShaderComponentosg.ShaderComposerosg.ShaderPragmasosg.ShaderStorageBufferBindingosg.ShaderStorageBufferObjectosg.ShadowVolumeOccluderosg.Shapeosg.ShapeDrawableosg.ShapeVisitorosg.Sphereosg.StandardNotifyHandlerosg.Stateosg.StateAttributeosg.StateAttributeCallbackosg.StateSetosg.Statsosg.Stencilosg.StencilTwoSidedosg.SwapBuffersOperationosg.Switchosg.SyncSwapBuffersCallbackosg.TemplateArrayosg.TemplateArrayUniformosg.TemplateIndexArrayosg.TemplateMatrixosg.TemplatePrimitiveFunctorosg.TemplatePrimitiveIndexFunctorosg.TemplateUniformosg.TemplateValueObjectosg.TessellationHintsosg.TestResultosg.TexEnvosg.TexEnvCombineosg.TexEnvFilterosg.TexGenosg.TexGenNodeosg.TexMatosg.Textureosg.Texture1Dosg.Texture2Dosg.Texture2DArrayosg.Texture2DMultisampleosg.Texture3Dosg.TextureAttributeosg.TextureBufferosg.TextureCostEstimatorosg.TextureCubeMaposg.TextureObjectManagerosg.TextureObjectSetosg.TextureRectangleosg.Timerosg.TransferFunctionosg.TransferFunction1Dosg.Transformosg.TransformFeedbackBufferBindingosg.TriangleFunctorosg.TriangleIndexFunctorosg.TriangleLinePointIndexFunctorosg.TriangleMeshosg.UniformBaseosg.UniformBufferBindingosg.UniformBufferObjectosg.UniformCallbackosg.UniformClassNameTraitosg.UserDataContainerosg.ValueMaposg.ValueObjectosg.ValueObjectClassNameTraitosg.ValueStackosg.ValueVisitorosg.Vec2bosg.Vec2dosg.Vec2fosg.Vec2iosg.Vec2sosg.Vec2ubosg.Vec2uiosg.Vec2usosg.Vec3bosg.Vec3dosg.Vec3fosg.Vec3iosg.Vec3sosg.Vec3ubosg.Vec3uiosg.Vec3usosg.Vec4bosg.Vec4dosg.Vec4fosg.Vec4iosg.Vec4sosg.Vec4ubosg.Vec4uiosg.Vec4usosg.VertexArrayStateosg.VertexArrayStateListosg.VertexAttribAliasosg.VertexAttribDivisorosg.VertexBufferObjectosg.VertexProgramosg.Viewosg.Viewportosg.ViewportIndexedosg.WindowingSystemInterfaceProxyosgAnimation.ActionosgAnimation.ActionAnimationosgAnimation.ActionBlendInosgAnimation.ActionBlendOutosgAnimation.ActionStripAnimationosgAnimation.ActionVisitorosgAnimation.AnimationosgAnimation.AnimationManagerBaseosgAnimation.AnimationUpdateCallbackosgAnimation.AnimationUpdateCallbackBaseosgAnimation.BasicAnimationManagerosgAnimation.BoneosgAnimation.BoneMapVisitorosgAnimation.ChannelosgAnimation.ClearActionVisitorosgAnimation.CompositeMotionosgAnimation.InBackFunctionosgAnimation.InBounceFunctionosgAnimation.InCircFunctionosgAnimation.InCubicFunctionosgAnimation.InElasticFunctionosgAnimation.InExpoFunctionosgAnimation.InOutBackFunctionosgAnimation.InOutBounceFunctionosgAnimation.InOutCircFunctionosgAnimation.InOutCubicFunctionosgAnimation.InOutElasticFunctionosgAnimation.InOutExpoFunctionosgAnimation.InOutQuadFunctionosgAnimation.InOutQuartFunctionosgAnimation.InOutSineFunctionosgAnimation.InQuadFunctionosgAnimation.InQuartFunctionosgAnimation.InSineFunctionosgAnimation.KeyframeosgAnimation.KeyframeContainerosgAnimation.LinearFunctionosgAnimation.LinkVisitorosgAnimation.MathMotionTemplateosgAnimation.MorphGeometryosgAnimation.MorphTransformosgAnimation.MorphTransformHardwareosgAnimation.MorphTransformSoftwareosgAnimation.MotionosgAnimation.OutBackFunctionosgAnimation.OutBounceFunctionosgAnimation.OutCircFunctionosgAnimation.OutCubicFunctionosgAnimation.OutElasticFunctionosgAnimation.OutExpoFunctionosgAnimation.OutQuadFunctionosgAnimation.OutQuartFunctionosgAnimation.OutSineFunctionosgAnimation.RigComputeBoundingBoxCallbackosgAnimation.RigGeometryosgAnimation.RigTransformosgAnimation.RigTransformHardwareosgAnimation.RigTransformSoftwareosgAnimation.RunActionosgAnimation.SamplerosgAnimation.SamplerMotionTemplateosgAnimation.SkeletonosgAnimation.StackedMatrixElementosgAnimation.StackedQuaternionElementosgAnimation.StackedRotateAxisElementosgAnimation.StackedScaleElementosgAnimation.StackedTransformosgAnimation.StackedTransformElementosgAnimation.StackedTranslateElementosgAnimation.StatsActionVisitorosgAnimation.StatsHandlerosgAnimation.TargetosgAnimation.TemplateChannelosgAnimation.TemplateCompositeSamplerosgAnimation.TemplateCubicBezierosgAnimation.TemplateCubicBezierInterpolatorosgAnimation.TemplateInterpolatorBaseosgAnimation.TemplateKeyframeosgAnimation.TemplateKeyframeContainerosgAnimation.TemplateLinearInterpolatorosgAnimation.TemplateLinearPackedInterpolatorosgAnimation.TemplateSamplerosgAnimation.TemplateSphericalLinearInterpolatorosgAnimation.TemplateStepInterpolatorosgAnimation.TemplateTargetosgAnimation.TimelineosgAnimation.TimelineAnimationManagerosgAnimation.UpdateActionVisitorosgAnimation.UpdateBoneosgAnimation.UpdateFloatUniformosgAnimation.UpdateMaterialosgAnimation.UpdateMatrixfUniformosgAnimation.UpdateMatrixTransformosgAnimation.UpdateMorphosgAnimation.UpdateMorphGeometryosgAnimation.UpdateRigGeometryosgAnimation.UpdateUniformosgAnimation.UpdateVec2fUniformosgAnimation.UpdateVec3fUniformosgAnimation.UpdateVec4fUniformosgAnimation.Vec3ArrayPackedosgAnimation.Vec3PackedosgAnimation.VertexInfluenceosgAnimation.VertexInfluenceMaposgDB.ArchiveosgDB.AuthenticationDetailsosgDB.AuthenticationMaposgDB.base64_decodestateosgDB.base64_encodestateosgDB.Base64decoderosgDB.Base64encoderosgDB.BaseCompressorosgDB.BaseSerializerosgDB.basic_type_wrapperosgDB.BitFlagsSerializerosgDB.ClassInterfaceosgDB.DatabasePagerosgDB.DatabaseRevisionosgDB.DatabaseRevisionsosgDB.DeprecatedDotOsgWrapperManagerosgDB.DotOsgWrapperosgDB.DynamicLibraryosgDB.EnumSerializerosgDB.ExternalFileWriterosgDB.FieldosgDB.FieldReaderosgDB.FieldReaderIteratorosgDB.FileCacheosgDB.FileListosgDB.FileLocationCallbackosgDB.FileNameComparatorosgDB.FindFileCallbackosgDB.FinishedObjectReadCallbackosgDB.GLenumSerializerosgDB.ifstreamosgDB.ImageOptionsosgDB.ImagePagerosgDB.ImageProcessorosgDB.ImageSerializerosgDB.InputosgDB.InputExceptionosgDB.InputIteratorosgDB.InputStreamosgDB.IntLookuposgDB.IsAVectorSerializerosgDB.ListSerializerosgDB.MapBaseSerializerosgDB.MapIteratorObjectosgDB.MapSerializerosgDB.MatrixSerializerosgDB.MethodObjectosgDB.ObjectCacheosgDB.ObjectGLenumosgDB.ObjectMarkosgDB.ObjectPropertyosgDB.ObjectSerializerosgDB.ObjectWrapperosgDB.ObjectWrapperAssociateosgDB.ObjectWrapperManagerosgDB.ofstreamosgDB.OptionsosgDB.OutputosgDB.OutputExceptionosgDB.OutputIteratorosgDB.OutputStreamosgDB.ParameterOutputosgDB.PluginFunctionProxyosgDB.PropByRefSerializerosgDB.PropByValSerializerosgDB.ReaderWriterosgDB.ReaderWriterInfoosgDB.ReadFileCallbackosgDB.RegisterCompressorProxyosgDB.RegisterCustomWrapperProxyosgDB.RegisterDotOsgWrapperProxyosgDB.RegisterImageProcessorProxyosgDB.RegisterReaderWriterProxyosgDB.RegisterWrapperProxyosgDB.RegistryosgDB.SharedStateManagerosgDB.StringSerializerosgDB.TemplateRegisterDotOsgWrapperProxyosgDB.TemplateSerializerosgDB.type_wrapperosgDB.UpdateWrapperVersionProxyosgDB.UserLookupTableProxyosgDB.UserSerializerosgDB.VectorBaseSerializerosgDB.VectorSerializerosgDB.WriteFileCallbackosgDB.XmlNodeosgFX.AnisotropicLightingosgFX.BumpMappingosgFX.CartoonosgFX.EffectosgFX.MultiTextureControlosgFX.OutlineosgFX.RegistryosgFX.ScribeosgFX.SpecularHighlightsosgFX.TechniqueosgFX.ValidatorosgGA.AnimationPathManipulatorosgGA.CameraManipulatorosgGA.CameraViewSwitchManipulatorosgGA.DeviceosgGA.DriveManipulatorosgGA.EventosgGA.EventHandlerosgGA.EventQueueosgGA.EventVisitorosgGA.FirstPersonManipulatorosgGA.FlightManipulatorosgGA.GUIActionAdapterosgGA.GUIEventAdapterosgGA.GUIEventHandlerosgGA.KeySwitchMatrixManipulatorosgGA.MultiTouchTrackballManipulatorosgGA.NodeTrackerManipulatorosgGA.OrbitManipulatorosgGA.PointerDataosgGA.SphericalManipulatorosgGA.StandardManipulatorosgGA.StateSetManipulatorosgGA.TerrainManipulatorosgGA.TrackballManipulatorosgGA.UFOManipulatorosgGA.WidgetosgManipulator.AntiSquishosgManipulator.CommandManagerosgManipulator.CompositeDraggerosgManipulator.ConstraintosgManipulator.CylinderPlaneProjectorosgManipulator.CylinderProjectorosgManipulator.DraggerosgManipulator.DraggerCallbackosgManipulator.DraggerTransformCallbackosgManipulator.GridConstraintosgManipulator.LineProjectorosgManipulator.MotionCommandosgManipulator.PlaneProjectorosgManipulator.PointerInfoosgManipulator.ProjectorosgManipulator.Rotate3DCommandosgManipulator.RotateCylinderDraggerosgManipulator.RotateSphereDraggerosgManipulator.Scale1DCommandosgManipulator.Scale1DDraggerosgManipulator.Scale2DCommandosgManipulator.Scale2DDraggerosgManipulator.ScaleAxisDraggerosgManipulator.ScaleUniformCommandosgManipulator.SpherePlaneProjectorosgManipulator.SphereProjectorosgManipulator.TabBoxDraggerosgManipulator.TabBoxTrackballDraggerosgManipulator.TabPlaneDraggerosgManipulator.TabPlaneTrackballDraggerosgManipulator.TrackballDraggerosgManipulator.Translate1DDraggerosgManipulator.Translate2DDraggerosgManipulator.TranslateAxisDraggerosgManipulator.TranslateInLineCommandosgManipulator.TranslateInPlaneCommandosgManipulator.TranslatePlaneDraggerosgParticle.AccelOperatorosgParticle.AngularAccelOperatorosgParticle.AngularDampingOperatorosgParticle.BounceOperatorosgParticle.BoxPlacerosgParticle.CenteredPlacerosgParticle.CompositePlacerosgParticle.ConnectedParticleSystemosgParticle.ConstantRateCounterosgParticle.CounterosgParticle.DampingOperatorosgParticle.DomainOperatorosgParticle.EmitterosgParticle.ExplosionDebrisEffectosgParticle.ExplosionEffectosgParticle.ExplosionOperatorosgParticle.FireEffectosgParticle.FluidFrictionOperatorosgParticle.FluidProgramosgParticle.ForceOperatorosgParticle.InterpolatorosgParticle.LinearInterpolatorosgParticle.ModularEmitterosgParticle.ModularProgramosgParticle.MultiSegmentPlacerosgParticle.OperatorosgParticle.OrbitOperatorosgParticle.ParticleosgParticle.ParticleEffectosgParticle.ParticleProcessorosgParticle.ParticleSystemosgParticle.ParticleSystemUpdaterosgParticle.PlacerosgParticle.PointPlacerosgParticle.PrecipitationEffectosgParticle.ProgramosgParticle.RadialShooterosgParticle.RandomRateCounterosgParticle.rangeosgParticle.SectorPlacerosgParticle.SegmentPlacerosgParticle.ShooterosgParticle.SinkOperatorosgParticle.SmokeEffectosgParticle.SmokeTrailEffectosgParticle.VariableRateCounterosgPresentation.ActiveOperatorsosgPresentation.AnimationMaterialosgPresentation.AnimationMaterialCallbackosgPresentation.CompileSlideCallbackosgPresentation.CursorosgPresentation.dereference_lessosgPresentation.FilePathDataosgPresentation.HomePositionosgPresentation.HUDSettingsosgPresentation.HUDTransformosgPresentation.ImageSequenceUpdateCallbackosgPresentation.JumpDataosgPresentation.KeyEventHandlerosgPresentation.KeyPositionosgPresentation.LayerAttributesosgPresentation.LayerCallbackosgPresentation.ObjectOperatorosgPresentation.PickEventHandlerosgPresentation.PropertyAnimationosgPresentation.PropertyEventCallbackosgPresentation.PropertyManagerosgPresentation.PropertyReaderosgPresentation.SlideEventHandlerosgPresentation.SlideShowConstructorosgPresentation.TimeoutosgShadow.ConvexPolyhedronosgShadow.DebugShadowMaposgShadow.LightSpacePerspectiveShadowMapAlgorithmosgShadow.LightSpacePerspectiveShadowMapCBosgShadow.LightSpacePerspectiveShadowMapDBosgShadow.LightSpacePerspectiveShadowMapVBosgShadow.MinimalCullBoundsShadowMaposgShadow.MinimalDrawBoundsShadowMaposgShadow.MinimalShadowMaposgShadow.ParallelSplitShadowMaposgShadow.ProjectionShadowMaposgShadow.ShadowedSceneosgShadow.ShadowMaposgShadow.ShadowSettingsosgShadow.ShadowTechniqueosgShadow.ShadowTextureosgShadow.SoftShadowMaposgShadow.StandardShadowMaposgShadow.ViewDependentShadowMaposgShadow.ViewDependentShadowTechniqueosgSim.AzimElevationSectorosgSim.AzimRangeosgSim.AzimSectorosgSim.BlinkSequenceosgSim.ColorRangeosgSim.ConeSectorosgSim.DatabaseCacheReadCallbackosgSim.DirectionalSectorosgSim.DOFTransformosgSim.ElevationRangeosgSim.ElevationSectorosgSim.ElevationSliceosgSim.GeographicLocationosgSim.HeightAboveTerrainosgSim.ImpostorosgSim.ImpostorSpriteosgSim.ImpostorSpriteManagerosgSim.InsertImpostorsVisitorosgSim.LightPointosgSim.LightPointNodeosgSim.LightPointSystemosgSim.LineOfSightosgSim.MultiSwitchosgSim.ObjectRecordDataosgSim.OverlayNodeosgSim.ScalarBarosgSim.ScalarsToColorsosgSim.SectorosgSim.SequenceGrouposgSim.ShapeAttributeosgSim.ShapeAttributeListosgSim.SphereSegmentosgSim.VisibilityGrouposgTerrain.CompositeLayerosgTerrain.ContourLayerosgTerrain.DisplacementMappingTechniqueosgTerrain.GeometryPoolosgTerrain.GeometryTechniqueosgTerrain.HeightFieldDrawableosgTerrain.HeightFieldLayerosgTerrain.ImageLayerosgTerrain.LayerosgTerrain.LocatorosgTerrain.NoDataValueosgTerrain.ProxyLayerosgTerrain.SharedGeometryosgTerrain.SwitchLayerosgTerrain.TerrainosgTerrain.TerrainNeighboursosgTerrain.TerrainTechniqueosgTerrain.TerrainTileosgTerrain.TileIDosgTerrain.ValidDataOperatorosgTerrain.ValidRangeosgTerrain.WhiteListTileLoadedCallbackosgText.BevelosgText.FadeTextosgText.FontosgText.GlyphosgText.Glyph3DosgText.GlyphGeometryosgText.GlyphTextureosgText.StringosgText.StyleosgText.TextosgText.Text3DosgText.TextBaseosgText.VectorUIntosgUI.AlignmentSettingsosgUI.CloseCallbackosgUI.ColorPaletteosgUI.ComboBoxosgUI.DialogosgUI.DoubleValidatorosgUI.DragCallbackosgUI.FrameSettingsosgUI.HandleCallbackosgUI.IntValidatorosgUI.ItemosgUI.LabelosgUI.LineEditosgUI.PopuposgUI.PushButtonosgUI.StyleosgUI.TabosgUI.TabWidgetosgUI.TextSettingsosgUI.ValidatorosgUI.WidgetosgUtil.AddRangeOperatorosgUtil.BaseOptimizerVisitorosgUtil.ConvertVecosgUtil.CubeMapGeneratorosgUtil.CullVisitorosgUtil.DelaunayConstraintosgUtil.DelaunayTriangulatorosgUtil.dereference_clearosgUtil.dereference_lessosgUtil.DisplayRequirementsVisitorosgUtil.DrawElementTypeSimplifierosgUtil.DrawElementTypeSimplifierVisitorosgUtil.EdgeCollectorosgUtil.GeometryCollectorosgUtil.GLObjectsOperationosgUtil.GLObjectsVisitorosgUtil.HalfWayMapGeneratorosgUtil.HighlightMapGeneratorosgUtil.IncrementalCompileOperationosgUtil.IndexMeshVisitorosgUtil.IntersectionVisitorosgUtil.IntersectorosgUtil.IntersectorGrouposgUtil.LessDepthSortFunctorosgUtil.LineSegmentIntersectorosgUtil.MultiplyRangeOperatorosgUtil.OperationArrayFunctorosgUtil.OptimizerosgUtil.PerlinNoiseosgUtil.PlaneIntersectorosgUtil.PolytopeIntersectorosgUtil.PositionalStateContainerosgUtil.PrintVisitorosgUtil.RayIntersectorosgUtil.ReflectionMapGeneratorosgUtil.RenderBinosgUtil.RenderLeafosgUtil.RenderStageosgUtil.ReversePrimitiveFunctorosgUtil.SceneGraphBuilderosgUtil.SceneViewosgUtil.ShaderGenVisitorosgUtil.SharedArrayOptimizerosgUtil.SimplifierosgUtil.SmoothingVisitorosgUtil.StateGraphosgUtil.StateToCompileosgUtil.StatisticsosgUtil.StatsVisitorosgUtil.TangentSpaceGeneratorosgUtil.TessellatorosgUtil.TransformAttributeFunctorosgUtil.TransformCallbackosgUtil.UpdateVisitorosgUtil.VertexAccessOrderVisitorosgUtil.VertexCacheMissVisitorosgUtil.VertexCacheVisitorosgViewer.WGLosgViewer.AcrossAllScreensosgViewer.CompositeViewerosgViewer.DepthPartitionSettingsosgViewer.GraphicsHandleCarbonosgViewer.GraphicsHandleCocoaosgViewer.GraphicsHandleWin32osgViewer.GraphicsHandleX11osgViewer.GraphicsWindowosgViewer.GraphicsWindowEmbeddedosgViewer.GraphicsWindowFunctionProxyosgViewer.GraphicsWindowWin32osgViewer.GraphicsWindowX11osgViewer.HelpHandlerosgViewer.InteractiveImageHandlerosgViewer.KeystoneosgViewer.KeystoneHandlerosgViewer.LODScaleHandlerosgViewer.OpenGLQuerySupportosgViewer.PanoramicSphericalDisplayosgViewer.PixelBufferWin32osgViewer.PixelBufferX11osgViewer.RecordCameraPathHandlerosgViewer.RendererosgViewer.SceneosgViewer.ScreenCaptureHandlerosgViewer.SingleScreenosgViewer.SingleWindowosgViewer.SphericalDisplayosgViewer.StatsHandlerosgViewer.ThreadingHandlerosgViewer.ToggleSyncToVBlankHandlerosgViewer.ViewosgViewer.ViewConfigosgViewer.ViewerosgViewer.ViewerBaseosgViewer.WindowSizeHandlerosgViewer.WoWVxDisplayosgViewer.XGLAttributesosgVolume.AlphaFuncPropertyosgVolume.CollectPropertiesVisitorosgVolume.CompositeLayerosgVolume.CompositePropertyosgVolume.ExteriorTransparencyFactorPropertyosgVolume.FixedFunctionTechniqueosgVolume.ImageDetailsosgVolume.ImageLayerosgVolume.IsoSurfacePropertyosgVolume.LayerosgVolume.LightingPropertyosgVolume.LocatorosgVolume.MaximumIntensityProjectionPropertyosgVolume.MultipassTechniqueosgVolume.PropertyosgVolume.PropertyAdjustmentCallbackosgVolume.PropertyVisitorosgVolume.RayTracedTechniqueosgVolume.SampleDensityPropertyosgVolume.SampleDensityWhenMovingPropertyosgVolume.SampleRatioPropertyosgVolume.SampleRatioWhenMovingPropertyosgVolume.ScalarPropertyosgVolume.SwitchPropertyosgVolume.TexGenLocatorCallbackosgVolume.TileDataosgVolume.TileIDosgVolume.TransferFunctionPropertyosgVolume.TransformLocatorCallbackosgVolume.TransparencyPropertyosgVolume.VolumeosgVolume.VolumeSceneosgVolume.VolumeSettingsosgVolume.VolumeTechniqueosgVolume.VolumeTileosgWidget.BoxosgWidget.BrowserosgWidget.BrowserImageosgWidget.BrowserManagerosgWidget.CallbackosgWidget.CallbackInterfaceosgWidget.CameraSwitchHandlerosgWidget.CanvasosgWidget.EventosgWidget.EventInterfaceosgWidget.FrameosgWidget.FunctionCallbackosgWidget.GeometryHintsosgWidget.InputosgWidget.KeyboardHandlerosgWidget.LabelosgWidget.LuaEngineosgWidget.MouseHandlerosgWidget.NotifyWidgetosgWidget.NullWidgetosgWidget.ObjectCallbackosgWidget.PdfImageosgWidget.PdfReaderosgWidget.PythonEngineosgWidget.ResizeHandlerosgWidget.ScriptEngineosgWidget.StyleosgWidget.StyleInterfaceosgWidget.StyleManagerosgWidget.TableosgWidget.UIObjectParentosgWidget.VncClientosgWidget.VncImageosgWidget.WidgetosgWidget.WindowosgWidget.WindowManagerOpenThreads.AffinityOpenThreads.AtomicOpenThreads.AtomicPtrOpenThreads.BarrierOpenThreads.BlockOpenThreads.BlockCountOpenThreads.ConditionOpenThreads.MutexOpenThreads.ReadWriteMutexOpenThreads.ReentrantMutexOpenThreads.ReverseScopedLockOpenThreads.ReverseScopedPointerLockOpenThreads.ScopedLockOpenThreads.ScopedPointerLockOpenThreads.ScopedReadLockOpenThreads.ScopedWriteLockOpenThreads.Thread

OpenSceneGraph开发文档

OpenSceneGraph的核心API简介如下:

  • osg::Node

osg::Node 是OpenSceneGraph中的基础节点,表示3D场景中的任何物体。

osg::ref_ptr<osg::Node> node = new osg::Node();
  • osg::Group

osg::Group 继承自 osg::Node,可以包含其他节点,用于组织场景中的对象。

osg::ref_ptr<osg::Group> group = new osg::Group();
osg::ref_ptr<osg::Node> node1 = new osg::Node();
osg::ref_ptr<osg::Node> node2 = new osg::Node();
group->addChild(node1);
group->addChild(node2);
  • osg::Geode

osg::Geode 继承自 osg::Node,可以包含几何体( osg::Geometry)和材质( osg::StateSet)等信息。

osg::ref_ptr<osg::Geode> geode = new osg::Geode();
osg::ref_ptr<osg::Geometry> geometry = new osg::Geometry();
geode->addDrawable(geometry);
  • osg::Camera

osg::Camera 继承自 osg::Group,用于表示3D场景中的相机。相机可以设置视角、投影矩阵等参数。

osg::ref_ptr<osg::Camera> camera = new osg::Camera();
camera->setViewport(new osg::Viewport(0, 0, 800, 600));
camera->setProjectionMatrixAsPerspective(30.0f, 800.0f/600.0f, 1.0f, 1000.0f);
  • osgViewer::Viewer

osgViewer::Viewer 是OpenSceneGraph中的一个渲染器,用于显示场景。

osgViewer::Viewer viewer;
viewer.setSceneData(node);
viewer.run();

OSG辅助API

  • osgDB::readNodeFile

osgDB::readNodeFile 可以从文件中读取节点,支持多种文件格式(如 .osg, .obj, .fbx 等)。

osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("model.osg");
  • osg::Shape

osg::Shape 是几何体的基类,可以创建多种几何体。

osg::ref_ptr<osg::Sphere> sphere = new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 1.0f);
osg::ref_ptr<osg::ShapeDrawable> drawable = new osg::ShapeDrawable(sphere);
osg::ref_ptr<osg::Geode> geode = new osg::Geode();
geode->addDrawable(drawable);
  • osg::StateSet

osg::StateSet 是材质和渲染状态的集合,可以为节点设置颜色、纹理、光照等属性。

osg::ref_ptr<osg::Material> material = new osg::Material();
material->setDiffuse(osg::Material::FRONT, osg::Vec4(1.0f, 0.0f, 0.0f,1.0f));
osg::ref_ptrosg::StateSet stateset = new osg::StateSet();
stateset->setAttribute(material);
geode->setStateSet(stateset);
  • osg::Texture2D

osg::Texture2D 可以加载2D纹理图像,并为节点设置纹理。

osg::ref_ptr<osg::Image> image = osgDB::readImageFile("texture.png");
osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D(image);
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet();
stateset->setTextureAttributeAndModes(0, texture);
geode->setStateSet(stateset);
  • osg::PositionAttitudeTransform

osg::PositionAttitudeTransform 可以设置节点的位置和旋转角度。

osg::ref_ptr<osg::PositionAttitudeTransform> transform = new osg::PositionAttitudeTransform();
transform->setPosition(osg::Vec3(0.0f, 0.0f, -10.0f));
transform->setAttitude(osg::Quat(osg::DegreesToRadians(30.0f), osg::Vec3(1.0f, 0.0f, 0.0f)));
transform->addChild(node);
  • osg::AnimationPath

osg::AnimationPath 可以创建节点的运动路径,用于实现动画效果。

osg::ref_ptr<osg::AnimationPath> path = new osg::AnimationPath();
path->insert(0.0f, osg::AnimationPath::ControlPoint(osg::Vec3(0.0f, 0.0f, 0.0f)));
path->insert(1.0f, osg::AnimationPath::ControlPoint(osg::Vec3(0.0f, 0.0f, -10.0f)));
osg::ref_ptr<osg::AnimationPathCallback> callback = new osg::AnimationPathCallback(path);
transform->setUpdateCallback(callback);

示例代码

以下是一个简单的示例代码,展示如何创建一个场景,包含一个球体、一个材质和一个相机:

#include <osgViewer/Viewer>
#include <osg/ShapeDrawable>
#include <osg/Material>
#include <osgDB/ReadFile>

int main(int argc, char** argv)
{
    // 创建球体
    osg::ref_ptr<osg::Sphere> sphere = new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 1.0f);
    osg::ref_ptr<osg::ShapeDrawable> drawable = new osg::ShapeDrawable(sphere);
    osg::ref_ptr<osg::Geode> geode = new osg::Geode();
    geode->addDrawable(drawable);

    // 创建材质
    osg::ref_ptr<osg::Material> material = new osg::Material();
    material->setDiffuse(osg::Material::FRONT, osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f));
    osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet();
    stateset->setAttribute(material);
    geode->setStateSet(stateset);

    // 创建相机
    osg::ref_ptr<osg::Camera> camera = new osg::Camera();
    camera->setViewport(new osg::osg::Viewport(0, 0, 640, 480));
    camera->setClearColor(osg::Vec4(0.2f, 0.2f, 0.2f, 1.0f));
    camera->setProjectionMatrixAsPerspective(45.0f, 640.0f / 480.0f, 0.1f, 1000.0f);
    camera->setViewMatrix(osg::Matrix::lookAt(osg::Vec3(0.0f, 0.0f, 10.0f), osg::Vec3(0.0f, 0.0f, 0.0f), osg::Vec3(0.0f, 1.0f, 0.0f)));
    camera->addChild(geode);

    rust
    Copy code
    // 创建场景图
    osg::ref_ptr<osg::Group> root = new osg::Group();
    root->addChild(camera);

    // 创建视图器
    osgViewer::Viewer viewer;
    viewer.setSceneData(root);
    viewer.run();

    return 0;
}    

该示例代码创建了一个场景,包含一个球体、一个材质和一个相机。该场景被渲染到屏幕上,并且可以用鼠标和键