Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
G3D::Scene Class Reference

Base class for a scene graph. More...

Inherits G3D::ReferenceCountedObject.

Classes

class  LoadOptions
 
class  VRSettings
 

Public Types

typedef shared_ptr< Entity >(* EntityFactory) (const String &name, Scene *scene, AnyTableReader &propertyTable, const ModelTable &modelTable, const Scene::LoadOptions &options)
 
typedef lazy_ptr< Model >(* LazyModelFactory) (const String &name, const Any &any)
 

Public Member Functions

virtual void clear ()
 Remove all objects. More...
 
void clearOrder (const String &entity1Name, const String &entity2Name)
 Removes an existing constraint that entity1 simulate before entity2. More...
 
bool contains (const shared_ptr< Camera > &c) const
 
virtual shared_ptr< EntitycreateEntity (const String &name, const Any &any, const Scene::LoadOptions &options=Scene::LoadOptions())
 Create an Entity and insert() it into the Scene. More...
 
virtual shared_ptr< EntitycreateEntity (const String &entityType, const String &name, const Any &any, const Scene::LoadOptions &options=Scene::LoadOptions())
 For creating an entity with an explicit type such as Skybox where the any may be a simple filename instead of a named Any::TABLE. More...
 
virtual lazy_ptr< ModelcreateModel (const Any &v, const String &name)
 Adds the model to the model table and returns it. More...
 
const shared_ptr< CameradefaultCamera () const
 Returns the default camera, set by defaultCamera = "name" in the Scene file. More...
 
const Stringdescription () const
 
bool editing () const
 When true, even entities with Entity::canChange = false are allowed to change. More...
 
const shared_ptr< Entityentity (const String &name) const
 
shared_ptr< CubeMapenvironmentMapAsCubeMap () const
 Returns the first environmentMap encountered as a CubeMap, or nullptr if there is not one. More...
 
Ray eyeRay (const shared_ptr< Camera > &camera, const Vector2 &pixel, const Rect2D &viewport, const Vector2int16 guardBandThickness) const
 
Helper for calling intersect() with an eye ray. More...
 
void getCameraNames (Array< String > &names) const
 Note that because Cameras are Entitys, these also appear in the entity array. More...
 
void getDescendants (const Array< String > &root, Array< String > &descendants) const
 Returns a unique set of all (recursive) descendants of the root set, not including the root set, according to setOrder() More...
 
void getEntityArray (Array< shared_ptr< Entity > > &array) const
 Append all Entitys (which include Cameras and Lights) to the array. More...
 
void getEntityArray (const Array< String > &names, Array< shared_ptr< Entity > > &array) const
 
void getEntityNames (Array< String > &names) const
 
template<class EntitySubclass >
void getTypedEntityArray (Array< shared_ptr< EntitySubclass > > &array) const
 
Append all Entitys that are subclasses of EntitySubclass to array. More...
 
void getVisibleBounds (AABox &box) const
 
virtual shared_ptr< Entityinsert (const shared_ptr< Entity > &entity)
 Add an Entity to the Scene (and return it). More...
 
virtual shared_ptr< Modelinsert (const shared_ptr< Model > &model)
 Add a Model to the Scene's modelTable() (and return it). More...
 
virtual shared_ptr< Entityintersect (const Ray &ray, float &distance=ignoreFloat, bool intersectMarkers=false, const Array< shared_ptr< Entity > > &exclude=Array< shared_ptr< Entity > >(), Model::HitInfo &info=Model::HitInfo::ignore) const
 Performs very precise (usually, ray-triangle) intersection, and is much slower than intersectBounds. More...
 
virtual shared_ptr< EntityintersectBounds (const Ray &ray, float &distance=ignoreFloat, bool intersectMarkers=false, const Array< shared_ptr< Entity > > &exclude=Array< shared_ptr< Entity > >()) const
 Returns the Entity whose conservative bounds are first intersected by ray, excluding Entitys in exclude. More...
 
RealTime lastEditingTime () const
 Last (wall clock) time that the Scene was in editing() mode. More...
 
