C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
VSN::SceneSegment Class Reference

SceneSegment class is the base class for all segments in the scene graph. More...

#include <vsn_scenesegment.h>

+ Inheritance diagram for VSN::SceneSegment:
+ Collaboration diagram for VSN::SceneSegment:

Public Member Functions

 SceneSegment (SceneSegment *pParent=nullptr)
 Default constructor.
 
 SceneSegment (const NodeKey &key, SceneSegment *pParent=nullptr)
 Special constructor with segment data. More...
 
 SceneSegment (SceneSegmentData *pSegmentData, SceneSegment *pParent=nullptr)
 Special constructor with segment data. More...
 
 SceneSegment (SceneSegmentData *pSegmentData, const NodeKey &key)
 Special constructor with segment data and segment identifier. More...
 
 SceneSegment (GeometryRep *pRep, SceneSegment *pParent=nullptr)
 Special constructor with representation. More...
 
 SceneSegment (GeometryRep *pRep, const NodeKey &key, SceneSegment *pParent=nullptr)
 Special constructor with representation. More...
 
virtual ~SceneSegment ()
 Destructor.
 
const Matrix3DFGetAbsoluteMatrix () const
 Returns absolute matrix of segment. More...
 
Features::TransformGetTransform () const
 Returns relative matrix of segment. More...
 
bool HasRep () const
 Checks if segment has representation. More...
 
bool HasRenderObject () const
 Checks if segment has RenderObject. More...
 
SceneSegmentDataGetSegmentData () const
 Returns pointer to segment data.
 
bool HasSegments () const
 True if segment has subsegments.
 
bool CanInsertToSegment (SceneSegment *pSegment) const
 Checks if segment can be added to segment array. More...
 
SceneSegmentGetParentSegment () const
 Returns pointer to parent segment.
 
std::list< SceneSegment * > GetAncestorsSegment () const
 Returns all parents for segment.
 
std::list< SceneSegment * > GetChildSegments () const
 Returns array of scene segments.
 
std::list< SceneSegment * > GetSubSegments () const
 Returns array of all subsegments for this segment.
 
size_t GetFaceCount () const
 Returns count of representation faces for this segment.
 
size_t GetVertexCount () const
 Returns count of representation vertexes for this segment.
 
size_t GetMaterialCount () const
 Returns count of representation materials for this segment.
 
std::set< Material * > GetMaterials () const
 Returns array of representation materials for this segment.
 
void SetColorPresentationMaterial (const Color &color)
 NOT TRANSLATED.
 
bool IsVisible () const
 Get the visibility state of the segment considering the parent elements.
 
MbCube GetBoundingBox () const
 Returns bounding box of segment.
 
size_t GetSegmentNumber () const
 Returns number of segments.
 
const RenderStateGetRenderState () const
 Returns pointer to rendering state.
 
size_t GetCountSegmentsOfLine () const
 Returns count of subsegments in this segment.
 
bool IsIndependentCreationObject3D () const
 Returns flag for independent creation of RenderObject.
 
void SetIndependentCreateViewObject (bool bIndependent)
 Sets flag for automatic creation of RenderObject. More...
 
ptrdiff_t GetIndexOf (const SceneSegment *pSegment) const
 Returns index of segment in array of specified segment. More...
 
bool ExistSegment (const SceneSegment *pSegment) const
 Returns flag for existence of specified segment in this segment. More...
 
SceneSegmentRefreshAbsoluteMatrix ()
 Refreshes absolute matrix.
 
SceneSegmentRefreshSubSegmentAbsoluteMatrix ()
 Refreshes absolute matrix of internal subsegments. More...
 
void AddSegment (SceneSegment *pSegment)
 Adds new segment to scene. More...
 
void InsertSegment (int index, SceneSegment *pSegment)
 Inserts new segment to defined position. More...
 
SceneSegmentAddSegment (SceneSegmentData *pSegmentData)
 Creates and adds a new segment with shown data. More...
 
void DoSegmentAlone ()
 Makes an independent segment.
 
bool RemoveSegment (SceneSegment *pSegment)
 Removes specified segment from segment array. More...
 
void RemoveChildren ()
 Remove all children.
 
void ReverseNormalsOfSegment ()
 Makes reverse of the segment normals.
 
bool CreateRenderObject (uint shaderId=0)
 Creates RenderObject for this segment. More...
 
bool RemoveRenderObject ()
 Removes RenderObject for this segment.
 
void SetSegmentNumber (uint number)
 Sets number of subsegments. More...
 
uint UpdateSegmentNumber (uint number)
 Refreshes number of subsegments. More...
 
void SetVisible (bool bVisible)
 Sets visibility. More...
 
bool GetVisible () const
 Get visibility value.
 
void SetRenderStates (const RenderState &renderState)
 Sets rendering state for segment. More...
 
void RemoveEmptySubSegment ()
 Removes empty segments.
 
GeometryRepGetRepresentation () const
 Returns pointer to a geometric representation.
 
void SetRepresentation (GeometryRep *pRepresentation)
 Adds new pointer to GeometryRep.
 
uint32_t GetRenderLayer () const
 Get scene segment layer.
 
void SetRenderLayer (uint32_t, bool andSubSegments=true)
 Set layer to scene segment.
 
void SetIgnoreForPick (bool value)
 Exclude from process find objects.
 
bool IsIgnoreForPick () const
 Check the object is excluded from process find object.
 
- Public Member Functions inherited from VSN::Essence
 Essence (Node *pParent=nullptr)
 Default constructor setting parent node.
 
virtual ~Essence ()
 Destructor.
 
void AddFeature (Feature *pFeature)
 Adds new pointer to Feature.
 
void RemoveFeature (Feature *pFeature)
 Removes specified pointer to Feature.
 
FeatureVector GetFeatures () const
 Returns feature instance list to which Essence refers.
 
EssenceGetParentEssence () const
 Returns pointer to Essence parent instance.
 
- Public Member Functions inherited from VSN::Node
 Node (Node *pParent=nullptr)
 Constructor with parent.
 
virtual ~Node ()
 Destructor.
 
NodeKey GetUniqueKey () const
 Returns key identifing Node instance.
 
void SetUniqueKey (const NodeKey &key)
 Sets the unique key for the instance.
 
NodeKey GetCustomKey () const
 Returns custom key identifing Node instance.
 
void SetCustomKey (const NodeKey &key)
 Sets the custom unique key for the instance.
 
NodeGetParentNode () const
 Returns pointer to the parent object or nullptr if no parent.
 
bool IsEnabled () const
 Returns the Node enabled flag. By default, the flag is always on.
 
ObjectList< Node * > GetChildNodes () const
 Return an array of child nodes for this node.
 
void SetParent (Node *pParent)
 Sets parent object to the object.
 
bool IsNotificationsBlocked () const
 True if notifications are blocked, otherwise, False.
 
bool SetBlockNotifications (bool block)
 Sets blocking of notifications and returns the previous blocking value.
 
- Public Member Functions inherited from VSN::Object
 Object (Object *pParent=nullptr)
 Default constructor. More...
 
virtual ~Object ()
 Destructor.
 
void SetParent (Object *pParent)
 NO TRANSLATION.
 
MutexGetMutex ()
 Object mutex.
 
String GetObjectName () const
 Returns name.
 
void SetObjectName (const String &name)
 Sets name.
 
bool IsControlType () const
 TRANSLATION.
 
ObjectGetParent () const
 NO TRANSLATION.
 
Variant GetProperty (const String &name) const
 NO TRANSLATION.
 
bool IsSignalsBlocked () const
 NO TRANSLATION.
 
bool SetBlockSignals (bool bBlock)
 NO TRANSLATION.
 
void AddEventListener (Object *pObject)
 NO TRANSLATION.
 
void RemoveEventListener (Object *pObject)
 NO TRANSLATION.
 
ObjectGetSender () const
 NO TRANSLATION.
 
Thread * GetThread () const
 NO TRANSLATION.
 
void BindWithThread (Thread *thread)
 NO TRANSLATION.
 
int StartTimer (int interval, TimerType timerType=tt_CoarseTimer)
 NO TRANSLATION.
 
void KillTimer (int id)
 NO TRANSLATION.
 
const ObjectList< Object * > & GetChildren () const
 NO TRANSLATION.
 
template<typename T >
FindChild (const String &objName=String()) const
 NO TRANSLATION.
 
template<typename T >
ObjectList< T > FindChildren (const String &objName=String(), VSN::ChildFindingPolicies policies=VSN::FindAllNestedChildren) const
 NO TRANSLATION.
 
- Public Member Functions inherited from VSN::BasicObject
 BasicObject ()
 Default constructor.
 
virtual ~BasicObject ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from VSN::Essence
 Essence (EssencePrivate &dd, Node *parent=nullptr)
 Constructor setting parent node and private data.
 
- Protected Member Functions inherited from VSN::Node
 Node (NodePrivate &dd, Node *pParent)
 Sets the node enable flag. More...
 
virtual void SceneModificationEvent (const std::shared_ptr< SceneModification > &modification)
 The function is called in case of scene being modified.
 

Detailed Description

SceneSegment class is the base class for all segments in the scene graph.

The SceneSegment class can be used as a segment container. Entering segments are added with the AddSegment() and InsertSegment() functions. The order of segments is very important as geometry segments are rendered according to their position in the scene graph.
The scene graph segments contains a mechanism to describe which parts of the scene has changed. It includes the combined matrixes, changes in the segment hierarchy, and so on.

Constructor & Destructor Documentation

◆ SceneSegment() [1/5]

VSN::SceneSegment::SceneSegment ( const NodeKey key,
SceneSegment pParent = nullptr 
)

Special constructor with segment data.

Parameters
[in]key- Segment identifier.
[in]pParent- A pointer to parent.

◆ SceneSegment() [2/5]

VSN::SceneSegment::SceneSegment ( SceneSegmentData pSegmentData,
SceneSegment pParent = nullptr 
)

Special constructor with segment data.

Parameters
[in]pSegmentData- Scene data graph segment.
[in]pParent- A pointer to parent.
[in]pDescriptor- Scene description.
[in]shaderId- Shader identifier.

◆ SceneSegment() [3/5]

VSN::SceneSegment::SceneSegment ( SceneSegmentData pSegmentData,
const NodeKey key 
)

Special constructor with segment data and segment identifier.

Parameters
[in]pSegmentData- Scene graph segment data.
[in]key- Segment identifier.
[in]pDescriptor- Scene description.
[in]shaderId- Shader identifier.

◆ SceneSegment() [4/5]

VSN::SceneSegment::SceneSegment ( GeometryRep pRep,
SceneSegment pParent = nullptr 
)

Special constructor with representation.

Parameters
[in]pRep- Geometry representation.
[in]pParent- A pointer to parent.

◆ SceneSegment() [5/5]

VSN::SceneSegment::SceneSegment ( GeometryRep pRep,
const NodeKey key,
SceneSegment pParent = nullptr 
)

Special constructor with representation.

Parameters
[in]pRep- Geometry representation.
[in]key- Segment identifier.
[in]pParent- A pointer to parent.

Member Function Documentation

◆ GetAbsoluteMatrix()

const Matrix3DF& VSN::SceneSegment::GetAbsoluteMatrix ( ) const

Returns absolute matrix of segment.

Returns absolute matrix of segment.

Returns
Absolute matrix of segment.

◆ GetTransform()

Features::Transform& VSN::SceneSegment::GetTransform ( ) const

Returns relative matrix of segment.

Returns
Relative matrix of segment.

◆ HasRep()

bool VSN::SceneSegment::HasRep ( ) const

Checks if segment has representation.

Returns
True if segment has representation.

◆ HasRenderObject()

bool VSN::SceneSegment::HasRenderObject ( ) const

Checks if segment has RenderObject.

Returns
True if segment has RenderObject.

◆ CanInsertToSegment()

bool VSN::SceneSegment::CanInsertToSegment ( SceneSegment pSegment) const

Checks if segment can be added to segment array.

Parameters
[in]pSegment- Segment.
Returns
True if segment can be added to segment array.

◆ SetIndependentCreateViewObject()

void VSN::SceneSegment::SetIndependentCreateViewObject ( bool  bIndependent)

Sets flag for automatic creation of RenderObject.

Parameters
[in]bIndependent- Value of flag.

◆ GetIndexOf()

ptrdiff_t VSN::SceneSegment::GetIndexOf ( const SceneSegment pSegment) const

Returns index of segment in array of specified segment.

Parameters
[in]pSegment- Scene segment.
Returns
Index.

◆ ExistSegment()

bool VSN::SceneSegment::ExistSegment ( const SceneSegment pSegment) const

Returns flag for existence of specified segment in this segment.

Parameters
[in]pSegment- Scene segment.
Returns
True if segment has the specified segment.

◆ RefreshSubSegmentAbsoluteMatrix()

SceneSegment* VSN::SceneSegment::RefreshSubSegmentAbsoluteMatrix ( )

Refreshes absolute matrix of internal subsegments.

Refreshes absolute matrix of internal subsegments.

Returns
Scene segment.

◆ AddSegment() [1/2]

void VSN::SceneSegment::AddSegment ( SceneSegment pSegment)

Adds new segment to scene.

Parameters
[in]pSegment- Scene segment.

◆ InsertSegment()

void VSN::SceneSegment::InsertSegment ( int  index,
SceneSegment pSegment 
)

Inserts new segment to defined position.

Parameters
[in]index- Positon index.
[in]pSegment- Scene segment.

◆ AddSegment() [2/2]

SceneSegment* VSN::SceneSegment::AddSegment ( SceneSegmentData pSegmentData)

Creates and adds a new segment with shown data.

Parameters
[in]pSegmentData- Scene graph data segment.
Returns
Created scene segment.

◆ RemoveSegment()

bool VSN::SceneSegment::RemoveSegment ( SceneSegment pSegment)

Removes specified segment from segment array.

Parameters
[in]pSegment- Scene segment.
Returns
True if segment is found and removed.

◆ CreateRenderObject()

bool VSN::SceneSegment::CreateRenderObject ( uint  shaderId = 0)

Creates RenderObject for this segment.

Parameters
[in]shaderId- Shader identifier.
Returns
True if RenderObject is created.

◆ SetSegmentNumber()

void VSN::SceneSegment::SetSegmentNumber ( uint  number)

Sets number of subsegments.

Parameters
[in]number- Number of segment.

◆ UpdateSegmentNumber()

uint VSN::SceneSegment::UpdateSegmentNumber ( uint  number)

Refreshes number of subsegments.

Parameters
[in]count- Š¢umber of subsegments.
Returns
Refreshed count of subsegments.

◆ SetVisible()

void VSN::SceneSegment::SetVisible ( bool  bVisible)

Sets visibility.

Parameters
[in]bVisible- Flag of visibility.

◆ SetRenderStates()

void VSN::SceneSegment::SetRenderStates ( const RenderState renderState)

Sets rendering state for segment.

Parameters
[in]renderState- Rendering state.

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