RaySupreme Script API
 All Data Structures Functions Pages
doxygen.h
1 
186 {
187 public:
188 
194  void print( string str );
195 
201  NodeGraph* rootGraph( void );
202 
209  NodeGraph* current(void);
210 
217  void setCurrent( NodeGraph *graph );
218 
224  NodeGraphList *selected( void );
225 
233  float randomFloat( float min, float max );
234 
242  int randomInt( int min, int max );
243 
251  void registerFunctionDesc( string decl, string description );
252 
261  void registerMacro( string macro, string function );
262 
268  int year( void );
269 
275  void setYear( int year );
276 };
277 
283 class Instance
284 {
285 public:
286 
292  void print( string str );
293 
299  NodeGraph* rootGraph( void );
300 
308  float randomFloat( float min, float max );
309 
315  int time( void );
316 
322  int year( void );
323 };
324 
331 {
332 public:
333 
340  bool getBooleanForVariable( string name );
341 
348  float getValueForVariable( string name );
349 
356  string getStringForVariable( string );
357 };
358 
363 class IntList
364 {
365 public:
370  IntList();
371 
376  void clear( void );
377 
383  void append( int value );
384 
391  int at( int i );
392 
398  int count( void );
399 };
400 
406 {
407 public:
412  FloatList();
413 
418  void clear( void );
419 
425  void append( float value );
426 
433  float at( int i );
434 
440  int count( void );
441 };
442 
448 {
449 public:
454  StringList();
455 
460  void clear( void );
461 
467  void append( string value );
468 
475  string at( int i );
476 
482  int count( void );
483 };
484 
490 {
491 public:
492 
498  string path( void );
499 
505  string uuid( void );
506 
512  string caption( void );
513  //string info( void );
514 };
515 
521 {
527 
533  void append( NodeDescriptor &item );
534 
541  NodeDescriptor* at( int i );
542 
548  int count( void );
549 };
550 
555 class Rgb
556 {
557 public:
558 
563  Rgb();
564 
572  Rgb( int red, int green, int blue );
573 
579  int red( void );
580 
586  int green ( void );
587 
593  int blue( void );
594 
600  void setRed( int red );
601 
607  void setGreen( int green );
608 
614  void setBlue( int blue );
615 
621  int minComponent();
622 
628  int maxComponent();
629 };
630 
635 class Terminal
636 {
637 
638 public:
639 
645  string name( void );
646 
652  TerminalList *connectedList( void );
653 
660  bool connect( Terminal& connectTo );
661 
668  void disconnect( Terminal& disconnectFrom );
669 
674  void disconnectAll( void );
675 
681  unsigned int inConnectFlags( void );
682 
688  unsigned int outConnectFlags( void );
689 };
690 
696 {
701  TerminalList();
702 
708  void append( Terminal &item );
709 
716  Terminal* at( int i );
717 
723  int count( void );
724 };
725 
731 class Tool
732 {
733 public:
734 
740  string category( void );
741 
747  string uuid( void );
748 
754  string caption( void );
755 
763 
770  void execute( NodeGraphList &graphList, ParameterContainer &pc );
771 };
772 
777 class ToolList
778 {
783  ToolList();
784 
790  void append( Tool &item );
791 
798  Tool* at( int i );
799 
805  int count( void );
806 };
807 
813 {
818  TerminalList();
819 
825  void append( string item );
826 
833  string at( int i );
834 
840  int count( void );
841 };
842 
849 {
850 public:
851 
857  string name( void );
858 
865  bool getCheckBoxParam( string name );
866 
873  void setCheckBoxParam( string name, bool value );
874 
881  string getStringParam( string name );
882 
889  void setStringParam( string name, string value );
890 
897  Rgb* getColorParam( string name );
898 
905  void setColorParam( string name, Rgb &value );
906 
913  int getListParam( string name );
914 
921  string getListParamString( string name );
922 
929  void setListParam( string name, int value );
930 
944  int getIntParam( string name, int index=0 );
945 
959  void setIntParam( string name, int value, int index=0 );
960 
969  void setIntGroupParam( std::string name, int value1, int value2, int value3 );
970 
978  float getFloatParam( string name, int index=0 );
979 
987  void setFloatParam( string name, float value, int index=0 );
988 
997  void setFloatGroupParam( string name, float value1, float value2, float value3 );
998 
1004  string contents( void );
1005 
1013  void addGroupBox( string name, string title );
1014 
1022  void addColorParam( string name, string title, Rgb &rgb );
1023 
1033  void addIntParam( string name, string title, int value, int min, int max );
1034 
1044  void addFloatParam( string name, string title, float value, float min, float max );
1045 
1053  void addListParam( string name, string title, ListParameter &listParameter );
1054 
1062  void addCheckBoxParam( string name, string title, bool defaultValue );
1063 
1071  void addStringParam( string name, string title, string defaultValue );
1072 };
1073 
1078 class Image
1079 {
1080 public:
1081  void save( string );
1082 };
1083 
1084 class Tracer
1085 {
1086 public:
1087  Image* image( void );
1088 };
1089 
1100 class Node
1101 {
1102 public:
1103 
1108  string name( void );
1109 
1114  void setName( string );
1115 
1121  int id( void );
1122 
1129 
1135  NodeGraph *parentGraph( void );
1136 
1142  NodeGraph *rootGraph( void );
1143 
1149  NodeGraph *toNodeGraph( void );
1150 
1156  NodeDescriptor *descriptor( void );
1157 
1163  TerminalList *terminalList( void );
1164 
1171  Terminal *terminal( string name );
1172 };
1173 
1179 {
1184  NodeList();
1185 
1191  void append( Node &item );
1192 
1199  Node* at( int i );
1200 
1206  int count( void );
1207 };
1208 
1217 class NodeGraph : public Node
1218 {
1219 public:
1220 
1226  Node *lastNode( void );
1227 
1234  Node *addNode( string name );
1235 
1241  NodeGraph *addSubGraph( void );
1242 
1250  bool moveNode( Node *node, NodeGraph *dest );
1251 
1259  bool moveNodeGraph( NodeGraph *graph, NodeGraph *dest );
1260 
1267 
1273  ToolList *availableToolList( void );
1274 
1280  NodeList *nodeList( void );
1281 
1289  bool contains( string uuid, bool recursive=true );
1290 
1298  NodeList *findNodes( string uuid, bool recursive=true );
1299 
1306  Node *findNode( int id, bool recursive=true );
1307 
1313  Node *findNodeByName( name );
1314 
1320  NodeGraphList *findNodeGraphsByName( string name );
1321 
1327  bool removeNode( Node * );
1328 
1335  Tool* getTool( string uuid );
1336 
1344  Mesh* getMesh( bool recursive=false );
1345 
1351  Vector3 *boundingBoxSize( void );
1352 
1359  Vector3 *boundingBox( int minMax );
1360 
1366  void sortNodes( void );
1367 
1377  void loadObjectTemplate( string templateId, int year=-1, string style="", string tag="", string adjectives="" );
1378 
1388  void loadMaterialTemplate( string templateId );
1389 
1390 };
1391 
1397 {
1402  NodeGraphList();
1403 
1409  void append( NodeGraph &item );
1410 
1417  NodeGraph* at( int i );
1418 
1424  int count( void );
1425 };
1426 
1427 // ----------------------------------------------------------------------------------------------- Mesh
1428 
1434 {
1435 public:
1436 
1441  TransMatrix();
1442 
1459  TransMatrix( float scaleX, float scaleY, float scaleZ, float rotX, float rotY, float rotZ, float posX, float posY, float posZ, float pivotX, float pivotY, float pivotZ );
1460 };
1461 
1466 class Vector3
1467 {
1468 public:
1469 
1477  Vector3( float x, float y, float z );
1478 
1484  float x( void );
1485 
1491  float y( void );
1492 
1498  float z( void );
1499 
1507  void set( float x, float y, float z );
1508 
1515  float index( int offset );
1516 
1522  void transform( const TransMatrix& matrix );
1523 
1530  Vector3* transformed( const TransMatrix& matrix );
1531 };
1532 
1538 {
1539 public:
1540 
1546  VertexHandle( int index );
1547 
1553  uint index( void );
1554 };
1555 
1561 {
1566  VertexHandleList();
1567 
1573  void append( VertexHandle &item );
1574 
1581  VertexHandle* at( int i );
1582 
1588  int count( void );
1589 };
1590 
1596 {
1597 public:
1598 
1604  EdgeHandle( int index );
1605 
1611  uint index( void );
1612 };
1613 
1619 {
1620 public:
1621 
1627  FaceHandle( int index );
1628 
1634  uint index( void );
1635 };
1636 
1641 class Mesh
1642 {
1643 public:
1644 
1645  // --- Faces
1646 
1653  FaceHandle *addFace( VertexHandleList *verticesList );
1654 
1662 
1670 
1678  void deleteVertex( VertexHandle *handle, bool deleteIsolatedVertices = false );
1679 
1686  VertexHandleList *face( unsigned int index );
1687 
1694  VertexHandleList *face( FaceHandle& handle );
1695 
1702  Vector3* faceNormal( unsigned int index );
1703 
1710  Vector3* faceNormal( FaceHandle *handle );
1711 
1718  void setFaceNormal( FaceHandle *handle, Vector3 *vertexValue );
1719 
1720  // --- Edges
1721 
1728  VertexHandleList *edge( unsigned int index );
1729 
1736  VertexHandleList *edge( EdgeHandle& handle );
1737 
1743  uint edgeCount( void ) const;
1744 
1752  void deleteEdge( EdgeHandle *handle, bool deleteIsolatedVertices = false );
1753 
1754  // --- Vertices
1755 
1762  VertexHandle *addVertex( Vector3 *vertexValue );
1763 
1770  void setVertex( VertexHandle *handle, Vector3 *vertexValue );
1771 
1778  void setVertexNormal( VertexHandle *handle, Vector3 *vertexValue );
1779 
1787  void deleteVertex( VertexHandle *handle, bool deleteIsolatedVertices = false );
1788 
1794  uint vertexCount( void ) const;
1795 
1802  Vector3* vertex( unsigned int index );
1803 
1810  Vector3* vertex( VertexHandle *handle );
1811 
1818  Vector3* vertexNormal( unsigned int index );
1819 
1826  Vector3* vertexNormal( VertexHandle *handle );
1827 
1834  int materialId( int face_idx );
1835 
1841  int materialsCount( void );
1842 
1849  void setMaterialId( int face_idx, int matId );
1850 
1857  void removeMaterial( int matId );
1858 
1865  int textureId( int face_idx );
1866 
1872  int texturesCount( void );
1873 
1880  void setTextureId( int face_idx, int texId );
1881 
1888  void removeTexture( int texId );
1889 
1894  void collectGarbage( void );
1895 
1901  void deleteIsolatedVertices( void );
1902 
1908  void update( void );
1909 
1917  void updateNormals(bool updateFace = true, bool updateVertex = true);
1918 
1919 
1927  void subtract( Mesh *second_arg, bool reorient, float tolerance );
1928 };