Carna  Version 3.3.2
Classes | Public Member Functions | Protected Member Functions | List of all members
Carna::base::GeometryFeature Class Referenceabstract

Represents "components" that are aggregated by Geometry objects. Closer description is given here. More...

#include <GeometryFeature.h>

+ Inheritance diagram for Carna::base::GeometryFeature:

Classes

class  ManagedInterface
 Represents an acquisition of the video resources from a particular GeometryFeature. This acquisition realizes the RAII idiom. More...
 

Public Member Functions

unsigned int videoResourceAcquisitionsCount () const
 Tells current number of video resource acquisitions.
 
virtual bool controlsSameVideoResource (const GeometryFeature &other) const =0
 Tells whether this instance maintains the same video resources like other.
 
void release ()
 Denotes that this object is no longer required and may be deleted as soon as it is valid to delete it. More...
 
void addTo (Geometry &sceneGraphNode, unsigned int role)
 Puts this geometry feature on the sceneGraphNode. More...
 
void removeFrom (Geometry &sceneGraphNode)
 Removes this geometry feature from the sceneGraphNode. More...
 
virtual ManagedInterfaceacquireVideoResource ()=0
 Acquires the video resources from this GeometryFeature by returning new instance of a class derived from ManagedInterface, that realizes the RAII idiom. Refer to its documentation for details. May return nullptr if this GeometryFeature does not provide any video resources.
 

Protected Member Functions

 GeometryFeature ()
 Instantiates.
 
virtual ~GeometryFeature ()
 Deletes and logs an error if video resources are leaked.
 

Detailed Description

Represents "components" that are aggregated by Geometry objects. Closer description is given here.

Author
Leonid Kostrykin
Date
1.3.15 - 13.3.15

Definition at line 41 of file GeometryFeature.h.

Member Function Documentation

◆ addTo()

void Carna::base::GeometryFeature::addTo ( Geometry sceneGraphNode,
unsigned int  role 
)

Puts this geometry feature on the sceneGraphNode.

This is equivalent to Geometry::putFeature.

◆ release()

void Carna::base::GeometryFeature::release ( )

Denotes that this object is no longer required and may be deleted as soon as it is valid to delete it.

It will be deleted as soon as the following conditions become true, which may also be immediately:

  • The video resources are not loaded, i.e. the last acquisition was released.
  • This feature is no longer referenced by a scene graph.

◆ removeFrom()

void Carna::base::GeometryFeature::removeFrom ( Geometry sceneGraphNode)

Removes this geometry feature from the sceneGraphNode.

This is equivalent to Geometry::removeFeature.


The documentation for this class was generated from the following file: