Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Scene Class Reference

#include <Scene.h>

Collaboration diagram for Scene:

Collaboration graph
[legend]
List of all members.

Signals

void sceneMoved (const MyDataTypes::TransformationMatrix16f transformationMatrix)
void objectMoved ()
void objectModified (bool samplingPatternAltered=false)
void activeObjectAboutToChange ()
void activeObjectChanged ()
void objectRenamed ()
void objectAdded ()
void objectRemoved ()
void renderFrame ()

Public Methods

CORE_API void setAutoDelete (const bool enable)
CORE_API bool isAutoDelete () const
CORE_API uint getNofObjects () const
CORE_API uint getNofSurfels ()
CORE_API QString getUniqueName (const QString name)
CORE_API QString addObject (Object *newObject, const bool makeActive=true, const bool emitSignal=true)
CORE_API void removeObject (Object *object, const bool emitSignal=true)
CORE_API void reset (const bool emitSignal=true, const bool renderFrame=true)
CORE_API ObjectgetFirstObject ()
CORE_API ObjectgetNextObject ()
CORE_API void setActiveObject (const QString objectName, const bool renderFrame=true)
CORE_API ObjectgetActiveObject () const
CORE_API int getActiveObjectID () const
CORE_API void setRotation (const float angle, const float x, const float y, const float z, const bool emitSignal=true)
CORE_API void rotate (const float dAngle, const float x, const float y, const float z, const bool emitSignal=true)
CORE_API void setTranslation (const float x, const float y, const float z, const bool emitSignal=true)
CORE_API void translate (const float dx, const float dy, const float dz, const bool emitSignal=true)
CORE_API void setScale (const float scaleX, const float scaleY, const float scaleZ, const bool emitSignal=true)
CORE_API void scale (const float dScaleX, const float dScaleY, const float dScaleZ, const bool emitSignal=true)
CORE_API void getScaleMatrix (MyDataTypes::TransformationMatrix16f scaleMatrix) const
CORE_API void getTranslationMatrix (MyDataTypes::TransformationMatrix16f translationMatrix) const
CORE_API void getRotationMatrix (MyDataTypes::TransformationMatrix16f rotationMatrix) const
CORE_API void setCameraPosition (const MyDataTypes::CameraPosition cameraPosition, const bool emitSignal=true)
CORE_API MyDataTypes::CameraPosition getCameraPosition () const
CORE_API void getTransformationMatrix (MyDataTypes::TransformationMatrix16f transformationMatrix)
CORE_API void setSurfelPropertyDescriptor (const SurfelInterface::PropertyDescriptor newPropertyDescriptor)
CORE_API void requestSurfelPropertyDescriptor (const SurfelInterface::PropertyDescriptor requestedPropertyDescriptor)
CORE_API SurfelInterface::PropertyDescriptor getSurfelPropertyDescriptor () const
CORE_API void setSurfelPosition (SurfelInterface *surfel, const Vector3D newPosition, const bool emitSignal=true)
CORE_API void setSurfelNormal (SurfelInterface *surfel, const Vector3D newNormal, const bool emitSignal=true)
CORE_API void setSurfelTangentAxes (SurfelInterface *surfel, const Vector3D newAxisOne, const Vector3D newAxisTwo, const bool emitSignal=true)
CORE_API void setSurfelRadius (SurfelInterface *surfel, const float newRadius, const bool emitSignal=true)
CORE_API void setSurfelDiffuseColor (SurfelInterface *surfel, const QRgb newDiffuseColor, const bool emitSignal=true)
CORE_API void setSurfelSpecularColor (SurfelInterface *surfel, const QRgb newDiffuseColor, const bool emitSignal=true)
CORE_API void setSurfelFlagOn (SurfelInterface *surfel, const SurfelInterface::Flag flags, const bool on, const bool emitSignal=true)
CORE_API void setSurfelFlags (SurfelInterface *surfel, const SurfelInterface::Flags newFlags, const bool emitSignal=true)
CORE_API void setAllSurfelFlagsOn (const SurfelInterface::Flags newFlags, const bool on, const bool emitSignal=true)
CORE_API void setSurfelAmbientCoefficient (SurfelInterface *surfel, const float newAmbientCoefficient, const bool emitSignal=true)
CORE_API void setSurfelDiffuseCoefficient (SurfelInterface *surfel, const float newDiffuseCoefficient, const bool emitSignal=true)
CORE_API void setSurfelSpecularCoefficient (SurfelInterface *surfel, const float newSpecularCoefficient, const bool emitSignal=true)
CORE_API void setSurfelShininess (SurfelInterface *surfel, const float newShininess, const bool emitSignal=true)
CORE_API void setSurfelTextureCoordinate (SurfelInterface *surfel, const MyDataTypes::TextureCoordinate newTextureCoordinate, const bool emitSignal=true)
CORE_API void removeSurfels (const QVector< SurfelInterface > *surfels, const bool emitSignal=true)
CORE_API void removeSurfels (SurfelInterface::Flag flag, const bool emitSignal=true)
CORE_API void removeSurfels (Object *object, QList< SurfelInterface > *surfels, const bool emitSignal=true)
CORE_API void removeSurfels (QArray< SurfelInterface * > surfels, const int nofSurfels, const bool emitSignal=true)
CORE_API void emitObjectModifiedSignal (bool samplingPatternAltered=false)
CORE_API void emitRenderFrameSignal ()