RealTime lastLightChangeTime () const
 Does not track changes to environment lighting. More...
 
RealTime lastStructuralChangeTime () const
 Wall-clock time at which the scene contents last changed, e.g., by reloading, adding or removing Entitys, etc. More...
 
RealTime lastVisibleChangeTime () const
 Wall-clock time at which a VisibleEntity in scene last changed at all, e.g., by moving. More...
 
const LightingEnvironmentlightingEnvironment () const
 
LightingEnvironmentlightingEnvironment ()
 
virtual Any load (const String &sceneName, const LoadOptions &loadOptions=LoadOptions())
 Replace the current scene with a new one parsed from a file. More...
 
const ModelTablemodelTable () const
 
const Stringname () const
 
virtual void onPose (Array< shared_ptr< Surface > > &surfaceArray)
 
virtual void onSimulation (SimTime deltaTime)
 
void registerEntitySubclass (const String &name, EntityFactory factory, bool errorIfAlreadyRegistered=true)
 Register a new subclass of G3D::Entity so that it can be constructed from a .Scene.Any file. More...
 
void registerModelSubclass (const String &name, LazyModelFactory factory, bool errorIfAlreadyRegistered=true)
 Register a new subclass of G3D::Model so that it can be constructed from a .Scene.Any file. More...
 
virtual void remove (const shared_ptr< Entity > &entity)
 Remove an entity that must already be in the scene. More...
 
virtual void remove (const shared_ptr< Model > &model)
 Remove a model from modelTable. More...
 
virtual void removeEntity (const String &entityName)
 
virtual void removeModel (const String &modelName)
 
void setDescription (const String &d)
 
void setEditing (bool b)
 
void setOrder (const String &entity1Name, const String &entity2Name)
 
Places a constraint on the Scene that when iterating for simulation, posing, etc., entity1 always be processed before entity2 (although not necessarily immediately before). More...
 
virtual void setTime (const SimTime t)
 Discontinuously change the current time. More...
 
shared_ptr< CubeMapskyboxAsCubeMap () const
 Returns the first skybox encountered as a CubeMap, or nullptr if there is not one. More...
 
SimTime time () const
 
Any toAny (const bool forceAll=false) const
 Creates an Any representing this scene by updating the one from which it was loaded with the current Entity positions. More...
 
const shared_ptr< TriTree > & tritree ()
 
template<class EntitySubclass >
const shared_ptr< EntitySubclass > typedEntity (const String &name) const
 Get an entity by name and downcast to the desired type. More...
 
void visualize (RenderDevice *rd, const shared_ptr< Entity > &selectedEntity, const Array< shared_ptr< Surface > > &allSurfaces, const SceneVisualizationSettings &v, const shared_ptr< Camera > &camera)
 Draws debugging information about the current scene to the render device. More...
 
const VRSettingsvrSettings () const
 

Static Public Member Functions

static void appendSceneSearchPaths (const Array< String > &paths)
 
Directories in addition to the default search directories in which loadScene() and getSceneNames() will search for Scene.Any files. More...
 
static shared_ptr< Scenecreate (const shared_ptr< AmbientOcclusion > &ambientOcclusion)
 
static Array< StringsceneNames ()
 Enumerate the names of all available scenes. More...
 
static String sceneNameToFilename (const String &scene)
 If scene is a filename, returns it, else look up the string in the filename table and return the value. More...
 
static void setSceneSearchPaths (const Array< String > &paths)
 
Directories in which loadScene() and getSceneNames() will search for .scn.any files. More...
 

Protected Types

typedef SmallArray< String, 2 > DependencyList
 
typedef Table< String, DependencyListDependencyTable
 List of the names of all entities that must run before a given entity. More...
 
enum  VisitorState {
  NOT_VISITED,
  VISITING,
  ALREADY_VISITED
}
 

Protected Member Functions

 Scene (const shared_ptr< AmbientOcclusion > &ambientOcclusion)
 
const shared_ptr< Entity_entity (const String &name) const
 
void sortEntitiesByDependency ()
 If m_needEntitySort, sort Entitys to resolve dependencies and set m_needEntitySort = false. More...
 

