Rhino C++ API  8.6
Public Member Functions | Public Attributes | List of all members
CRhinoLayerNode Class Reference

#include <rhinoSdkLayer.h>

Public Member Functions

 CRhinoLayerNode ()
 
 CRhinoLayerNode (const CRhinoLayerNode &src)
 
 ~CRhinoLayerNode ()
 
bool Create (class CRhinoLayerTable &layer_table, int layer_index, int list_parents, int list_children, bool bIgnoreDeletedLayers=true)
 
void Destroy ()
 
bool IsChildLayer (int child_layer_index) const
 
bool IsParentLayer (int parent_layer_index) const
 
CRhinoLayerNodeoperator= (const CRhinoLayerNode &src)
 

Public Attributes

int m_child_count
 number of child layers More...
 
int * m_child_list
 indices of child layers More...
 
int m_layer_index
 index of "this" layer More...
 
int m_parent_count
 number of parent layers More...
 
int * m_parent_list
 indices of parent layers More...
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.

Constructor & Destructor Documentation

◆ CRhinoLayerNode() [1/2]

CRhinoLayerNode::CRhinoLayerNode ( )

◆ ~CRhinoLayerNode()

CRhinoLayerNode::~CRhinoLayerNode ( )

◆ CRhinoLayerNode() [2/2]

CRhinoLayerNode::CRhinoLayerNode ( const CRhinoLayerNode src)

Member Function Documentation

◆ Create()

bool CRhinoLayerNode::Create ( class CRhinoLayerTable layer_table,
int  layer_index,
int  list_parents,
int  list_children,
bool  bIgnoreDeletedLayers = true 
)

Description: Puts the layer tree information in the m_layer_index, m_parent_layer_index, and m_child_layer_index[] array fields. Parameters: layer_index - [in] index of "this" layer list_parents - [in] 0 = no, 1 = immediate parent If this layer has a parent, then m_parent_count=1 and the returned m_parent_list[] array has one element. 2 = immediate parent, their parent, and so on. If this layer has a parent, then m_parent_count>=1 and the returned m_parent_list[] is sorted by generation. m_parent_list[0] = immediate parent, m_parent_list[1] = grandparent, m_parent_list[2] = great grandparent, and so on. list_children - [in] 0 = no, 1 = immediate children If the layer has children, then m_child_count is the number of immediate children the returned m_child_list[] array list is sorted by layer index. 2 = immediate children, their children, and so on. If the layer has children, then m_child_count is the number of children, grandchildren, and so on, and the returned m_child_list[] array list is sorted by layer index. bIgnoreDeletedLayers - [in] If true (the default), deleted layers are not added to the lists. If false, deleted layers are included. Returns: True if input and layer table are valid and false if an index is out of range or an error was detected in the layer tree information.

◆ Destroy()

void CRhinoLayerNode::Destroy ( )

◆ IsChildLayer()

bool CRhinoLayerNode::IsChildLayer ( int  child_layer_index) const

Description: After Create() has been called, IsChildLayer can be used to quickly see if child_layer_index is the index of a child of "this" layer. Parameters: child_layer_index - [in] Returns: True if child_layer_index is the index of a child layer. See Also: CRhinoLayerNode::Create CRhinoLayerNode::IsParentLayer

◆ IsParentLayer()

bool CRhinoLayerNode::IsParentLayer ( int  parent_layer_index) const

Description: After Create() has been called, IsParentLayer can be used to quickly see if parent_layer_index is the index of a parent of "this" layer.

Parameters: parent_layer_index - [in] Returns: True if parent_layer_index is the index of a parent layer. See Also: CRhinoLayerNode::Create CRhinoLayerNode::IsChildLayer

◆ operator=()

CRhinoLayerNode& CRhinoLayerNode::operator= ( const CRhinoLayerNode src)

Member Data Documentation

◆ m_child_count

int CRhinoLayerNode::m_child_count

number of child layers

◆ m_child_list

int* CRhinoLayerNode::m_child_list

indices of child layers

◆ m_layer_index

int CRhinoLayerNode::m_layer_index

index of "this" layer

◆ m_parent_count

int CRhinoLayerNode::m_parent_count

number of parent layers

◆ m_parent_list

int* CRhinoLayerNode::m_parent_list

indices of parent layers