Static Public Methods

CORE_API Scene * getInstance ()
CORE_API void destroyInstance ()

Protected Methods

virtual ~Scene ()

Private Slots

void handleSurfelTypeChanged (const SurfelInterface::PropertyDescriptor newPropertyDescriptor)
void handleObjectModified ()
void handleObjectRenamed ()
void handleObjectMoved ()

Private Methods

 Scene ()
void updateTransformationMatrix ()
void setAllPropertyDescriptors (const SurfelInterface::PropertyDescriptor newPropertyDescriptor)

Private Attributes

QList< Objectobjects
ObjectactiveObject
int activeObjectID
MyDataTypes::CameraPosition cameraPosition
MyDataTypes::TransformationMatrix16f transformationMatrix
bool isTransformationMatrixValid

Detailed Description

The Scene contains all the Objects to be rendered. It makes sure that all SurfelInterfaces within this Scene have the same type, that is that they all support the same properties such as diffuse color, splat radius and position and provides methods to convert all SurfelInterfaces into the requested type.

All properties of the SurfelInterfaces are manipulated via this Scene, as to make sure that signal listeners are properly informed on changing a SurfelCollection. Signal listeners need only connect to the signals as sent by this Scene:

The RendererManager connects to the signals sceneMoved and objectMoved and updates the scene view matrices in the current main or preview renderer (whichever is active) and updates the scene Transformer as well. It also connects to the renderFrame signal and lets the current main or preview renderer render the frame, so renderers should only connect to these signals as to update internal data structures such as GL display lists, not as to render the frame themselves since this is handled by the RendererManager. As for the auxiliary renderer though it is up to whoever uses it to update it as needed.

Note: All transformation matrices are column major order and the coordinate system is a right-handed system (like in OpenGL).

Airliner: And from the pilot during his welcome message: "Foo airlines is pleased to have some of the best flight attendants in the industry. Unfortunately, none of them are on this flight!"

Author:
Oliver Knoll, Mark Pauly
Version:
1.2
See also:
Object , SurfelCollection , SurfelInterface


Constructor & Destructor Documentation

Scene::Scene   [private]
 

virtual Scene::~Scene   [protected, virtual]
 


Member Function Documentation

void Scene::activeObjectAboutToChange   [signal]
 

Emitted whenever the active object is about to change, i.e., immediately before the active object actually changes. This signal is caught e.g. by the MarkerManager, that removes all 3D markers upon receipt of the signal.

void Scene::activeObjectChanged   [signal]
 

Emitted whenever the active Object has changed.