Static Protected Member Functions

template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 

Protected Attributes

DependencyTable m_ancestorTable
 Simulation dependencies. More...
 
Array< shared_ptr< Camera > > m_cameraArray
 
String m_defaultCameraName
 
DependencyTable m_descendantTable
 
String m_description
 
bool m_editing
 
Array< shared_ptr< Entity > > m_entityArray
 All Entitys, including Cameras, Lights, and MarkerEntitys. More...
 
Table< String, EntityFactorym_entityFactory
 
Table< String, shared_ptr< Entity > > m_entityTable
 All Entitys, including Cameras, Lights, and MarkerEntitys, by name. More...
 
shared_ptr< GFontm_font
 
RealTime m_lastEditingTime
 
RealTime m_lastLightChangeTime
 
RealTime m_lastStructuralChangeTime
 
RealTime m_lastVisibleChangeTime
 
LightingEnvironment m_localLightingEnvironment
 
Table< String, LazyModelFactorym_modelFactory
 
Any m_modelsAny
 
ModelTable m_modelTable
 
String m_name
 
bool m_needEntitySort
 When true, the m_entityArray needs to be re-sorted based on dependencies before iterating. More...
 
shared_ptr< Skyboxm_skybox
 
Any m_sourceAny
 The Any from which this scene was constructed. More...
 
SimTime m_time
 Current time. More...
 
shared_ptr< TriTreem_triTree
 
VRSettings m_vrSettings
 

Detailed Description

Base class for a scene graph.

G3D presents a layered API in which the scene graph is available for convenience but can be subclassed and overridden, completely replaced, or simply ignored by applications if it is not a good fit.

The major classes involved in the scene graph API are:

Although the analogy is imperfect, the Pose-Model-Entity design pattern is similar to the Model-Viewer-Controller design pattern. Entity combines the operations of a MVC "Viewer" and MVC "Controller" in abstracting an object from the user (here, Scene/GApp). Pose and Model represent the instance-specific and instance-independent state of the MVC "Model".

See also
G3D::Entity, G3D::VisibleEntity, G3D::Camera, G3D::SceneEditorWindow, G3D::SceneVisualizationSettings

Member Typedef Documentation

◆ DependencyList

◆ DependencyTable

List of the names of all entities that must run before a given entity.

This is often empty.

◆ EntityFactory

typedef shared_ptr<Entity>(* G3D::Scene::EntityFactory) (const String &name, Scene *scene, AnyTableReader &propertyTable, const ModelTable &modelTable, const Scene::LoadOptions &options)
See also
registerEntityType

◆ LazyModelFactory

typedef lazy_ptr<Model>(* G3D::Scene::LazyModelFactory) (const String &name, const Any &any)
See also
registerModelType

Member Enumeration Documentation

◆ VisitorState

enum G3D::Scene::VisitorState
protected
Enumerator
NOT_VISITED 
VISITING 
ALREADY_VISITED 

Constructor & Destructor Documentation

◆ Scene()

G3D::Scene::Scene ( const shared_ptr< AmbientOcclusion > &  ambientOcclusion)
protected

Member Function Documentation

◆ _entity()

const shared_ptr<Entity> G3D::Scene::_entity ( const String name) const
protected

◆ appendSceneSearchPaths()

static void G3D::Scene::appendSceneSearchPaths ( const Array< String > &  paths)
static


Directories in addition to the default search directories in which loadScene() and getSceneNames() will search for Scene.Any files.

Called in GApp::loadScene() to add App specific data directories.

◆ clear()

virtual void G3D::Scene::clear ( )
virtual

Remove all objects.

◆ clearOrder()

void G3D::Scene::clearOrder ( const String entity1Name,
const String entity2Name 
)

Removes an existing constraint that entity1 simulate before entity2.

It is an error to remove a constraint that does not exist

◆ contains()

bool G3D::Scene::contains ( const shared_ptr< Camera > &  c) const

◆ create()

static shared_ptr<Scene> G3D::Scene::create ( const shared_ptr< AmbientOcclusion > &  ambientOcclusion)
static
Parameters
ambientOcclusionObject to use for the LightingEnvironment

