File indexing completed on 2026-04-09 07:49:31
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 #include <vector>
0039 #include "SYSRAP_API_EXPORT.hh"
0040
0041 #include "snd.hh"
0042 #include "spa.h"
0043 #include "sbb.h"
0044 #include "sxf.h"
0045
0046 struct NPFold ;
0047
0048 struct SYSRAP_API scsg
0049 {
0050 int level ;
0051
0052 std::vector<snd> node ;
0053 std::vector<spa> param ;
0054 std::vector<sbb> aabb ;
0055 std::vector<sxf> xform ;
0056
0057 static constexpr const unsigned IMAX = 1000 ;
0058
0059 scsg();
0060 void init();
0061
0062 template<typename T>
0063 int add_(const T& obj, std::vector<T>& vec);
0064
0065 int addND(const snd& nd );
0066 int addPA(const spa& pa );
0067 int addBB(const sbb& bb );
0068 int addXF(const sxf& xf );
0069
0070 template<typename T>
0071 const T* get(int idx, const std::vector<T>& vec) const ;
0072
0073 const snd* getND(int idx) const ;
0074 const spa* getPA(int idx) const ;
0075 const sbb* getBB(int idx) const ;
0076 const sxf* getXF(int idx) const ;
0077
0078 template<typename T>
0079 T* get_(int idx, std::vector<T>& vec) ;
0080
0081 snd* getND_(int idx);
0082 spa* getPA_(int idx);
0083 sbb* getBB_(int idx);
0084 sxf* getXF_(int idx);
0085
0086 template<typename T>
0087 std::string desc_(int idx, const std::vector<T>& vec) const ;
0088
0089 std::string descND(int idx) const ;
0090 std::string descPA(int idx) const ;
0091 std::string descBB(int idx) const ;
0092 std::string descXF(int idx) const ;
0093
0094 std::string brief() const ;
0095 std::string desc() const ;
0096
0097 NPFold* serialize() const ;
0098 void import(const NPFold* fold);
0099
0100
0101
0102 void getLVID( std::vector<snd>& nds, int lvid ) const ;
0103 const snd* getLVRoot(int lvid ) const ;
0104
0105 };
0106