CORE_API QString Scene::addObject Object   newObject,
const bool    makeActive = true,
const bool    emitSignal = true
 

Adds the newObject to this Scene. This method returns the Object's name which is guaranteed to be unique within this Scene (the same value which the convenience method getUniqueName would return). Usually this is the name of the Object itself, but if the object is inserted twice, the second name will become object_002, the third name object_003 and so on.

Note 1: if the newObject is the first Object to be inserted it will automatically become the active Object, regardless of the settings of makeActive! This guarantees that there's always an active Object, except if there's no Object at all. Note 2: The signals activeObjectAboutToChange and activeObjectChanged are sent regardless of emitSignal

Signals:

  • activeObjectAboutToChange
  • activeObjectChanged
  • objectAdded
  • renderFrame
Parameters:
newObject  a pointer to a new Object to be inserted
makeActive  set to true if the newly inserted newObject should be the new active object
emitSignal  set to false if the signal objectAdded and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution; note that the signals activeObjectAboutToChange and activeObjectChanged are sent regardless of emitSignal, if makeActive is set to true
Returns:
a QString specifying the unique name of the newObject
See also:
getActiveObject , activeObjectAboutToChange , activeObjectChanged , objectAdded , renderFrame

CORE_API void Scene::destroyInstance   [static]
 

Destroys the instance of this Scene, if there is any.

CORE_API void Scene::emitObjectModifiedSignal bool    samplingPatternAltered = false
 

Forces the signal objectModified to be emitted. Useful if an unknown number of SurfelInterface are going to be modified and each operation suppresses this signal.

Parameters:
samplingPatternAltered  true if the sampling pattern has been altered
Attention: Use with caution! Don't forget to emit the signal objectModified!

See also:
objectModified

CORE_API void Scene::emitRenderFrameSignal  
 

Forces the signal renderFrame to be emitted.

See also:
renderFrame

CORE_API Object* Scene::getActiveObject   const
 

Returns the active Object, that is the Object which is affected by all manipulations such as adding or removing of SurfelInterfaces. Is only 0 if there are no Objects in this Scene

Returns:
a pointer to the active Object; is 0 if there are no Objects in this Scene
See also:
getActiveObjectID

CORE_API int Scene::getActiveObjectID   const
 

Gets the ID of the active Object. Each Object has an ID (and index), the first Object has ID = 0, the second ID = 1 and so on. This is useful if a QComboBox containing all Objects has to be updated.

Returns:
the ID of the active Object; -1 if there are no Objects at all
See also:
getActiveObject

CORE_API MyDataTypes::CameraPosition Scene::getCameraPosition   const
 

Gets the camera position. Note that getTransformationMatrix returns the final transformation matrix, which is F = ST * R, where ST is the combined scale and translation matrix and R the rotation matrix, both which describe the CameraPosition.

Parameters:
cameraPosition  the CameraPosition where the camera position is stored into
See also:
getTransformationMatrix , getScaleMatrix , getTranslationMatrix , getRotationMatrix

CORE_API Object* Scene::getFirstObject  
 

Returns the first Object in this Scene and sets the internal iterator to it. Returns 0 if there are no Objects in this Scene.

Returns:
a pointer to the first Object in this Scene; 0 if there are no Objects
See also:
getNextObject

CORE_API Scene* Scene::getInstance   [static]
 

Creates an instance of this Scene, if necessary, and returns it.

Returns:
an instance of this RendererManager

CORE_API Object* Scene::getNextObject  
 

Returns the next Object in this Scene and sets the internal iterator to it. May be 0.

Attention: If new Objects are added or removed, the internal iterator is not invalidated - however no guarantee can be made about the order in which the remaining Objects are traversed or that these newly added Objects are returned at all, unless getFirstObject is called and the whole Scene is traversed from the beginning again with succesive calls to getNextObject.

Returns:
a pointer to the next Object; 0 is returned if there are no more )Objects to be returned
See also:
getFirstObject

CORE_API uint Scene::getNofObjects   const
 

Returns the number of Objects in this Scene.