◆ createEntity() [1/2]

virtual shared_ptr<Entity> G3D::Scene::createEntity ( const String name,
const Any any,
const Scene::LoadOptions options = Scene::LoadOptions() 
)
virtual

Create an Entity and insert() it into the Scene.

See also
registerEntitySubclass, m_modelTable

◆ createEntity() [2/2]

virtual shared_ptr<Entity> G3D::Scene::createEntity ( const String entityType,
const String name,
const Any any,
const Scene::LoadOptions options = Scene::LoadOptions() 
)
virtual

For creating an entity with an explicit type such as Skybox where the any may be a simple filename instead of a named Any::TABLE.

◆ createModel()

virtual lazy_ptr<Model> G3D::Scene::createModel ( const Any v,
const String name 
)
virtual

Adds the model to the model table and returns it.

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ defaultCamera()

const shared_ptr<Camera> G3D::Scene::defaultCamera ( ) const

Returns the default camera, set by defaultCamera = "name" in the Scene file.

◆ description()

const String& G3D::Scene::description ( ) const
inline

◆ editing()

bool G3D::Scene::editing ( ) const
inline

When true, even entities with Entity::canChange = false are allowed to change.

This is primarily used when the developer is actively editing the scene, versus when the program is in its normal operation mode. The SceneEditorWindow GUI will automatically modify this.

◆ entity()

const shared_ptr<Entity> G3D::Scene::entity ( const String name) const
See also
typedEntity

Referenced by getTypedEntityArray(), and typedEntity().

◆ environmentMapAsCubeMap()

shared_ptr<CubeMap> G3D::Scene::environmentMapAsCubeMap ( ) const

Returns the first environmentMap encountered as a CubeMap, or nullptr if there is not one.

◆ eyeRay()

Ray G3D::Scene::eyeRay ( const shared_ptr< Camera > &  camera,
const Vector2 pixel,
const Rect2D viewport,
const Vector2int16  guardBandThickness 
) const


Helper for calling intersect() with an eye ray.

Parameters
pixelThe pixel centers are at (0.5, 0.5). Pixel is taken relative to viewport before the guard band was applied.

◆ getCameraNames()

void G3D::Scene::getCameraNames ( Array< String > &  names) const

Note that because Cameras are Entitys, these also appear in the entity array.

See also
getEntityNames, camera

◆ getDescendants()

void G3D::Scene::getDescendants ( const Array< String > &  root,
Array< String > &  descendants 
) const

Returns a unique set of all (recursive) descendants of the root set, not including the root set, according to setOrder()

See also
setOrder, clearOrder, getEntityArray

◆ getEntityArray() [1/2]

void G3D::Scene::getEntityArray ( Array< shared_ptr< Entity > > &  array) const
inline

Append all Entitys (which include Cameras and Lights) to the array.

See also
getTypedEntityArray

◆ getEntityArray() [2/2]

void G3D::Scene::getEntityArray ( const Array< String > &  names,
Array< shared_ptr< Entity > > &  array 
) const

◆ getEntityNames()

void G3D::Scene::getEntityNames ( Array< String > &  names) const

◆ getTypedEntityArray()

template<class EntitySubclass >
void G3D::Scene::getTypedEntityArray ( Array< shared_ptr< EntitySubclass > > &  array) const
inline


Append all Entitys that are subclasses of EntitySubclass to array.

See also
getEntityArray

◆ getVisibleBounds()

void G3D::Scene::getVisibleBounds ( AABox box) const

◆ insert() [1/2]

virtual shared_ptr<Entity> G3D::Scene::insert ( const shared_ptr< Entity > &  entity)
virtual

Add an Entity to the Scene (and return it).

Assumes that no entity with the same name is present in the scene.

See also
createEntity, remove

◆ insert() [2/2]

virtual shared_ptr<Model> G3D::Scene::insert ( const shared_ptr< Model > &  model)
virtual

Add a Model to the Scene's modelTable() (and return it).

Assumes that no model with the same name is present in the scene.

See also
createModel, modelTable

◆ intersect()

virtual shared_ptr<Entity> G3D::Scene::intersect ( const Ray ray,
float &  distance = ignoreFloat,
bool  intersectMarkers = false,
const Array< shared_ptr< Entity > > &  exclude = Array< shared_ptr< Entity > >(),
Model::HitInfo info = Model::HitInfo::ignore 
) const
virtual

Performs very precise (usually, ray-triangle) intersection, and is much slower than intersectBounds.

If G3D::Model::setUseOptimizedIntersect was set to true before the current scene was loaded then this method will be optimized for run-time performance at the cost of memory and loading time. It may then be called tens of times per frame without significant CPU impact on frame rate.

Invisible VisibleEntitys cannot be hit.

Parameters
intersectMarkersIf true, allow MarkerEntity instances to be intersected. Default is false.
excludeany entity in this array
rayThe Ray in world space.
See also
getDescendants, intersectBounds

◆ intersectBounds()

virtual shared_ptr<Entity> G3D::Scene::intersectBounds ( const Ray ray,
float &  distance = ignoreFloat,
bool  intersectMarkers = false,
const Array< shared_ptr< Entity > > &  exclude = Array< shared_ptr< Entity > >() 
) const
virtual

Returns the Entity whose conservative bounds are first intersected by ray, excluding Entitys in exclude.

Useful for mouse selection and coarse hit-scan collision detection.
Returns nullptr if none are intersected.

Note that this may not return the closest Entity if another's bounds project in front of it.

Invisible VisibleEntitys cannot be hit.

Parameters
rayWorld space ray
distanceMaximum distance at which to allow selection (e.g., finf()). On return, this is the distance to the object.
excludeEntities to ignore when searching for occlusions. This is convenient to use when avoiding self-collisions, for example.
intersectMarkersIf true, allow MarkerEntity instances to be intersected. Default is false.

◆ lastEditingTime()

RealTime G3D::Scene::lastEditingTime ( ) const
inline

Last (wall clock) time that the Scene was in editing() mode.

If the scene is currently being edited, this continuously changes. Allows other code that references the scene to know whether values that it has cached are stale.

◆ lastLightChangeTime()

RealTime G3D::Scene::lastLightChangeTime ( ) const
inline

Does not track changes to environment lighting.

◆ lastStructuralChangeTime()

RealTime G3D::Scene::lastStructuralChangeTime ( ) const
inline

Wall-clock time at which the scene contents last changed, e.g., by reloading, adding or removing Entitys, etc.

Moving objects do not count as structural changes. This is used by the GUI for tracking when to update the SceneEditorWindow, for example.

◆ lastVisibleChangeTime()

RealTime G3D::Scene::lastVisibleChangeTime ( ) const
inline

Wall-clock time at which a VisibleEntity in scene last changed at all, e.g., by moving.

◆ lightingEnvironment() [1/2]

const LightingEnvironment& G3D::Scene::lightingEnvironment ( ) const
inline

◆ lightingEnvironment() [2/2]

LightingEnvironment& G3D::Scene::lightingEnvironment ( )
inline

◆ load()

virtual Any G3D::Scene::load ( const String sceneName,
const LoadOptions loadOptions = LoadOptions() 
)
virtual

Replace the current scene with a new one parsed from a file.

See the starter project for examples Entitys may have already moved since creation because they are simulated for 0s at start.

Parameters
sceneNameThe 'name' field specified inside the scene file, or the filename of the scene file
Returns
The Any from which the scene was parsed. This is useful for reading your own custom fields from.

◆ modelTable()

const ModelTable& G3D::Scene::modelTable ( ) const
inline

◆ name()

const String& G3D::Scene::name ( ) const
inline

Referenced by typedEntity().

◆ onPose()

virtual void G3D::Scene::onPose ( Array< shared_ptr< Surface > > &  surfaceArray)
virtual

◆ onSimulation()

virtual void G3D::Scene::onSimulation ( SimTime  deltaTime)
virtual

◆ registerEntitySubclass()

void G3D::Scene::registerEntitySubclass ( const String name,
EntityFactory  factory,
bool  errorIfAlreadyRegistered = true 
)

Register a new subclass of G3D::Entity so that it can be constructed from a .Scene.Any file.

You can also override Scene::createEntity to add support for new Entity types.

◆ registerModelSubclass()

void G3D::Scene::registerModelSubclass ( const String name,
LazyModelFactory  factory,
bool  errorIfAlreadyRegistered = true 
)

Register a new subclass of G3D::Model so that it can be constructed from a .Scene.Any file.

You can also override Scene::createModel to add support for new Model types.

◆ remove() [1/2]

virtual void G3D::Scene::remove ( const shared_ptr< Entity > &  entity)
virtual

Remove an entity that must already be in the scene.

Does not change the order of the other Entitys in the scene (i.e., entityArray())

Note that removal occurs immediately, so be avoid invoking this in the middle of iterating through entityArray().

See also
insert, createEntity

◆ remove() [2/2]

virtual void G3D::Scene::remove ( const shared_ptr< Model > &  model)
virtual

Remove a model from modelTable.

Does not affect Entitys currently using that model, only ones later instantiated with createEntity().

See also
remove, createModel, modelTable

◆ removeEntity()

virtual void G3D::Scene::removeEntity ( const String entityName)
virtual

◆ removeModel()

virtual void G3D::Scene::removeModel ( const String modelName)
virtual

◆ sceneNames()

static Array<String> G3D::Scene::sceneNames ( )
static

Enumerate the names of all available scenes.

This is recomputed each time that it is called.

◆ sceneNameToFilename()

static String G3D::Scene::sceneNameToFilename ( const String scene)
static

If scene is a filename, returns it, else look up the string in the filename table and return the value.

If no entry exists, throw an exception

◆ setDescription()

void G3D::Scene::setDescription ( const String d)
inline

◆ setEditing()

void G3D::Scene::setEditing ( bool  b)

◆ setOrder()

void G3D::Scene::setOrder ( const String entity1Name,
const String entity2Name 
)


Places a constraint on the Scene that when iterating for simulation, posing, etc., entity1 always be processed before entity2 (although not necessarily immediately before).

It is an error to create a cycle between multiple entities.

This method takes names instead of pointers so that it can be invoked before both entities exist, e.g., during entity creation. If one of the entities is later removed, this constraint is removed.
Useful when entity2 is a child of entity1 and defines itself relative, e.g., entity1 is a jeep and entity2 is a character driving the jeep.

Do not invoke this method unless you actually require an ordering constraint because it causes extra work for the iteration system.

See also
getDescendants

◆ setSceneSearchPaths()

static void G3D::Scene::setSceneSearchPaths ( const Array< String > &  paths)
static


Directories in which loadScene() and getSceneNames() will search for .scn.any files.

By default, the search path for scene files is the current directory (as of the time that the first scene is loaded or getSceneNames() is invoked), the paths specified by the G3D10DATA environment variable, and the directory containing System::findDataFile("scene/CornellBox-Glossy.scn.any") if not already invluded in G3D10Data.

This does not affect the directories that models and include statements search to load other resources.

◆ setTime()

virtual void G3D::Scene::setTime ( const SimTime  t)
virtual

Discontinuously change the current time.

Also invokes onSimulation(time(), nan()) twice so that scene positions and previous positions are updated.

◆ skyboxAsCubeMap()

shared_ptr<CubeMap> G3D::Scene::skyboxAsCubeMap ( ) const

Returns the first skybox encountered as a CubeMap, or nullptr if there is not one.

◆ sortEntitiesByDependency()

void G3D::Scene::sortEntitiesByDependency ( )
protected

If m_needEntitySort, sort Entitys to resolve dependencies and set m_needEntitySort = false.

Called fromOnSimulation

◆ time()

SimTime G3D::Scene::time ( ) const
inline

◆ toAny()

Any G3D::Scene::toAny ( const bool  forceAll = false) const

Creates an Any representing this scene by updating the one from which it was loaded with the current Entity positions.

