Scene

A scene can be considered as a level. It is where you place objects to create your worlds, but it could also be used in many different ways. A scene can be considered as an "image" or part of an "image"; it can not only be use to draw geometry on screen but can also be used to draw GUI, HUD (with a 2d camera) or to progressively load at runtime a seamless open world.

See Also

Static Variables


Name Description
asset Reference to the parent Asset where the Scene data is maintained.
localbounds The active Scene boundaries.
object_count Total amount of Object currently contained in the active Scene.
renderlayer_count Number of RenderLayer available within the current Scene.
subscene_count Amount of sub Scene that will be loaded along with the current Scene.
objectgroup_count Number of ObjectGroup currently defined in the active Scene.
soundgroup_count Total of SoundGroup maintained by the Scene.
audiopreset_count Number of AudioPreset available in the current Scene.
variable_count Amount of member Variable defined in the active Scene.
animation Animation structure that handles the Action and Sequence of the active Scene.
handler Handler reference that maintains the scripting thread of the current Scene.
navigation Access to the Navigation structure associated to the Scene (if any).
loading Boolean value that represent if the Scene is currently loading or not.

Variables


Name Description
renderlayer_mask Bit mask of RenderLayer cap that describes which layers are currently available for rendering.
debug_mode Bit mask of the debug mode(s) to use while the Scene is in edit mode (editor only).
active Activate or deactive Scene updates.
visible Enable or disable the active Scene rendering.
visible Enable or disable the active Scene rendering.
store_audioeffects Force to save the current AudioEffect configuration inside the active Scene.
cursor_normal The direction vector at the 3d cursor location.

Functions


Name Description
AddRenderLayer Create and append a new RenderLayer to the active Scene.
GetRenderLayer Retrieve an existing RenderLayer using its name as key.
GetRenderLayerAt Return an existing RenderLayer located at a specific index.
GetRenderLayerIndex Retrieve the index of an existing RenderLayer.
SetRenderLayerIndex Manually set the list index of an existing RenderLayer.
RemoveRenderLayer Remove a specific RenderLayer reference from the Scene.
RemoveRenderLayerAt Remove a RenderLayer by index.
SwapRenderLayers Swap the location of two RenderLayer using their index as key.
AddSubScene Add a new sub Scene slot.
GetSubScene Retrieve the Scene Asset reference using the slot index as key.
SetSubScene Assign to a specific slot the sub Scene Asset to load.
GetSubSceneIndex Retrieve the slot index where a specific Scene Asset is connected to.
SetSubSceneIndex Change the loading priority of a specific sub Scene Asset slot.
RemoveSubScene Remove a specific sub Scene slot index using its index as key.
SwapSubScenes Swap the loading order of two sub Scene slot.
AddObjectGroup Create a new ObjectGroup and attach it to the active Scene.
GetObjectGroup Retrieve an existing ObjectGroup using its name as key.
GetObjectGroupAt Return the reference of an ObjectGroup at a specific index location.
GetObjectGroupIndex Return the index of a specific ObjectGroup maintained by the active Scene.
RemoveObjectGroup Remove an ObjectGroup associated to the current Scene.
RemoveObjectGroupAt Helper to remove an existing ObjectGroup at a specific index.
AddSoundGroup Create an attach a new SoundGroup to the current Scene.
GetSoundGroup Helper to retrieve a specific SoundGroup reference using its name as key.
GetSoundGroupAt Return a SoundGroup using its index as key.
GetSoundGroupIndex Function that return the index of a specific SoundGroup contained in the current Scene.
RemoveSoundGroup Remove a SoundGroup from the active Scene.
RemoveSoundGroupAt Remove a SoundGroup located at a specific index.
AddVariable Append a new member Variable to the active Scene.
GetVariable Helper to retrieve the reference to an existing Variable using its name as key.
GetVariableIndex Function that retrieve the index of an existing Variable.
GetVariableAt Retrive a specific Variable reference by index.
RemoveVariable Remove a specific member Variable from the current Scene.
RemoveVariableAt Remove a Variable using its index as key.
AddAudioPreset Add a new AudioPreset to the active Scene.
GetAudioPreset Helper that retrieves an existing AudioPreset by name.
GetAudioPresetAt Helper that return the AudioPreset reference associated to a specific index.
GetAudioPresetIndex Return the internal index of an existing AudioPreset reference.
RemoveAudioPreset Remove an existing AudioPreset reference from the active Scene.
RemoveAudioPresetAt Remove by index an existing AudioPreset connected to the current Scene.
AddObject Helper function that allows you to manually create and connect a new Object to the current Scene.
AddEmpty Helper function that creates and connect a new empty Object to the active Scene.
AddCamera Helper function that creates and connect a new Camera Object to the active Scene.
AddStaticMesh Helper function that creates and connect a new StaticMesh Object to the active Scene.
AddDynamicMesh Helper function that creates and connect a new DynamicMesh Object to the active Scene.
AddSkeletalMesh Helper function that creates and connect a new SkeletalMesh Object to the active Scene.
AddSoundSource Helper function that creates and connect a new SoundSource Object to the active Scene.
AddLightSource Helper function that creates and connect a new LightSource Object to the active Scene.
AddOccluder Helper function that creates and connect a new Occluder Object to the active Scene.
AddText Helper function that creates and connect a new Text Object to the active Scene.
AddParticleSystem Helper function that creates and connect a new ParticleSystem Object to the active Scene.
AddEnergyField Helper function that creates and connect a new EnergyField Object to the active Scene.
AddRoute Helper function that creates and connect a new Route Object to the active Scene.
AddRay Helper function that creates and connect a new Ray Object to the active Scene.
AddProbe Helper function that creates and connect a new Probe Object to the active Scene.
GetObject Retrieve an existing Object reference attached to the current Scene.
GetObjectAt Get a specific Object reference using an index as key.
GetObjectIndex Return the internal index of an Object reference.
SetObjectIndex Manually change a specific Object internal index.
RemoveObject Remove an Object from the active Scene.
RemoveObjectAt Remove an Object using its index as key.
AddNavigation Add Navigation and pathfinding capabilities to the active Scene.
RemoveNavigation Remove Navigation and pathfinding capabilities from the active Scene.
Pick Helper to quicly pick the active Scene from a certain Camera point of view.
Raycast Basic raycast function that launches a ray through the active Scene.
Raycast More refined raycast function that launches a ray through the active Scene.
Raycast Advanced raycast function that launches a ray through the active Scene.
UpdateBounds Force to manually update the active Scene LocalBounds.