Returns:
the number of Objects in this Scene

CORE_API uint Scene::getNofSurfels  
 

Returns the number of SurfelInterfaces in this Scene, that is the sum of all SurfelInterfaces in all Objects in this Scene.

Returns:
the number of SurfelInterfaces in this Scene

CORE_API void Scene::getRotationMatrix MyDataTypes::TransformationMatrix16f    rotationMatrix const
 

Gets a TransformationMatrix16f which describes the Scene's rotation in the Scene (world) coordinate system and stores the result in rotationMatrix.

Parameters:
rotationMatrix  a TransformationMatrix16f where the rotation matrix is stored into

CORE_API void Scene::getScaleMatrix MyDataTypes::TransformationMatrix16f    scaleMatrix const
 

Gets a TransformationMatrix16f which describes the Scene's scale in the Scene (world) coordinate system and stores the result in scaleMatrix.

Parameters:
scaleMatrix  a TransformationMatrix16f where the scale matrix is stored into

CORE_API SurfelInterface::PropertyDescriptor Scene::getSurfelPropertyDescriptor   const
 

This is a convencience method which returns the PropertyDescriptor of the SurfelCollection of the first Object in this Scene. It is equivalent with calling getPropertyDescriptor on any SurfelCollection in this Scene, since they have all the same PropertyDescriptors. If there is no Object in this Scene the returned value is NO_PROPERTIES.

Returns:
the PropertyDescriptor of the SurfelCollection of the first Object in this Scene which consists of up to 32 OR'ed Properties; NO_PROPERTIES is returned when there are no Objects in this Scene

CORE_API void Scene::getTransformationMatrix MyDataTypes::TransformationMatrix16f    transformationMatrix
 

Gets a TransformationMatrix16f which describes the Scene's final transformation F in the Scene (world) coordinate system and stores the result in transformationMatrix: F = S * T * R, where S is the scale matrix, T the translation matrix and R the rotation matrix. Both the combined scale and transformation matrix ST and the rotation matrix R can also be queried with getCameraPosition.

Parameters:
transformationMatrix  a TransformationMatrix16f where the final transformation matrix is stored into
See also:
getScaleMatrix , getTranslationMatrix , getRotationMatrix , getCameraPosition

CORE_API void Scene::getTranslationMatrix MyDataTypes::TransformationMatrix16f    translationMatrix const
 

Gets a TransformationMatrix16f which describes the Scene's translation in the Scene (world) coordinate system and stores the result in translationMatrix.

Parameters:
translationMatrix  a TransformationMatrix16f where the translation matrix is stored into

CORE_API QString Scene::getUniqueName const QString    name
 

A convenience method which returns a name which is guaranteed to be unique within this Scene, given the name to be tested:

  • if name doesn't exist yet in this Scene, name is simply returned.
  • if name is a null string, then object_n is returned, where n is a sequence number such as 0001 which is guaranteed to be unique.
  • if name exists already, a sequence number of the form _n is appended, where n is a sequence number such as 0001 which is guaranteed to be unique.
Parameters:
name  a QString containing the name to be tested for uniqueness; may be a null string
Returns:
a QString containing the unique name, based on name

void Scene::handleObjectModified   [private, slot]
 

void Scene::handleObjectMoved   [private, slot]
 

void Scene::handleObjectRenamed   [private, slot]
 

void Scene::handleSurfelTypeChanged const SurfelInterface::PropertyDescriptor    newPropertyDescriptor [private, slot]
 

CORE_API bool Scene::isAutoDelete   const
 

Returns the state of autoDelete.

Returns:
true, if Objects are deleted when removed; false else

void Scene::objectAdded   [signal]
 

Emitted whenever one or more Objects have been added to this Scene.

void Scene::objectModified bool    samplingPatternAltered = false [signal]
 

Emitted whenever one or more Objects in the Scene have been modified. This can happen for the following reasons:

Parameters:
samplingPatternAltered  true if the sampling pattern has been altered
Note: RendererInterfaces need only connect to this objectModified signal, not to the signals sent by the individual Objects, since those signals are internally re-sent via this Scene, so the RendererInterfaces get informed only once when they need to re-render the Scene.

void Scene::objectMoved   [signal]
 

Emitted whenever the Objects in the Scene have been rotated, translated or scaled.

Note: RendererInteraces need only connect to this objectMoved signal, not to the signals sent by the individual Objects, since those signals are internally re-sent via this Scene, so the RendererInteraces get informed only once when they need to re-render the Scene.

void Scene::objectRemoved   [signal]
 

Emitted whenever one or more Objects have been removed from this Scene.

void Scene::objectRenamed   [signal]
 

Emitted whenever one or more Objects in the Scene have been renamed.

CORE_API void Scene::removeObject Object   object,
const bool    emitSignal = true
 

Removes the object from this Scene. The object is deleted if autoDelete is turned on. If the object was the active Object the new active Object will become the first available Object in this Scene (or 0 if there are no more Objects).

Note: The signals activeObjectAboutToChange and activeObjectChanged are sent regardless of emitSignal

Signals:

  • activeObjectAboutToChange
  • activeObjectChanged
  • objectRemoved
  • renderFrame
Parameters:
object  a pointer to an Object to be removed; if autoDelete is turned on the pointer is invalid after this operation
emitSignal  set to false if the signal objectRemoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution; note that the signals activeObjectAboutToChange and activeObjectChanged are sent regardless of emitSignal, if needed
See also:
setAutoDelete , activeObjectAboutToChange , activeObjectChanged , objectRemoved , renderFrame

CORE_API void Scene::removeSurfels QArray< SurfelInterface * >    surfels,
const int    nofSurfels,
const bool    emitSignal = true
 

Removes the surfels from the SurfelCollections of all Objects in this Scene.

Note: if you want to remove the surfels from the active Object it is far more efficient to call removeSurfels on its SurfelCollection instead!

Signals:

  • objectModified
  • renderFrame
Parameters:
surfels  a QArray<SurfelInterface> which contains pointers to the SurfelInterface to be removed from all Objects in this Scene
nofSurfels  the number of SurfelInterfaces in surfels
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
SurfelCollection::removeSurfels , getActiveObject , objectModified , renderFrame

CORE_API void Scene::removeSurfels Object   object,
QList< SurfelInterface > *    surfels,
const bool    emitSignal = true
 

Removes the surfels from the SurfelCollections of the Object.

Signals:

  • objectModified
  • renderFrame
Parameters:
object  the Object from which the surfels have to be removed
surfels  a pointer to a QList<SurfelInterface> which contains the SurfelInterface to be removed from the Object
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
SurfelCollection::removeSurfels , objectModified , renderFrame

CORE_API void Scene::removeSurfels SurfelInterface::Flag    flag,
const bool    emitSignal = true
 

Removes the surfels from the SurfelCollections of all Objects in this Scene for which flag is true.

Signals:

  • objectModified
  • renderFrame
Parameters:
flag  The SurfelInterface flag that specifies which surfels should be deleted
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
SurfelCollection::removeSurfels , objectModified , renderFrame

CORE_API void Scene::removeSurfels const QVector< SurfelInterface > *    surfels,
const bool    emitSignal = true
 

Removes the surfels from the SurfelCollections of all Objects in this Scene.

Note: if you want to remove the surfels from the active Object it is far more efficient to call removeSurfels on its SurfelCollection instead!

Signals:

  • objectModified
  • renderFrame
Parameters:
surfels  a pointer to a QVector<SurfelInterface> which contains the SurfelInterface to be removed from all Objects in this Scene
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
SurfelCollection::removeSurfels , getActiveObject , objectModified , renderFrame

void Scene::renderFrame   [signal]
 

This signal is emitted whenever this Scene needs to be re-rendered.

Note: The RendererManager connects to this signal and lets the main and preview RendererInterface render the image.

CORE_API void Scene::requestSurfelPropertyDescriptor const SurfelInterface::PropertyDescriptor    requestedPropertyDescriptor
 

This method requests that all SurfelInterfaces support at least the properties as given in requestedPropertyDescriptor. ToolInterfaces or PluginInterfaces should call this method as to make sure that the properties they want to modify are supported by the SurfelInterfaces in this Scene. The SurfelInterfaces are only converted if they do not support at least one property given in requestedPropertyDescriptor.

Signals:

  • objectModified
  • renderFrame
Parameters:
requestedPropertyDescriptor  the PropertyDescriptor which consists of up to 32 OR'ed Properties which should be at least supported by the SurfelInterfaces in this Scene
See also:
SurfelInterface::Property , setSurfelPropertyDescriptor , objectModified , renderFrame

CORE_API void Scene::reset const bool    emitSignal = true,
const bool    renderFrame = true
 

Removes all Objects from this Scene. The Objects are deleted if autoDelete is turned on. Additionally the camera is positioned into the home position.

Note 1: The signals sceneMoved and objectModified are not emitted. Note 2: The signals activeObjectAboutToChange and activeObjectChanged are sent regardless of emitSignal

Signals:

  • activeObjectAboutToChange
  • activeObjectChanged
  • objectRemoved
  • sceneMoved
  • renderFrame
Parameters:
emitSignal  set to false if the signals objectRemoved and sceneMoved should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
renderFrame  set to false if the signal renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
Configuration::getHomePosition , setAutoDelete , objectRemoved , sceneMoved , renderFrame

CORE_API void Scene::rotate const float    dAngle,
const float    x,
const float    y,
const float    z,
const bool    emitSignal = true
 

Rotates this Scene relatively counter-clockwise angle radians around the rotation axis [x, y, z], which goes through the Scene's center of gravity.

Signals:

  • sceneMoved
  • renderFrame
Parameters:
dAngle  the angle in radians, which defines the relative counter-clockwise rotation
x  the x-component of the rotation axis
y  the y-component of the rotation axis
z  the z-component of the rotation axis
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

CORE_API void Scene::scale const float    dScaleX,
const float    dScaleY,
const float    dScaleZ,
const bool    emitSignal = true
 

Scales this Scene relatively by the vector [dScaleX, dScaleY, dScaleZ].

Signals:

  • sceneMoved
  • renderFrame
Parameters:
dScaleX  the relative x-component of the scale vector
dScaleY  the relative y-component of the scale vector
dScaleZ  the relative z-component of the scale vector
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

void Scene::sceneMoved const MyDataTypes::TransformationMatrix16f    transformationMatrix [signal]
 

Emitted whenever the Scene has been rotated, moved or scaled, that is if only the Scene transformation matrix has been changed. A re-rendering of the image is therefore necessary which is triggered by the RendererManager.

Note: The RendererManager connects to this signal and makes sure that the proper Scene transformation matrix is set in the RendererInterface and has the Scene re-rendered, so there is no need for RendererInteraces to connect to this signal and re-render the Scene.

Parameters:
transformationMatrix  the TransformationMatrix16f which describes the Scene's final transformation
See also:
getTransformationMatrix , RendererManager

CORE_API void Scene::setActiveObject const QString    objectName,
const bool    renderFrame = true
 

Sets the Object identified by its objectName active. All Object manipulations such as adding or removing SurfelInterfaces should affect the active Object. It's up to the RendererInterface to render all other inactive Objects visually differently.

Signals:

  • activeObjectAboutToChange
  • activeObjectChanged
  • renderFrame
Parameters:
objectName  a QString which identifies the Object
renderFrame  set to false if the signal renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
activeObjectAboutToChange , activeObjectChanged , renderFrame

void Scene::setAllPropertyDescriptors const SurfelInterface::PropertyDescriptor    newPropertyDescriptor [private]
 

CORE_API void Scene::setAllSurfelFlagsOn const SurfelInterface::Flags    newFlags,
const bool    on,
const bool    emitSignal = true
 

Sets the flags of all the SurfelInterfaces in this Scene to newFlags

Signals:

  • objectModified
  • renderFrame
Parameters:
newFlags  the Flags to be set
on  the new value of the flags
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setAutoDelete const bool    enable
 

Enables autoDelete, that is, if enable is set to true, the Objects are deleted when they are removed from this Scene or this Scene itself is deleted. By default autoDelete is turned on.

Parameters:
enable  set to true if Objects are to be deleted when they are removed from this Scene or this Scene itself is deleted

CORE_API void Scene::setCameraPosition const MyDataTypes::CameraPosition    cameraPosition,
const bool    emitSignal = true
 

Sets the absolute camera position. The camera can also be positioned with setTransformation, setRotation and setScale.

Signals:

  • sceneMoved
  • renderFrame
Parameters:
cameraPosition  the CameraPosition which defines the absolute position of the camera
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
setTransformation , setRotation , setScale , sceneMoved , renderFrame

CORE_API void Scene::setRotation const float    angle,
const float    x,
const float    y,
const float    z,
const bool    emitSignal = true
 

Rotates this Scene absolutely counter-clockwise angle radians around the rotation axis [x, y, z], which goes through the Scene's center of gravity.

Signals:

  • sceneMoved
  • renderFrame
Parameters:
angle  the angle in radians, which defines the absolute counter-clockwise rotation
x  the x-component of the rotation axis
y  the y-component of the rotation axis
z  the z-component of the rotation axis
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

CORE_API void Scene::setScale const float    scaleX,
const float    scaleY,
const float    scaleZ,
const bool    emitSignal = true
 

Scales this Scene absolutely by the vector [scaleX, scaleY, scaleZ].

Signals:

  • sceneMoved
  • renderFrame
Parameters:
scaleX  the absolute x-component of the scale vector
scaleY  the absolute y-component of the scale vector
scaleZ  the absolute z-component of the scale vector
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

CORE_API void Scene::setSurfelAmbientCoefficient SurfelInterface   surfel,
const float    newAmbientCoefficient,
const bool    emitSignal = true
 

Sets the ambient coefficient of the surfel to newAmbientCoefficient.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newAmbientCoefficient  the new ambient coefficient in [0.0, 1.0]
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelDiffuseCoefficient SurfelInterface   surfel,
const float    newDiffuseCoefficient,
const bool    emitSignal = true
 

Sets the diffuse coefficient of the surfel to newDiffuseCoefficient.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newDiffuseCoefficient  the new diffuse coefficient in [0.0, 1.0]
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelDiffuseColor SurfelInterface   surfel,
const QRgb    newDiffuseColor,
const bool    emitSignal = true
 

Sets the diffuse color of the surfel to newDiffuseColor.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newDiffuseColor  the new QRgb diffuse color of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelFlagOn SurfelInterface   surfel,
const SurfelInterface::Flag    flags,
const bool    on,
const bool    emitSignal = true
 

Sets the flags specified by flags of the surfel to the value on.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
flags  the Flags to be set
on  the new value of the flags
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelFlags SurfelInterface   surfel,
const SurfelInterface::Flags    newFlags,
const bool    emitSignal = true
 

Sets the flags of the surfel to newFlags

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newFlags  the Flags to be set
on  the new value of the flags
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelNormal SurfelInterface   surfel,
const Vector3D    newNormal,
const bool    emitSignal = true
 

Sets the normal of the surfel to newNormal.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newNormal  a Vector3D specifying the new normal of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelPosition SurfelInterface   surfel,
const Vector3D    newPosition,
const bool    emitSignal = true
 

Sets the position of the surfel to newSurfelPosition.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newPosition  a Vector3D specifying the new position of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelPropertyDescriptor const SurfelInterface::PropertyDescriptor    newPropertyDescriptor
 

This is a convenience method which sets the newPropertyDescriptor for the SurfelCollections of all Objects in this Scene, that is if the existing PropertyDescriptor is different from newPropertyDescriptor then the SurfelInterfaces are converted. It is equivalent with calling setPropertyDescriptor on one of the SurfelCollections in this Scene, since all SurfelCollections in this Scene must have the same type of SurfelInterfaces. This Scene takes care of that.

Note: As to make sure that the SurfelInterfaces in this Scene support at least certain properties call requestSurfelPropertyDescriptor instead as to save conversion time.

Signals:

  • objectModified
  • renderFrame
Parameters:
newPropertyDescriptor  the PropertyDescriptor which consists of up to 32 OR'ed Properties
See also:
SurfelInterface::Property , SurfelCollection::setPropertyDescriptor , requestSurfelPropertyDescriptor , objectModified , renderFrame

CORE_API void Scene::setSurfelRadius SurfelInterface   surfel,
const float    newRadius,
const bool    emitSignal = true
 

Sets the radius of the surfel to newRadius.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newRadius  the new radius of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelShininess SurfelInterface   surfel,
const float    newShininess,
const bool    emitSignal = true
 

Sets the shininess of the surfel to newShininess.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newShininess  the new shininess in [0.0, 1.0]
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelSpecularCoefficient SurfelInterface   surfel,
const float    newSpecularCoefficient,
const bool    emitSignal = true
 

Sets the specular coefficient of the surfel to newSpecularCoefficient.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newSpecularCoefficient  the new specular coefficient in [0.0, 1.0]
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelSpecularColor SurfelInterface   surfel,
const QRgb    newDiffuseColor,
const bool    emitSignal = true
 

Sets the specular color of the surfel to newSpecularColor.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newSpecularColor  the new QRgb specular color of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelTangentAxes SurfelInterface   surfel,
const Vector3D    newAxisOne,
const Vector3D    newAxisTwo,
const bool    emitSignal = true
 

Sets the tangent axes of the surfel to newAxisOne and newAxisTwo.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newAxisOne  a Vector3D specifying the new tangent axis 1 of the surfel
newAxisTwo  a Vector3D specifying the new tangent axis 2 of the surfel
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setSurfelTextureCoordinate SurfelInterface   surfel,
const MyDataTypes::TextureCoordinate    newTextureCoordinate,
const bool    emitSignal = true
 

Sets the texture coordinate of the surfel to newTextureCoordinate.

Signals:

  • objectModified
  • renderFrame
Parameters:
surfel  a pointer to a SurfelInterface to be changed
newTextureCoordinate  the TextureCoordinate in [[0.0, 1.0], [0.0, 1.0]]
emitSignal  set to false if the signal objectModified and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
objectModified , renderFrame

CORE_API void Scene::setTranslation const float    x,
const float    y,
const float    z,
const bool    emitSignal = true
 

Translates this Scene absolutely by the vector [x, y, z], that is the new position of the Scene is defined by this vector.

Signals:

  • sceneMoved
  • renderFrame
Parameters:
dx  the relative x-component of the translation vector
dy  the relative y-component of the translation vector
dz  the relative z-component of the translation vector
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

CORE_API void Scene::translate const float    dx,
const float    dy,
const float    dz,
const bool    emitSignal = true
 

Translates this Scene relatively by the vector [dx, dy, dz].

Signals:

  • sceneMoved
  • renderFrame
Parameters:
dx  the relative x-component of the translation vector
dy  the relative y-component of the translation vector
dz  the relative z-component of the translation vector
emitSignal  set to false if the signal sceneMoved and renderFrame should be supressed; useful if multiple operations have to be done before the image gets re-rendered; use with caution
See also:
sceneMoved , renderFrame

void Scene::updateTransformationMatrix   [inline, private]
 


Member Data Documentation

Object* Scene::activeObject [private]
 

int Scene::activeObjectID [private]
 

MyDataTypes::CameraPosition Scene::cameraPosition [private]
 

bool Scene::isTransformationMatrixValid [private]
 

QList<Object> Scene::objects [private]
 

MyDataTypes::TransformationMatrix16f Scene::transformationMatrix [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 30 15:55:22 2002 for PointShop by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002