This will overwrite any #include entries that appeared in the original source Any.

You can obtain the original filename as a.source().filename().

◆ tritree()

const shared_ptr<TriTree>& G3D::Scene::tritree ( )

◆ typedEntity()

template<class EntitySubclass >
const shared_ptr<EntitySubclass> G3D::Scene::typedEntity ( const String name) const
inline

Get an entity by name and downcast to the desired type.

Returns nullptr if the entity does not exist or does not have that type.

◆ visualize()

void G3D::Scene::visualize ( RenderDevice rd,
const shared_ptr< Entity > &  selectedEntity,
const Array< shared_ptr< Surface > > &  allSurfaces,
const SceneVisualizationSettings v,
const shared_ptr< Camera > &  camera 
)

Draws debugging information about the current scene to the render device.

◆ vrSettings()

const VRSettings& G3D::Scene::vrSettings ( ) const
inline

Member Data Documentation

◆ m_ancestorTable

DependencyTable G3D::Scene::m_ancestorTable
protected

Simulation dependencies.

m_ancestorTable[Descendant] includes Ancestor. Used by setOrder and clearOrder

◆ m_cameraArray

Array< shared_ptr<Camera> > G3D::Scene::m_cameraArray
protected

◆ m_defaultCameraName

String G3D::Scene::m_defaultCameraName
protected

◆ m_descendantTable

DependencyTable G3D::Scene::m_descendantTable
protected

◆ m_description

String G3D::Scene::m_description
protected

Referenced by description(), and setDescription().

◆ m_editing

bool G3D::Scene::m_editing
protected

Referenced by editing().

◆ m_entityArray

Array< shared_ptr<Entity> > G3D::Scene::m_entityArray
protected

All Entitys, including Cameras, Lights, and MarkerEntitys.

Referenced by getEntityArray(), and getTypedEntityArray().

◆ m_entityFactory

Table<String, EntityFactory> G3D::Scene::m_entityFactory
protected

◆ m_entityTable

Table<String, shared_ptr<Entity> > G3D::Scene::m_entityTable
protected

All Entitys, including Cameras, Lights, and MarkerEntitys, by name.

◆ m_font

shared_ptr<GFont> G3D::Scene::m_font
protected

◆ m_lastEditingTime

RealTime G3D::Scene::m_lastEditingTime
protected

Referenced by lastEditingTime().

◆ m_lastLightChangeTime

RealTime G3D::Scene::m_lastLightChangeTime
protected

Referenced by lastLightChangeTime().

◆ m_lastStructuralChangeTime

RealTime G3D::Scene::m_lastStructuralChangeTime
protected

◆ m_lastVisibleChangeTime

RealTime G3D::Scene::m_lastVisibleChangeTime
protected

Referenced by lastVisibleChangeTime().

◆ m_localLightingEnvironment

LightingEnvironment G3D::Scene::m_localLightingEnvironment
protected

Referenced by lightingEnvironment().

◆ m_modelFactory

Table<String, LazyModelFactory> G3D::Scene::m_modelFactory
protected

◆ m_modelsAny

Any G3D::Scene::m_modelsAny
protected

◆ m_modelTable

ModelTable G3D::Scene::m_modelTable
protected

Referenced by modelTable().

◆ m_name

String G3D::Scene::m_name
protected

Referenced by name().

◆ m_needEntitySort

bool G3D::Scene::m_needEntitySort
protected

When true, the m_entityArray needs to be re-sorted based on dependencies before iterating.

◆ m_skybox

shared_ptr<Skybox> G3D::Scene::m_skybox
protected

◆ m_sourceAny

Any G3D::Scene::m_sourceAny
protected

The Any from which this scene was constructed.

◆ m_time

SimTime G3D::Scene::m_time
protected

Current time.

Referenced by time().

◆ m_triTree

shared_ptr<TriTree> G3D::Scene::m_triTree
protected

◆ m_vrSettings

VRSettings G3D::Scene::m_vrSettings
protected

Referenced by vrSettings().


documentation generated on Wed Nov 24 2021 08:02:00 using doxygen 1.8.15