Events


Callbacks Description
OnAdd This event is triggered each time a new Object is added to the Scene.
OnRemove Each time an Object is remove this callback is occurs.
OnUpdate This callback gets called each time the Scene gets update (typically once per frame).
OnDraw Called when the Scene is about to draw the first RenderLayer.
OnBegin Called when the Scene is about to draw a RenderLayer.
OnEnd Triggered when the Scene is drawing a RenderLayer.
OnDisplay This callback is triggered when the Scene is done drawing all RenderLayer.

SceneRay


A structure used to store the information of a Scene raycast operation.

Static Variables


Name Description
hit Variable used that confirms a hit actually occurs.
hit_point World location of the hit.
hit_normal The normal at the hit location.
primitive_index The primitive index intersected by the raycast operation (if any).
lod_index The level of detail index that was intersected during the raycast operation.
part_index Store the part index that get hit by the ray.
object Reference of the Object hit by the ray.
collider_index The physics Collider index hit by the ray.
physicmaterial Reference to the PhysicMaterial Asset associated to the Collider that get hit.
geometry Reference to the Geometry hit by the ray.

DebugShapes


Controls the various flags available for shape debug drawing. All flags enable or disable a specific visual shape debugging option that will be display inside the 3d viewport (editor only).

DebugBounds


Controls the various flags available for bounds debug drawing. All flags enable or disable a specific visual bounds debugging option that will be display inside the 3d viewport (editor only).

  • fDrawObjectBounds: Enable or disable Object bounds drawing.
  • fDrawAABB: Draw the axis-aligned bounding box of an object(s).
  • fDrawBBox: Draw the bounding box of an object(s).
  • fDrawBSphere: Debug draws the bounding sphere of the object(s).
  • fDrawClipBounds: Debug draws the active clipping bounds used by an object(s).
  • fDrawSensors: Draw Sensor range of the object(s).
  • fDrawBoundsSelected: Restrict bounds debug draw to the current Object selection.

DebugRelations


Controls the various flags available for relations debug drawing. All flags enable or disable a specific visual relations debugging option that will be display inside the 3d viewport (editor only).

  • fDrawRelationships: Draw relationship lines between a parent and children object(s).
  • fDrawObjectRelations: Use a dashed line between parent and child to debug draw their relationship.
  • fDrawConstraintRelations: Enable debugs draw of object constraints.
  • fDrawRelationshipsSelected: Restrict constraint debug draw to the active selection.

DebugMisc


Controls the various flags available for misc. debug drawing. All flags enable or disable a specific visual miscellaneous debugging option that will be display inside the 3d viewport (editor only).

  • fDrawMisc: Enable or disable miscellaneous debug drawings.
  • fDrawPivot: Draw the Object pivot point.
  • fDrawCenter: Draw the Object bounding box center point.
  • fDrawAxis: Draw the local axis aligned axes.
  • fDrawOccluded: Draw using wireframes occluded drawable objects or debug shape(s).
  • fDrawObjectNames: Draw the name of the Object.
  • fDrawJointNames: Draw the Skeleton Joint name.
  • fDrawChunkNames: Draw the FracturedMesh Shard names.
  • fDrawActionPaths: Draw all location paths contained in the active Action selected.
  • fDrawChunkNames: Draw the FracturedMesh Shard names.
  • fDrawObjectGrids: Draw all ObjectGrid of the active Scene.
  • fDrawObjectGridsViewer: Debug draw the ViewerMethod of each active ObjectGrid.
  • fDrawMiscSelected: Restrict misc. drawing to the active selection only.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA