[shaderz] r3 committed - * Added a container widget to contain all the functionality of the nod...

1 view
Skip to first unread message

sha...@googlecode.com

unread,
May 22, 2011, 10:24:29 AM5/22/11
to shade...@googlegroups.com
Revision: 3
Author: vijay.michaeljoseph
Date: Sun May 22 07:23:49 2011
Log: * Added a container widget to contain all the functionality of
the nodes, and their connections
* Nodes can now be connected from output stubs to input stubs
* Connections are implemented using cubic bezier curves
* Added support for color nodes in ui
* Added context menu for creating constant, addition, rgba nodes

http://code.google.com/p/shaderz/source/detail?r=3

Added:
/trunk/inc/qt/shnodecontainerwidget_qt.h
/trunk/inc/qt/shnodeuicolor_qt.h
/trunk/src/qt/shnodecontainerwidget_qt.cpp
/trunk/src/qt/shnodeuicolor_qt.cpp
Modified:
/trunk/CMakeLists.txt
/trunk/inc/qt/shnodeui_qt.h
/trunk/inc/shnode.h
/trunk/inc/shnode_color.h
/trunk/inc/shnode_math.h
/trunk/shaderz_v3.xcodeproj/project.pbxproj
/trunk/shaderz_v3.xcodeproj/vijayjoseph.mode1v3
/trunk/shaderz_v3.xcodeproj/vijayjoseph.pbxuser
/trunk/src/main.cpp
/trunk/src/qt/shnodeui_qt.cpp
/trunk/src/shnode.cpp
/trunk/src/shnode_color.cpp
/trunk/src/shnode_math.cpp
/trunk/src/shnode_texture.cpp
/trunk/src/shobject.cpp

=======================================
--- /dev/null
+++ /trunk/inc/qt/shnodecontainerwidget_qt.h Sun May 22 07:23:49 2011
@@ -0,0 +1,68 @@
+/*
+ * shnodecontainerwidget_qt.h
+ * shaderz_v3
+ *
+ * Created by Anjali on 4/19/11.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef __SH_NODECONTAINER_WIDGET_H__
+#define __SH_NODECONTAINER_WIDGET_H__
+
+#include <map>
+#include <vector>
+#include <QtGui/QWidget>
+#include <QAction>
+
+#include "shnode.h"
+#include "shnodeui_qt.h"
+
+class QMenu;
+class QPainterPath;
+
+namespace shaderzui
+{
+ namespace qt
+ {
+ class shNodeContainerWidget : public QWidget
+ {
+ Q_OBJECT
+
+ public:
+ shNodeContainerWidget(QWidget* InParent);
+
+ protected:
+ enum nodeTypes { SHNT_CONST=0, SHNT_MATH_ADD, SHNT_MATH_SUB,
SHNT_MATH_MUL, SHNT_MATH_DIV, SHNT_RGBA, SHNT_MAX };
+
+ public slots:
+ void onCreateConstantNode();
+ void onCreateMathAddNode();
+ void onCreateMathSubNode();
+ void onCreateMathMulNode();
+ void onCreateMathDivNode();
+ void onCreateRGBANode();
+ void onNodeDestroyed( unsigned int InNodeCoreAddress );
+ void onStubInteraction( shStubInteraction InInteraction, linkStubUI*
InStubUI, shNodeUI* InNodeUI );
+
+ protected:
+ virtual void mouseMoveEvent( QMouseEvent* InEventInfo );
+ virtual void mouseReleaseEvent( QMouseEvent* InEventInfo );
+ virtual void paintEvent( QPaintEvent* InEventInfo );
+ virtual QMenu* generateRClickContextMenu();
+
+ virtual void drawHelperNodeConnections( shaderz::shNode* InNode,
QPainterPath& InPainterPath );
+
+ protected:
+ std::map<shaderz::shNode*, shNodeUI*> mNodeToUiMap;
+ std::vector<QAction*> mActionList;
+ std::pair<shNodeUI*, linkStubUI*> mCurrentlySelectedStubInfo;
+ std::pair<shNodeUI*, linkStubUI*> mCurrentlyHoveringStubInfo;
+
+ private:
+ typedef QWidget ParentClass;
+ };
+ }
+}
+
+#endif
=======================================
--- /dev/null
+++ /trunk/inc/qt/shnodeuicolor_qt.h Sun May 22 07:23:49 2011
@@ -0,0 +1,33 @@
+/*
+ * shnodeui_color.h
+ * shaderz_v3
+ *
+ * Created by Anjali on 5/5/11.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef __SH_NODEUICOLOR_QT_H__
+#define __SH_NODEUICOLOR_QT_H__
+
+#include "shnodeui_qt.h"
+
+namespace shaderzui
+{
+ namespace qt
+ {
+ class shNodeUI_color : public shNodeUI
+ {
+ public:
+ shNodeUI_color( QWidget* InParent, shaderz::shNode* InNode );
+
+ public slots:
+ virtual void onPreviewWidgetClicked();
+
+ private:
+ typedef shNodeUI ParentClass;
+ };
+ }
+}
+
+#endif
=======================================
--- /dev/null
+++ /trunk/src/qt/shnodecontainerwidget_qt.cpp Sun May 22 07:23:49 2011
@@ -0,0 +1,257 @@
+/*
+ * shnodecontainerwidget_qt.cpp
+ * shaderz_v3
+ *
+ * Created by Anjali on 4/19/11.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include <QtGui/QMouseEvent>
+#include <QtGui/QMenu>
+#include <QtGui/QPainterPath>
+#include <QtGui/QPainter>
+
+#include "shnode_math.h"
+#include "shnode_color.h"
+#include "shnodecontainerwidget_qt.h"
+#include "shnodeui_qt.h"
+#include "shnodeuicolor_qt.h"
+
+using namespace shaderz;
+using namespace shaderzui::qt;
+
+shNodeContainerWidget::shNodeContainerWidget( QWidget* InParent )
+ : ParentClass( InParent )
+{
+ mCurrentlySelectedStubInfo.first = 0;
+ mCurrentlySelectedStubInfo.second = 0;
+
+ setMouseTracking(true);
+
+ mActionList.reserve( SHNT_MAX );
+ mActionList.assign( (size_t)SHNT_MAX, 0 );
+
+ QAction* pNewAction = 0;
+
+#define DEF_ACTION( Name, List, SlotName ) \
+ pNewAction = new QAction( #Name, this); \
+ pNewAction->setText( #Name ); \
+ connect( pNewAction, SIGNAL(triggered()), this, SLOT(SlotName()) ); \
+ List[ SHNT_##Name ] = pNewAction;
+
+ DEF_ACTION( CONST, mActionList, onCreateConstantNode );
+ DEF_ACTION( MATH_ADD, mActionList, onCreateMathAddNode );
+ DEF_ACTION( MATH_SUB, mActionList, onCreateMathSubNode );
+ DEF_ACTION( MATH_MUL, mActionList, onCreateMathMulNode );
+ DEF_ACTION( MATH_DIV, mActionList, onCreateMathDivNode );
+ DEF_ACTION( RGBA, mActionList, onCreateRGBANode );
+
+#undef DEF_ACTION
+}
+
+void shNodeContainerWidget::onNodeDestroyed( unsigned int
InNodeCoreAddress )
+{
+ // if the destroyed node contains the current selection, clear it too.
+ if( mCurrentlySelectedStubInfo.first == mNodeToUiMap[
(shNode*)InNodeCoreAddress ] )
+ {
+ mCurrentlySelectedStubInfo.first = 0;
+ mCurrentlySelectedStubInfo.second = 0;
+ }
+
+ // remove the node to be destroyed from the hash maps
+ mNodeToUiMap.erase( (shNode*)(InNodeCoreAddress) );
+}
+
+void shNodeContainerWidget::mouseMoveEvent( QMouseEvent* InEventInfo )
+{
+ ParentClass::mouseMoveEvent(InEventInfo);
+ update();
+}
+
+void shNodeContainerWidget::mouseReleaseEvent( QMouseEvent* InEventInfo )
+{
+ ParentClass::mouseReleaseEvent(InEventInfo);
+
+ if( InEventInfo->button() == Qt::RightButton )
+ {
+ QMenu* pMenu = generateRClickContextMenu();
+ pMenu->popup( InEventInfo->globalPos() );
+ }
+ // releasing the left button will cause the partial link to snap or
connect to the widget under it
+ else if( InEventInfo->button() == Qt::LeftButton )
+ {
+ mCurrentlySelectedStubInfo.first = 0;
+ mCurrentlySelectedStubInfo.second = 0;
+ update();
+ }
+}
+
+QMenu* shNodeContainerWidget::generateRClickContextMenu()
+{
+ QMenu* generatedMenu = new QMenu(this);
+
+ // create const node
+ generatedMenu->addAction( mActionList[ SHNT_CONST ] );
+
+ generatedMenu->addSeparator();
+ generatedMenu->addAction( mActionList[ SHNT_MATH_ADD ] );
+ generatedMenu->addAction( mActionList[ SHNT_MATH_SUB ] );
+ generatedMenu->addAction( mActionList[ SHNT_MATH_MUL ] );
+ generatedMenu->addAction( mActionList[ SHNT_MATH_DIV ] );
+ generatedMenu->addSeparator();
+ generatedMenu->addAction( mActionList[ SHNT_RGBA ] );
+
+ return generatedMenu;
+}
+
+void shNodeContainerWidget::onCreateConstantNode()
+{
+ float constVal = 1.0f;
+ shNodeConstant* pConstNode = new shNodeConstant("TestConstantNode",
&constVal);
+ shNodeUI* pNodeUI = new shNodeUI( this, pConstNode );
+ pNodeUI->setGeometry( QCursor::pos().x(), QCursor::pos().y(),
pNodeUI->width(), pNodeUI->height() );
+ pNodeUI->show();
+
+ // connect the movement signal to the update slot so that the contianer
is refreshed every time a widget is moved
+ connect( pNodeUI, SIGNAL(nodeUIMoved()), this, SLOT(update()) );
+ connect( pNodeUI, SIGNAL(nodeUIDeleted(unsigned int)), this,
SLOT(onNodeDestroyed(unsigned int)) );
+ connect( pNodeUI, SIGNAL(stubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)), this, SLOT(onStubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)) );
+
+ mNodeToUiMap[pConstNode] = pNodeUI;
+}
+
+void shNodeContainerWidget::onCreateMathAddNode()
+{
+ shNodeMath* pMathNode = new shNodeMath( "TestMathNode",
shNodeMath::SHMO_Add );
+ pMathNode->addInputStub( shNode::constructLinkStub("A",
shNode::SHIO_INPUT, shNode::SHST_CONST1VEC) );
+ pMathNode->addInputStub( shNode::constructLinkStub("B",
shNode::SHIO_INPUT, shNode::SHST_CONST1VEC) );
+ pMathNode->addOutputStub( shNode::constructLinkStub("Result",
shNode::SHIO_OUTPUT, shNode::SHST_CONST1VEC) );
+
+ shNodeUI* pNodeUI = new shNodeUI( this, pMathNode );
+ pNodeUI->setGeometry( QCursor::pos().x(), QCursor::pos().y(),
pNodeUI->width(), pNodeUI->height() );
+ pNodeUI->show();
+
+ // connect the movement signal to the update slot so that the contianer
is refreshed every time a widget is moved
+ connect( pNodeUI, SIGNAL(nodeUIMoved()), this, SLOT(update()) );
+ connect( pNodeUI, SIGNAL(nodeUIDeleted(unsigned int)), this,
SLOT(onNodeDestroyed(unsigned int)) );
+ connect( pNodeUI, SIGNAL(stubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)), this, SLOT(onStubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)) );
+
+ mNodeToUiMap[pMathNode] = pNodeUI;
+}
+
+void shNodeContainerWidget::onCreateMathSubNode()
+{
+}
+
+void shNodeContainerWidget::onCreateMathMulNode()
+{
+}
+
+void shNodeContainerWidget::onCreateMathDivNode()
+{
+}
+
+void shNodeContainerWidget::onCreateRGBANode()
+{
+ shNodeColor* pColorNode = new shNodeColor("ColorNode", 0.0f, 0.0f,
255.0f, 255.0f);
+ shNodeUI_color* pNodeUI = new shNodeUI_color( this, pColorNode );
+ pNodeUI->setGeometry( QCursor::pos().x(), QCursor::pos().y(),
pNodeUI->width(), pNodeUI->height() );
+ pNodeUI->show();
+
+ // connect the movement signal to the update slot so that the contianer
is refreshed every time a widget is moved
+ connect( pNodeUI, SIGNAL(nodeUIMoved()), this, SLOT(update()) );
+ connect( pNodeUI, SIGNAL(nodeUIDeleted(unsigned int)), this,
SLOT(onNodeDestroyed(unsigned int)) );
+ connect( pNodeUI, SIGNAL(stubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)), this, SLOT(onStubInteraction(shStubInteraction, linkStubUI*,
shNodeUI*)) );
+
+ mNodeToUiMap[pColorNode] = pNodeUI;
+}
+
+void shNodeContainerWidget::paintEvent( QPaintEvent* InEventInfo )
+{
+ ParentClass::paintEvent( InEventInfo );
+
+ // the painting canvas
+ QPainterPath painterPath;
+
+ // draw the connections between the nodes
+ std::map<shNode*, shNodeUI*>::iterator nodeItr;
+ for( nodeItr = mNodeToUiMap.begin(); nodeItr != mNodeToUiMap.end();
++nodeItr )
+ {
+ std::pair<shNode*, shNodeUI*> mapEntry = *nodeItr;
+ drawHelperNodeConnections( mapEntry.first, painterPath );
+ }
+
+ // if we are dragging a new link, draw that too
+ if( mCurrentlySelectedStubInfo.first )
+ {
+ QPoint startPoint = mapFromGlobal(
mCurrentlySelectedStubInfo.second->mapToGlobal(mCurrentlySelectedStubInfo.second->getStubPos())
);
+
+ QPoint endPoint = mapFromGlobal(QCursor::pos());
+
+ int sign = (mCurrentlySelectedStubInfo.second->getAlignMode() ==
linkStubUI::STUBALIGN_LEFT ) ? -1 : 1;
+ QPoint ctrlPt1 = startPoint + QPoint( sign * 120, 0 );
+ QPoint ctrlPt2 = endPoint + QPoint( -sign * 120, 0 );
+
+ painterPath.moveTo( startPoint );
+ painterPath.cubicTo( ctrlPt1, ctrlPt2, endPoint );
+ }
+
+ // finally render the drawings on the painter path canves
+ QPainter painter(this);
+ painter.drawPath(painterPath);
+}
+
+void shNodeContainerWidget::drawHelperNodeConnections( shNode* InNode,
QPainterPath& InPainterPath )
+{
+ if( InNode )
+ {
+ // draw a connection starting from the output of each node to the input
of the other node
+ std::vector<shNode::linkStub*>& outputStubList = InNode->outputStubs();
+ for( int opIndex=0; opIndex < outputStubList.size(); ++opIndex )
+ {
+ // now draw links from each stub to the other point of the connection
+ for( int linkIndex=0; linkIndex <
outputStubList[opIndex]->allLinks.size(); ++linkIndex )
+ {
+ shNode::link& linkInfo = outputStubList[opIndex]->allLinks[linkIndex];
+ shNodeUI* startPointNodeUI = mNodeToUiMap[InNode];
+
+ linkStubUI* startPointStubUI = startPointNodeUI->findUIForStub(
outputStubList[opIndex] );
+ QPoint startPoint = mapFromGlobal(startPointStubUI->mapToGlobal(
startPointStubUI->getStubPos() ));
+
+ shNodeUI* endPointNodeUI = mNodeToUiMap[ linkInfo.otherNode ];
+ linkStubUI* endPointStubUI = endPointNodeUI->findUIForStub(
linkInfo.otherNode->findStub(linkInfo.otherStubName) );
+ QPoint endPoint = mapFromGlobal(endPointStubUI->mapToGlobal(
endPointStubUI->getStubPos() ));
+
+ // get the two control points for the cubic bezier curve
+ QPoint ctrl1 = startPoint + QPoint( 120, 0 );
+ QPoint ctrl2 = endPoint + QPoint( -120, 0 );
+
+ InPainterPath.moveTo( startPoint );
+ InPainterPath.cubicTo( ctrl1, ctrl2, endPoint );
+ }
+ }
+ }
+}
+
+void shNodeContainerWidget::onStubInteraction( shStubInteraction
InInteraction, linkStubUI* InStubUI, shNodeUI* InNodeUI )
+{
+ switch( InInteraction )
+ {
+ case SHSI_MousePressed:
+ mCurrentlySelectedStubInfo.first = InNodeUI;
+ mCurrentlySelectedStubInfo.second = InStubUI;
+ break;
+
+ case SHSI_MouseMove:
+ update();
+ break;
+
+ case SHSI_MouseReleased:
+ // todo: see if we are over any stub... try connecting to it.
+ mCurrentlySelectedStubInfo.first = 0;
+ mCurrentlySelectedStubInfo.second = 0;
+ update();
+ break;
+ }
+}
=======================================
--- /dev/null
+++ /trunk/src/qt/shnodeuicolor_qt.cpp Sun May 22 07:23:49 2011
@@ -0,0 +1,58 @@
+/*
+ * shnodeuicolor_qt.cpp
+ * shaderz_v3
+ *
+ * Created by Anjali on 5/5/11.
+ * Copyright 2011 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include <QColorDialog>
+
+#include "shnode_color.h"
+#include "shnodeuicolor_qt.h"
+
+using namespace shaderz;
+using namespace shaderzui::qt;
+
+shNodeUI_color::shNodeUI_color( QWidget* InParent, shaderz::shNode* InNode
)
+ : ParentClass(InParent, InNode)
+{
+ // change the preview widet color to the color represented by the node
+ shNodeColor* pNodeColor = dynamic_cast<shNodeColor*>(InNode);
+ QColor nodeColor = Qt::darkGreen;
+ if( pNodeColor )
+ {
+ int r = int(pNodeColor->red());
+ int g = int(pNodeColor->green());
+ int b = int(pNodeColor->blue());
+ int a = int(pNodeColor->alpha());
+
+ nodeColor = QColor( r, g, b, a);
+ }
+
+ mPreviewWidget->setPreviewType( nodePreviewWidget::SHPT_Color );
+ mPreviewWidget->setSolidColor( nodeColor, false );
+}
+
+void shNodeUI_color::onPreviewWidgetClicked()
+{
+ ParentClass::onPreviewWidgetClicked();
+
+ QColor currentColor( mPreviewWidget->getSolidColor() );
+ QColor newColor = QColorDialog::getColor( currentColor, this );
+ if( newColor != currentColor )
+ {
+ mPreviewWidget->setSolidColor( newColor, true );
+
+ shNodeColor* pNodeColor = dynamic_cast<shNodeColor*>(node());
+ if( pNodeColor )
+ {
+ // update the output cache
+ pNodeColor->setRed( newColor.red() );
+ pNodeColor->setGreen( newColor.green() );
+ pNodeColor->setBlue( newColor.blue() );
+ pNodeColor->setAlpha( newColor.alpha() );
+ }
+ }
+}
=======================================
--- /trunk/CMakeLists.txt Mon Apr 18 19:12:13 2011
+++ /trunk/CMakeLists.txt Sun May 22 07:23:49 2011
@@ -10,7 +10,7 @@
# dependencies: Qt4
find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
include(${QT_USE_FILE})
-
+
#############################################
############## build shaderz ################
#############################################
@@ -28,6 +28,7 @@
# do Qt preprocessing
set( MOCS
inc/qt/shnodeui_qt.h
+ inc/qt/shnodecontainerwidget_qt.h
)
qt4_wrap_cpp(GENERATED_SOURCES ${MOCS})

=======================================
--- /trunk/inc/qt/shnodeui_qt.h Mon Apr 18 19:12:13 2011
+++ /trunk/inc/qt/shnodeui_qt.h Sun May 22 07:23:49 2011
@@ -11,29 +11,46 @@
#define __SH_NODE_UI_QT_H__

#include <QtGui/QWidget>
+#include <QGLWidget>
+#include <QtGui/QMoveEvent>

#include "shnode.h"

namespace shaderzui
{
+ // possible interactions with a link stub
+ enum shStubInteraction { SHSI_MousePressed=0, SHSI_MouseReleased,
SHSI_MouseMove, SHSI_MouseEnter, SHSI_MouseLeave, SHSI_TryNewConnection };
+
namespace qt
{
- // class for representing a generic node
- class shNodeUI : public QWidget
- {
+ // simple widget class to emit a mouseDown signal
+ class simpleStubWidget : public QWidget
+ {
+ Q_OBJECT
+
+ signals:
+ void stubInteraction( shStubInteraction InInteraction ); // some
interaction was performed with the stub
+
public:
- shNodeUI( QWidget* InParent, shaderz::shNode* InNode );
+ simpleStubWidget(QWidget* InParent, const QColor& InNormalColor, const
QColor& InHoverColor );

protected:
- QWidget* mPreviewWidget;
-
- const static int WIDGETSIZE;
-
- private:
+ virtual void mousePressEvent( QMouseEvent* InEventInfo );
+ virtual void mouseMoveEvent( QMouseEvent* InEventInfo );
+ virtual void mouseReleaseEvent( QMouseEvent* InEventInfo );
+ virtual void enterEvent( QEvent* InEventInfo );
+ virtual void leaveEvent( QEvent* InEventInfo );
+ virtual void paintEvent( QPaintEvent* InEventInfo );
+
+ protected:
+ bool mIsMouseOver;
+ const QColor mNormalColor;
+ const QColor mHoverColor;
+
+ private:
typedef QWidget ParentClass;
};

-
// class for representing the link stub
class linkStubUI : public QWidget
{
@@ -43,42 +60,94 @@
// allow for singmals and slots
Q_OBJECT

+ signals:
+ void stubInteraction( shStubInteraction InInteraction, linkStubUI*
InStubUI ); // some interaction was performed with the internal stub
+
+ public slots:
+ void onStubInteraction( shStubInteraction InInteraction );
+
public:
enum alignMode { STUBALIGN_LEFT=0, STUBALIGN_RIGHT };

public:
linkStubUI( QWidget* InParent, shaderz::shNode::linkStub* InLinkStub,
alignMode InAlignMode = STUBALIGN_LEFT );
-
- public slots:
- void onStubMousePressed( QMouseEvent* InEventInfo );
-
+ const shaderz::shNode::linkStub* linkStub() const { return mLinkStub; }
+ QPoint getStubPos() const;
+ alignMode getAlignMode() const { return mAlignMode; }
+
+ protected:
+ shaderz::shNode::linkStub* mLinkStub;
+ alignMode mAlignMode;
+ simpleStubWidget* mInternalStubWidget;
+
private:
typedef QWidget ParentClass;
};

- // simple widget class to emit a mouseDown signal
- class simpleStubWidget : public QWidget
+ // class for preview section of the node
+ class nodePreviewWidget : public QWidget
{
Q_OBJECT

signals:
- void mouseDown( QMouseEvent* InEventInfo );
+ void clicked();

public:
- simpleStubWidget(QWidget* InParent, const QColor& InNormalColor, const
QColor& InHoverColor );
+ enum PreviewType { SHPT_Const=0, SHPT_Color, SHPT_Texture };
+
+ public:
+ nodePreviewWidget( QWidget* InParentnodePreviewWidget );
+
+ // setters
+ void setPreviewType( PreviewType InPreviewType );
+ void setSolidColor( QColor InNewColor, bool InShouldUpdate );
+
+ // getters
+ const QColor& getSolidColor() const { return mSolidColor; }

protected:
- virtual void mousePressEvent( QMouseEvent* InEventInfo );
- virtual void mouseMoveEvent( QMouseEvent* InEventInfo );
- virtual void leaveEvent( QEvent* InEventInfo );
- virtual void paintEvent( QPaintEvent* InEventInfo );
+ virtual void mouseReleaseEvent(QMouseEvent* InEventInfo);
+ virtual void paintEvent(QPaintEvent* InEventInfo);
+
+ protected:
+ PreviewType mPreviewType;
+ QColor mSolidColor; // only applicable for constants and color nodes
+
+ private:
+ typedef QWidget ParentClass;
+ };
+
+ // class for representing a generic node
+ class shNodeUI : public QWidget
+ {
+ Q_OBJECT
+
+ signals:
+ void nodeUIMoved(); // indicated that the nodeUI has moved
+ void nodeUIDeleted( unsigned int InCoreNodeAddress ); // emitted from
the destructor of the nodeUI
+ void stubInteraction( shStubInteraction InInteraction, linkStubUI*
InStubUI, shNodeUI* InNodeUI ); // some interaction was performed with a
stub within the node
+
+ public slots:
+ virtual void onStubInteraction( shStubInteraction InInteraction,
linkStubUI* InSelectedStubUI);
+ virtual void onPreviewWidgetClicked();
+
+ public:
+ shNodeUI( QWidget* InParent, shaderz::shNode* InNode );
+ virtual ~shNodeUI();
+ linkStubUI* findUIForStub( const shaderz::shNode::linkStub* InLinkStub
) const;
+ shaderz::shNode* node() { return mNode; }

protected:
- bool mIsMouseOver;
- const QColor mNormalColor;
- const QColor mHoverColor;
-
- private:
+ virtual void moveEvent( QMoveEvent* InEventInfo );
+
+ protected:
+ nodePreviewWidget* mPreviewWidget;
+ shaderz::shNode* mNode;
+ std::vector<linkStubUI*> mAllStubs;
+
+ const static int WIDGETSIZE;
+
+ private:
typedef QWidget ParentClass;
};
}
=======================================
--- /trunk/inc/shnode.h Mon Apr 18 19:12:13 2011
+++ /trunk/inc/shnode.h Sun May 22 07:23:49 2011
@@ -18,6 +18,7 @@
// shaderz headers
#include "shobject.h"

+#include <iostream>
namespace shaderz
{
class shNode : public shObject
@@ -51,7 +52,9 @@
// link stub which is capable of originating a connection to other node
stubs
struct linkStub
{
- union
+ // note to self: initially started off as a union; but had to move back
to strut coz of a malloc() error
+ // causing the allocated memory to be curropted.
+ struct _ValueCache
{
float constant1Vec;
float constant2Vec[2];
@@ -60,11 +63,30 @@
// something for texture
};

+ _ValueCache value;
linkIOType ioType;
std::string name;
linkStubType type;
std::vector<link> allLinks;

+ linkStub()
+ : ioType( SHIO_INPUT )
+ , name("DefaultName")
+ , type( SHST_CONST1VEC )
+ {
+ clear();
+ }
+
+ linkStub( const linkStub& InRhs )
+ {
+ std::cout<<"Invoking copy constructor: RHS.const1Vec
= "<<InRhs.value.constant1Vec<<std::endl;
+ value = InRhs.value;
+ ioType = InRhs.ioType;
+ name = InRhs.name;
+ type = InRhs.type;
+ allLinks = InRhs.allLinks;
+ }
+
linkStub& operator +( const linkStub& InRhs );
linkStub& operator -( const linkStub& InRhs );
linkStub& operator *( const linkStub& InRhs );
@@ -73,7 +95,7 @@

// clears the value part of this stub
void clear();
-
+
// converts the stub into a string
std::string toString() const;
};
@@ -86,21 +108,26 @@
// iterator interface
iterator firstNode() { return mAllNodes.begin(); }
iterator lastNode() { return mAllNodes.end(); }
+
+ // misc helper functions
+ static linkStub* constructLinkStub( const std::string& InLinkName
= "DefaultName"
+ , linkIOType InIOType = SHIO_INPUT
+ , linkStubType InType = SHST_CONST1VEC );

// getters
const std::string& name() const { return mNodeName; }
std::string& name() { return mNodeName; }
const linkStub* findStub( std::string InStubName )const;
linkStub* findStub( std::string InStubName );
- std::vector<linkStub>& inputStubs() { return mInputStubs; }
- std::vector<linkStub>& outputStubs() { return mOutputStubs; }
+ std::vector<linkStub*>& inputStubs() { return mInputStubs; }
+ std::vector<linkStub*>& outputStubs() { return mOutputStubs; }

virtual bool areStubsCompatible( linkStubType InType1, linkStubType
InType2 );
virtual bool isUpcastingPossible( linkStubType InType1, linkStubType
InType2 );

// setters
- virtual linkStub* addInputStub( std::string InStubName, linkStubType
InStubType = SHST_CONST1VEC );
- virtual linkStub* addOutputStub( std::string InStubName, linkStubType
InStubType = SHST_CONST1VEC );
+ virtual void addInputStub( linkStub* InNewStub );
+ virtual void addOutputStub( linkStub* InNewStub );
virtual bool connect( std::string InStubNameToConnect, shNode*
InOtherNode, std::string InOtherStubName );
virtual void disconnectFrom( shNode* InOtherNode, std::string
InStubName="" );

@@ -112,13 +139,14 @@

// debug helpers
#ifdef SH_DEBUG
+public:
virtual void dumpNodeStats() const;
#endif

protected:
std::string mNodeName;
- std::vector<linkStub> mInputStubs;
- std::vector<linkStub> mOutputStubs;
+ std::vector<linkStub*> mInputStubs;
+ std::vector<linkStub*> mOutputStubs;

// tracking all created nodes
static std::list<shNode*> mAllNodes;
=======================================
--- /trunk/inc/shnode_color.h Mon Apr 18 19:12:13 2011
+++ /trunk/inc/shnode_color.h Sun May 22 07:23:49 2011
@@ -21,6 +21,16 @@
{
public:
shNodeColor( const std::string& InNodeName, float InRed, float InGreen,
float InBlue, float InAlpha );
+ void setRed( float InNewVal ) { mRedStub->value.constant1Vec = InNewVal;
mRGBAStub->value.constant4Vec[0] = InNewVal; }
+ void setGreen( float InNewVal ) { mGreenStub->value.constant1Vec =
InNewVal; mRGBAStub->value.constant4Vec[1] = InNewVal; }
+ void setBlue( float InNewVal ) { mBlueStub->value.constant1Vec =
InNewVal; mRGBAStub->value.constant4Vec[2] = InNewVal; }
+ void setAlpha( float InNewVal) { mAlphaStub->value.constant1Vec =
InNewVal; mRGBAStub->value.constant4Vec[3] = InNewVal; }
+
+ float* rgba() const { return mRGBAStub->value.constant4Vec; }
+ float red() const { return mRedStub->value.constant1Vec; }
+ float blue() const { return mBlueStub->value.constant1Vec; }
+ float green() const { return mGreenStub->value.constant1Vec; }
+ float alpha() const { return mAlphaStub->value.constant1Vec; }

protected:
// the output stubs cache
=======================================
--- /trunk/inc/shnode_math.h Mon Apr 18 19:12:13 2011
+++ /trunk/inc/shnode_math.h Sun May 22 07:23:49 2011
@@ -23,6 +23,7 @@
virtual void evaluate();

#ifdef SH_DEBUG
+public:
virtual void dumpNodeStats() const;
#endif

@@ -44,6 +45,7 @@
MathOperation mMathOperation;

#ifdef SH_DEBUG
+public:
virtual void dumpNodeStats() const;
#endif

=======================================
--- /trunk/shaderz_v3.xcodeproj/project.pbxproj Mon Apr 18 19:12:13 2011
+++ /trunk/shaderz_v3.xcodeproj/project.pbxproj Sun May 22 07:23:49 2011
@@ -10,7 +10,9 @@
4908F3121338373A009AE1AA /* main.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 4908F3111338373A009AE1AA /* main.cpp */; };
4908F318133838BE009AE1AA /* shobject.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 4908F317133838BE009AE1AA /* shobject.cpp */; };
49713B74135723F40017C1C2 /* shnode_texture.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 49713B73135723F40017C1C2 /* shnode_texture.cpp */;
};
+ 49742545135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp in Sources */ =
{isa = PBXBuildFile; fileRef = 49742544135D53C2000A5EE8 /*
shnodecontainerwidget_qt.cpp */; };
4974F7481357E0E50020AAC6 /* shnodeui_qt.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */; };
+ 49752A921372CF75003FFCBC /* shnodeuicolor_qt.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 49752A911372CF75003FFCBC /* shnodeuicolor_qt.cpp
*/; };
497909BE13568C9800CB9B41 /* shnode_color.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 497909BD13568C9800CB9B41 /* shnode_color.cpp */; };
497BFD1513398C8500079F11 /* shnode.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 497BFD1413398C8500079F11 /* shnode.cpp */; };
497BFD61133A160D00079F11 /* shmemorytracker.cpp in Sources */ = {isa =
PBXBuildFile; fileRef = 497BFD60133A160D00079F11 /* shmemorytracker.cpp */;
};
@@ -38,8 +40,12 @@
4908F317133838BE009AE1AA /* shobject.cpp */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path =
shobject.cpp; sourceTree = "<group>"; };
49713B721357234C0017C1C2 /* shnode_texture.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = shnode_texture.h; sourceTree = "<group>"; };
49713B73135723F40017C1C2 /* shnode_texture.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
path = shnode_texture.cpp; sourceTree = "<group>"; };
- 4974F7461357E0060020AAC6 /* shnodeui_qt.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shnodeui_qt.h;
path = qt/shnodeui_qt.h; sourceTree = "<group>"; };
+ 49742542135D5354000A5EE8 /* shnodecontainerwidget_qt.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
name = shnodecontainerwidget_qt.h; path = qt/shnodecontainerwidget_qt.h;
sourceTree = "<group>"; };
+ 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
name = shnodecontainerwidget_qt.cpp; path =
qt/shnodecontainerwidget_qt.cpp; sourceTree = "<group>"; };
4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
name = shnodeui_qt.cpp; path = qt/shnodeui_qt.cpp; sourceTree = "<group>";
};
+ 49752A901372CEA2003FFCBC /* shnodeuicolor_qt.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
name = shnodeuicolor_qt.h; path = qt/shnodeuicolor_qt.h; sourceTree
= "<group>"; };
+ 49752A911372CF75003FFCBC /* shnodeuicolor_qt.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
name = shnodeuicolor_qt.cpp; path = qt/shnodeuicolor_qt.cpp; sourceTree
= "<group>"; };
+ 497611531365CF9100DC3DDA /* shnodeui_qt.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shnodeui_qt.h;
path = qt/shnodeui_qt.h; sourceTree = "<group>"; };
497909BC13568BEC00CB9B41 /* shnode_color.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
shnode_color.h; sourceTree = "<group>"; };
497909BD13568C9800CB9B41 /* shnode_color.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
path = shnode_color.cpp; sourceTree = "<group>"; };
497BFD1313398B6400079F11 /* shnode.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = shnode.h;
sourceTree = "<group>"; };
@@ -87,6 +93,8 @@
4908F30F1338373A009AE1AA /* inc */ = {
isa = PBXGroup;
children = (
+ 49742542135D5354000A5EE8 /* shnodecontainerwidget_qt.h */,
+ 497611531365CF9100DC3DDA /* shnodeui_qt.h */,
4908F31513383793009AE1AA /* shobject.h */,
497BFD1313398B6400079F11 /* shnode.h */,
497BFD5F133A148F00079F11 /* shmemorytracker.h */,
@@ -94,7 +102,7 @@
499554D8134DE0FB005EF0FB /* shnode_math.h */,
497909BC13568BEC00CB9B41 /* shnode_color.h */,
49713B721357234C0017C1C2 /* shnode_texture.h */,
- 4974F7461357E0060020AAC6 /* shnodeui_qt.h */,
+ 49752A901372CEA2003FFCBC /* shnodeuicolor_qt.h */,
);
path = inc;
sourceTree = "<group>";
@@ -110,6 +118,8 @@
497909BD13568C9800CB9B41 /* shnode_color.cpp */,
49713B73135723F40017C1C2 /* shnode_texture.cpp */,
4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */,
+ 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */,
+ 49752A911372CF75003FFCBC /* shnodeuicolor_qt.cpp */,
);
path = src;
sourceTree = "<group>";
@@ -173,6 +183,8 @@
497909BE13568C9800CB9B41 /* shnode_color.cpp in Sources */,
49713B74135723F40017C1C2 /* shnode_texture.cpp in Sources */,
4974F7481357E0E50020AAC6 /* shnodeui_qt.cpp in Sources */,
+ 49742545135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp in Sources */,
+ 49752A921372CF75003FFCBC /* shnodeuicolor_qt.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
=======================================
--- /trunk/shaderz_v3.xcodeproj/vijayjoseph.mode1v3 Mon Apr 18 19:12:13 2011
+++ /trunk/shaderz_v3.xcodeproj/vijayjoseph.mode1v3 Sun May 22 07:23:49 2011
@@ -197,7 +197,48 @@
<key>Notifications</key>
<array/>
<key>OpenEditors</key>
- <array/>
+ <array>
+ <dict>
+ <key>Content</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>497189071378D35600FA3864</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>497189081378D35600FA3864</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>main.cpp</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>4973798F13856332004596B8</string>
+ <key>history</key>
+ <array>
+ <string>4973B5C3137E855800D475CB</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>Geometry</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 20}, {750, 461}}</string>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <false/>
+ <key>RubberWindowFrame</key>
+ <string>38 250 750 502 0 0 1280 778 </string>
+ </dict>
+ </dict>
+ </array>
<key>PerspectiveWidths</key>
<array>
<integer>-1</integer>
@@ -277,8 +318,8 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>18</integer>
- <integer>10</integer>
+ <integer>22</integer>
+ <integer>12</integer>
<integer>0</integer>
</array>
</array>
@@ -320,7 +361,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>shnodeui_qt.cpp</string>
+ <string>shnodeuicolor_qt.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@@ -328,43 +369,51 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>shnodeui_qt.cpp</string>
+ <string>shnodeuicolor_qt.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>4977DFA4135D224600E26E7A</string>
+ <string>4973798E13856332004596B8</string>
<key>history</key>
<array>
- <string>4908F3281338CA1D009AE1AA</string>
<string>497BFDEA133CBEF600079F11</string>
<string>498A606A133D7B7100083E4F</string>
<string>498A606D133D7B7100083E4F</string>
- <string>499554F3134DEA2D005EF0FB</string>
- <string>4976CD5E1352960F002E5DDE</string>
<string>49727227135323AB0020388D</string>
<string>49727229135323AB0020388D</string>
- <string>497161BA1354AAFA00FA7BED</string>
- <string>497156641355C7D500E6D896</string>
- <string>4971568E1355CBC700E6D896</string>
- <string>497909BF13568EAE00CB9B41</string>
- <string>497909EC13568FBB00CB9B41</string>
- <string>49713B75135727960017C1C2</string>
- <string>49713B78135727960017C1C2</string>
<string>4974F72C1357DED50020AAC6</string>
- <string>4974F7581357E1BC0020AAC6</string>
<string>499B23BA135B4EC200BC6B97</string>
- <string>499B23D4135B526200BC6B97</string>
- <string>4973E3E7135C5CAB001DBAB7</string>
- <string>4973E3E8135C5CAB001DBAB7</string>
<string>4973E3F1135C5CF6001DBAB7</string>
- <string>4973E3FF135C5FA8001DBAB7</string>
- <string>4973E400135C5FA8001DBAB7</string>
- <string>4973E401135C5FA8001DBAB7</string>
- <string>4973E408135C8E94001DBAB7</string>
+ <string>4986F1CD1371787700539823</string>
+ <string>4986F1CF1371787700539823</string>
+ <string>4986F1E613717A2500539823</string>
+ <string>49762C7F13738B0400625D04</string>
+ <string>4973BFC71377827D005DEDA3</string>
+ <string>497326CD137A26CB00FFDEDA</string>
+ <string>497326CE137A26CB00FFDEDA</string>
+ <string>497326CF137A26CB00FFDEDA</string>
+ <string>497326D1137A26CB00FFDEDA</string>
+ <string>4974B1A1137B7A36005DA79C</string>
+ <string>4974B1A2137B7A36005DA79C</string>
+ <string>4974B1A3137B7A36005DA79C</string>
+ <string>4973B59D137E855800D475CB</string>
+ <string>4973B59F137E855800D475CB</string>
+ <string>4973792713853B9F004596B8</string>
+ <string>4973796013853EC1004596B8</string>
+ <string>4973796213853EC1004596B8</string>
+ <string>4973796413853EC1004596B8</string>
+ <string>4973796513853EC1004596B8</string>
+ <string>4973796613853EC1004596B8</string>
+ <string>4973796713853EC1004596B8</string>
+ <string>4973797F1385401E004596B8</string>
+ <string>497379801385401E004596B8</string>
+ <string>497379811385401E004596B8</string>
+ <string>497379821385401E004596B8</string>
+ <string>497379831385401E004596B8</string>
+ <string>497379841385401E004596B8</string>
</array>
<key>prevStack</key>
<array>
- <string>4908F32D1338CA1D009AE1AA</string>
<string>4908F32E1338CA1D009AE1AA</string>
<string>4908F32F1338CA1D009AE1AA</string>
<string>4908F3351338CA1D009AE1AA</string>
@@ -387,9 +436,57 @@
<string>49713B80135727960017C1C2</string>
<string>4974F7311357DED50020AAC6</string>
<string>4974F7391357DF5D0020AAC6</string>
- <string>4974F7501357E17E0020AAC6</string>
<string>4974F7511357E17E0020AAC6</string>
<string>4973E3EB135C5CAB001DBAB7</string>
+ <string>4974254B135D5453000A5EE8</string>
+ <string>497611561365D05100DC3DDA</string>
+ <string>497611571365D05100DC3DDA</string>
+ <string>4986F1D51371787700539823</string>
+ <string>4986F1D71371787700539823</string>
+ <string>4986F1E01371798100539823</string>
+ <string>49752A9E1372E9BA003FFCBC</string>
+ <string>49752AA31372E9BA003FFCBC</string>
+ <string>4973B5BD137E855800D475CB</string>
+ <string>4973B5BF137E855800D475CB</string>
+ <string>4973792C13853B9F004596B8</string>
+ <string>4973792D13853B9F004596B8</string>
+ <string>4973792E13853B9F004596B8</string>
+ <string>4973792F13853B9F004596B8</string>
+ <string>4973793013853B9F004596B8</string>
+ <string>4973793913853C38004596B8</string>
+ <string>4973793A13853C38004596B8</string>
+ <string>4973793B13853C38004596B8</string>
+ <string>4973793C13853C38004596B8</string>
+ <string>4973794313853CC1004596B8</string>
+ <string>4973794413853CC1004596B8</string>
+ <string>4973794513853CC1004596B8</string>
+ <string>4973794613853CC1004596B8</string>
+ <string>4973794713853CC1004596B8</string>
+ <string>4973794813853CC1004596B8</string>
+ <string>4973794913853CC1004596B8</string>
+ <string>4973794A13853CC1004596B8</string>
+ <string>4973794F13853CE6004596B8</string>
+ <string>4973795013853CE6004596B8</string>
+ <string>4973795B13853DC1004596B8</string>
+ <string>4973796B13853EC1004596B8</string>
+ <string>4973796C13853EC1004596B8</string>
+ <string>4973796D13853EC1004596B8</string>
+ <string>4973796E13853EC1004596B8</string>
+ <string>4973796F13853EC1004596B8</string>
+ <string>4973797013853EC1004596B8</string>
+ <string>4973797113853EC1004596B8</string>
+ <string>4973797213853EC1004596B8</string>
+ <string>4973797313853EC1004596B8</string>
+ <string>4973797413853EC1004596B8</string>
+ <string>4973797513853EC1004596B8</string>
+ <string>4973797C13853F18004596B8</string>
+ <string>497379851385401E004596B8</string>
+ <string>497379861385401E004596B8</string>
+ <string>497379871385401E004596B8</string>
+ <string>497379881385401E004596B8</string>
+ <string>497379891385401E004596B8</string>
+ <string>4973798A1385401E004596B8</string>
+ <string>4973798B1385401E004596B8</string>
</array>
</dict>
<key>SplitCount</key>
@@ -447,9 +544,9 @@
</array>
<key>TableOfContents</key>
<array>
- <string>4977DFA5135D224600E26E7A</string>
+ <string>4973792313853A67004596B8</string>
<string>1CE0B1FE06471DED0097A5F4</string>
- <string>4977DFA6135D224600E26E7A</string>
+ <string>4973792413853A67004596B8</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
@@ -583,7 +680,8 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
-
<string>/Users/vijayjoseph/projects/shaderz_v3/shaderz_v3.xcodeproj</string>
+ <string>497189071378D35600FA3864</string>
+ <string>/Users/vijayjoseph/projects/shaderz/shaderz_v3.xcodeproj</string>
</array>
<key>WindowString</key>
<string>0 59 1280 719 0 0 1280 778 </string>
@@ -663,7 +761,7 @@
<key>TableOfContents</key>
<array>
<string>49E86A2E132FC7880067433D</string>
- <string>497161A61354795800FA7BED</string>
+ <string>4971890A1378D35600FA3864</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
=======================================
--- /trunk/shaderz_v3.xcodeproj/vijayjoseph.pbxuser Mon Apr 18 19:12:13 2011
+++ /trunk/shaderz_v3.xcodeproj/vijayjoseph.pbxuser Sun May 22 07:23:49 2011
@@ -10,25 +10,41 @@
);
breakpoints = (
49E86A24132FC7690067433D /* main.cpp:5 */,
- 4908F31B1338C5C6009AE1AA /* shobject.cpp:80 */,
- 4908F31F1338C63A009AE1AA /* shobject.cpp:80 */,
- 4908F3221338C76A009AE1AA /* shobject.cpp:36 */,
- 4908F3251338C7B2009AE1AA /* shobject.cpp:80 */,
- 4908F35E1338CBD3009AE1AA /* main.cpp:53 */,
+ 4908F31B1338C5C6009AE1AA /* shobject.cpp:60 */,
+ 4908F31F1338C63A009AE1AA /* shobject.cpp:60 */,
+ 4908F3221338C76A009AE1AA /* shobject.cpp:16 */,
+ 4908F3251338C7B2009AE1AA /* shobject.cpp:60 */,
+ 4908F35E1338CBD3009AE1AA /* main.cpp:29 */,
497BFDFB133CCED300079F11 /* shmemorytracker.cpp:28 */,
498A603C133CFEC500083E4F /* shmemorytracker.cpp:34 */,
498A6065133D040E00083E4F /* shmemorytracker.cpp:68 */,
- 498A6068133D047F00083E4F /* shobject.cpp:56 */,
- 49724CA3134C8CC000F2DFA9 /* shnode.cpp:188 */,
- 4971619B1354787B00FA7BED /* shnode.cpp:547 */,
+ 498A6068133D047F00083E4F /* shobject.cpp:36 */,
+ 49724CA3134C8CC000F2DFA9 /* shnode.cpp:190 */,
+ 4971619B1354787B00FA7BED /* shnode.cpp:530 */,
4971619F135478D600FA7BED /* shNodeMath::evaluate */,
- 497161A1135478E000FA7BED /* shnode_math.cpp:78 */,
+ 497161A1135478E000FA7BED /* shnode_math.cpp:90 */,
+ 49764A6213605934006CB122 /* shnodecontainerwidget_qt.cpp:213 */,
+ 497188FF1378D26C00FA3864 /* shnodecontainerwidget_qt.cpp:157 */,
);
codeSenseManager = 49E86A20132FC71A0067433D /* Code sense */;
executables = (
49E86A1B132FC6FB0067433D /* shaderz_v3 */,
);
perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey =
PBXErrorsWarningsDataSource_LocationID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 300,
+ 723,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXErrorsWarningsDataSource_TypeID,
+ PBXErrorsWarningsDataSource_MessageID,
+ PBXErrorsWarningsDataSource_LocationID,
+ );
+ };
PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey =
PBXExecutablesDataSource_NameID;
@@ -111,79 +127,121 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 324870722;
- PBXWorkspaceStateSaveDate = 324870722;
+ PBXPerProjectTemplateStateSaveDate = 327498337;
+ PBXWorkspaceStateSaveDate = 327498337;
};
perUserProjectItems = {
- 4908F3281338CA1D009AE1AA = 4908F3281338CA1D009AE1AA /* PBXTextBookmark
*/;
- 4908F32D1338CA1D009AE1AA = 4908F32D1338CA1D009AE1AA /* PBXTextBookmark
*/;
- 4908F32E1338CA1D009AE1AA = 4908F32E1338CA1D009AE1AA /* PBXTextBookmark
*/;
- 4908F32F1338CA1D009AE1AA = 4908F32F1338CA1D009AE1AA /* PBXTextBookmark
*/;
- 4908F3351338CA1D009AE1AA = 4908F3351338CA1D009AE1AA /* PBXTextBookmark
*/;
- 49713B75135727960017C1C2 = 49713B75135727960017C1C2 /* PBXTextBookmark
*/;
- 49713B78135727960017C1C2 = 49713B78135727960017C1C2 /* PBXTextBookmark
*/;
- 49713B7F135727960017C1C2 = 49713B7F135727960017C1C2 /* PBXTextBookmark
*/;
- 49713B80135727960017C1C2 = 49713B80135727960017C1C2 /* PBXTextBookmark
*/;
- 497156641355C7D500E6D896 = 497156641355C7D500E6D896 /* PBXTextBookmark
*/;
- 4971568E1355CBC700E6D896 = 4971568E1355CBC700E6D896 /* PBXTextBookmark
*/;
- 497161BA1354AAFA00FA7BED = 497161BA1354AAFA00FA7BED /* PBXTextBookmark
*/;
- 49727227135323AB0020388D = 49727227135323AB0020388D /* PBXTextBookmark
*/;
- 49727229135323AB0020388D = 49727229135323AB0020388D /* PBXTextBookmark
*/;
- 49727240135323AB0020388D = 49727240135323AB0020388D /* PBXTextBookmark
*/;
- 4973E3DB135C5B59001DBAB7 = 4973E3DB135C5B59001DBAB7 /* PBXTextBookmark
*/;
- 4973E3DC135C5B59001DBAB7 = 4973E3DC135C5B59001DBAB7 /* PBXTextBookmark
*/;
- 4973E3DD135C5B59001DBAB7 = 4973E3DD135C5B59001DBAB7 /* PBXTextBookmark
*/;
- 4973E3DE135C5B59001DBAB7 = 4973E3DE135C5B59001DBAB7 /* PBXTextBookmark
*/;
- 4973E3E2135C5B6C001DBAB7 = 4973E3E2135C5B6C001DBAB7 /* PBXTextBookmark
*/;
- 4973E3E7135C5CAB001DBAB7 = 4973E3E7135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3E8135C5CAB001DBAB7 = 4973E3E8135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3EA135C5CAB001DBAB7 = 4973E3EA135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3EB135C5CAB001DBAB7 = 4973E3EB135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3ED135C5CAB001DBAB7 = 4973E3ED135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3EE135C5CAB001DBAB7 = 4973E3EE135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3EF135C5CAB001DBAB7 = 4973E3EF135C5CAB001DBAB7 /* PBXTextBookmark
*/;
- 4973E3F1135C5CF6001DBAB7 = 4973E3F1135C5CF6001DBAB7 /* PBXTextBookmark
*/;
- 4973E3F3135C5CF6001DBAB7 = 4973E3F3135C5CF6001DBAB7 /* PBXTextBookmark
*/;
- 4973E3F4135C5CF6001DBAB7 = 4973E3F4135C5CF6001DBAB7 /* PBXTextBookmark
*/;
- 4973E3FA135C5E01001DBAB7 = 4973E3FA135C5E01001DBAB7 /* PBXTextBookmark
*/;
- 4973E3FC135C5E01001DBAB7 = 4973E3FC135C5E01001DBAB7 /* PBXTextBookmark
*/;
- 4973E3FF135C5FA8001DBAB7 = 4973E3FF135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E400135C5FA8001DBAB7 = 4973E400135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E401135C5FA8001DBAB7 = 4973E401135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E402135C5FA8001DBAB7 = 4973E402135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E403135C5FA8001DBAB7 = 4973E403135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E404135C5FA8001DBAB7 = 4973E404135C5FA8001DBAB7 /* PBXTextBookmark
*/;
- 4973E408135C8E94001DBAB7 = 4973E408135C8E94001DBAB7 /* PBXTextBookmark
*/;
- 4974F72C1357DED50020AAC6 = 4974F72C1357DED50020AAC6 /* PBXTextBookmark
*/;
- 4974F7311357DED50020AAC6 = 4974F7311357DED50020AAC6 /* PBXTextBookmark
*/;
- 4974F7391357DF5D0020AAC6 = 4974F7391357DF5D0020AAC6 /* PBXTextBookmark
*/;
- 4974F7501357E17E0020AAC6 = 4974F7501357E17E0020AAC6 /* PBXTextBookmark
*/;
- 4974F7511357E17E0020AAC6 = 4974F7511357E17E0020AAC6 /* PBXTextBookmark
*/;
- 4974F7581357E1BC0020AAC6 = 4974F7581357E1BC0020AAC6 /* PBXTextBookmark
*/;
- 4976CD5E1352960F002E5DDE = 4976CD5E1352960F002E5DDE /* PBXTextBookmark
*/;
- 4977DFA4135D224600E26E7A /* PBXTextBookmark */ =
4977DFA4135D224600E26E7A /* PBXTextBookmark */;
- 4978C4BB13441AB700A4ECE4 = 4978C4BB13441AB700A4ECE4 /* PBXTextBookmark
*/;
- 497909BF13568EAE00CB9B41 = 497909BF13568EAE00CB9B41 /* PBXTextBookmark
*/;
- 497909C613568EAE00CB9B41 = 497909C613568EAE00CB9B41 /* PBXTextBookmark
*/;
- 497909C913568EAE00CB9B41 = 497909C913568EAE00CB9B41 /* PBXTextBookmark
*/;
- 497909EC13568FBB00CB9B41 = 497909EC13568FBB00CB9B41 /* PBXTextBookmark
*/;
- 497BFD2013398CDA00079F11 = 497BFD2013398CDA00079F11 /* PBXTextBookmark
*/;
- 497BFD2313398CDA00079F11 = 497BFD2313398CDA00079F11 /* PBXTextBookmark
*/;
- 497BFD6B133A172E00079F11 = 497BFD6B133A172E00079F11 /* PBXTextBookmark
*/;
- 497BFD6C133A172E00079F11 = 497BFD6C133A172E00079F11 /* PBXTextBookmark
*/;
- 497BFD6E133A172E00079F11 = 497BFD6E133A172E00079F11 /* PBXTextBookmark
*/;
- 497BFD9C133ADA2300079F11 = 497BFD9C133ADA2300079F11 /* PBXTextBookmark
*/;
- 497BFDCA133CB8B600079F11 = 497BFDCA133CB8B600079F11 /* PBXTextBookmark
*/;
- 497BFDEA133CBEF600079F11 = 497BFDEA133CBEF600079F11 /* PBXTextBookmark
*/;
- 498A6046133CFF9000083E4F = 498A6046133CFF9000083E4F /* PBXTextBookmark
*/;
- 498A606A133D7B7100083E4F = 498A606A133D7B7100083E4F /* PBXTextBookmark
*/;
- 498A606D133D7B7100083E4F = 498A606D133D7B7100083E4F /* PBXTextBookmark
*/;
- 498A6072133D7B7100083E4F = 498A6072133D7B7100083E4F /* PBXTextBookmark
*/;
- 499554E0134DE58F005EF0FB = 499554E0134DE58F005EF0FB /* PBXTextBookmark
*/;
- 499554E1134DE58F005EF0FB = 499554E1134DE58F005EF0FB /* PBXTextBookmark
*/;
- 499554F3134DEA2D005EF0FB = 499554F3134DEA2D005EF0FB /* PBXTextBookmark
*/;
- 499B23BA135B4EC200BC6B97 = 499B23BA135B4EC200BC6B97 /* PBXTextBookmark
*/;
- 499B23D4135B526200BC6B97 = 499B23D4135B526200BC6B97 /* PBXTextBookmark
*/;
+ 4908F32E1338CA1D009AE1AA /* PBXTextBookmark */ =
4908F32E1338CA1D009AE1AA /* PBXTextBookmark */;
+ 4908F32F1338CA1D009AE1AA /* PBXTextBookmark */ =
4908F32F1338CA1D009AE1AA /* PBXTextBookmark */;
+ 4908F3351338CA1D009AE1AA /* PBXTextBookmark */ =
4908F3351338CA1D009AE1AA /* PBXTextBookmark */;
+ 49713B7F135727960017C1C2 /* PBXTextBookmark */ =
49713B7F135727960017C1C2 /* PBXTextBookmark */;
+ 49713B80135727960017C1C2 /* PBXTextBookmark */ =
49713B80135727960017C1C2 /* PBXTextBookmark */;
+ 49727227135323AB0020388D /* PBXTextBookmark */ =
49727227135323AB0020388D /* PBXTextBookmark */;
+ 49727229135323AB0020388D /* PBXTextBookmark */ =
49727229135323AB0020388D /* PBXTextBookmark */;
+ 49727240135323AB0020388D /* PBXTextBookmark */ =
49727240135323AB0020388D /* PBXTextBookmark */;
+ 497326CD137A26CB00FFDEDA /* PBXTextBookmark */ =
497326CD137A26CB00FFDEDA /* PBXTextBookmark */;
+ 497326CE137A26CB00FFDEDA /* PBXTextBookmark */ =
497326CE137A26CB00FFDEDA /* PBXTextBookmark */;
+ 497326CF137A26CB00FFDEDA /* PBXTextBookmark */ =
497326CF137A26CB00FFDEDA /* PBXTextBookmark */;
+ 497326D1137A26CB00FFDEDA /* PBXTextBookmark */ =
497326D1137A26CB00FFDEDA /* PBXTextBookmark */;
+ 4973792713853B9F004596B8 /* PBXTextBookmark */ =
4973792713853B9F004596B8 /* PBXTextBookmark */;
+ 4973792C13853B9F004596B8 /* PBXTextBookmark */ =
4973792C13853B9F004596B8 /* PBXTextBookmark */;
+ 4973792D13853B9F004596B8 /* PBXTextBookmark */ =
4973792D13853B9F004596B8 /* PBXTextBookmark */;
+ 4973792E13853B9F004596B8 /* PBXTextBookmark */ =
4973792E13853B9F004596B8 /* PBXTextBookmark */;
+ 4973792F13853B9F004596B8 /* PBXTextBookmark */ =
4973792F13853B9F004596B8 /* PBXTextBookmark */;
+ 4973793013853B9F004596B8 /* PBXTextBookmark */ =
4973793013853B9F004596B8 /* PBXTextBookmark */;
+ 4973793913853C38004596B8 /* PBXTextBookmark */ =
4973793913853C38004596B8 /* PBXTextBookmark */;
+ 4973793A13853C38004596B8 /* PBXTextBookmark */ =
4973793A13853C38004596B8 /* PBXTextBookmark */;
+ 4973793B13853C38004596B8 /* PBXTextBookmark */ =
4973793B13853C38004596B8 /* PBXTextBookmark */;
+ 4973793C13853C38004596B8 /* PBXTextBookmark */ =
4973793C13853C38004596B8 /* PBXTextBookmark */;
+ 4973794313853CC1004596B8 /* PBXTextBookmark */ =
4973794313853CC1004596B8 /* PBXTextBookmark */;
+ 4973794413853CC1004596B8 /* PBXTextBookmark */ =
4973794413853CC1004596B8 /* PBXTextBookmark */;
+ 4973794513853CC1004596B8 /* PBXTextBookmark */ =
4973794513853CC1004596B8 /* PBXTextBookmark */;
+ 4973794613853CC1004596B8 /* PBXTextBookmark */ =
4973794613853CC1004596B8 /* PBXTextBookmark */;
+ 4973794713853CC1004596B8 /* PBXTextBookmark */ =
4973794713853CC1004596B8 /* PBXTextBookmark */;
+ 4973794813853CC1004596B8 /* PBXTextBookmark */ =
4973794813853CC1004596B8 /* PBXTextBookmark */;
+ 4973794913853CC1004596B8 /* PBXTextBookmark */ =
4973794913853CC1004596B8 /* PBXTextBookmark */;
+ 4973794A13853CC1004596B8 /* PBXTextBookmark */ =
4973794A13853CC1004596B8 /* PBXTextBookmark */;
+ 4973794F13853CE6004596B8 /* PBXTextBookmark */ =
4973794F13853CE6004596B8 /* PBXTextBookmark */;
+ 4973795013853CE6004596B8 /* PBXTextBookmark */ =
4973795013853CE6004596B8 /* PBXTextBookmark */;
+ 4973795B13853DC1004596B8 /* PBXTextBookmark */ =
4973795B13853DC1004596B8 /* PBXTextBookmark */;
+ 4973796013853EC1004596B8 /* PBXTextBookmark */ =
4973796013853EC1004596B8 /* PBXTextBookmark */;
+ 4973796213853EC1004596B8 /* PBXTextBookmark */ =
4973796213853EC1004596B8 /* PBXTextBookmark */;
+ 4973796413853EC1004596B8 /* PBXTextBookmark */ =
4973796413853EC1004596B8 /* PBXTextBookmark */;
+ 4973796513853EC1004596B8 /* PBXTextBookmark */ =
4973796513853EC1004596B8 /* PBXTextBookmark */;
+ 4973796613853EC1004596B8 /* PBXTextBookmark */ =
4973796613853EC1004596B8 /* PBXTextBookmark */;
+ 4973796713853EC1004596B8 /* PBXTextBookmark */ =
4973796713853EC1004596B8 /* PBXTextBookmark */;
+ 4973796B13853EC1004596B8 /* PBXTextBookmark */ =
4973796B13853EC1004596B8 /* PBXTextBookmark */;
+ 4973796C13853EC1004596B8 /* PBXTextBookmark */ =
4973796C13853EC1004596B8 /* PBXTextBookmark */;
+ 4973796D13853EC1004596B8 /* PBXTextBookmark */ =
4973796D13853EC1004596B8 /* PBXTextBookmark */;
+ 4973796E13853EC1004596B8 /* PBXTextBookmark */ =
4973796E13853EC1004596B8 /* PBXTextBookmark */;
+ 4973796F13853EC1004596B8 /* PBXTextBookmark */ =
4973796F13853EC1004596B8 /* PBXTextBookmark */;
+ 4973797013853EC1004596B8 /* PBXTextBookmark */ =
4973797013853EC1004596B8 /* PBXTextBookmark */;
+ 4973797113853EC1004596B8 /* PBXTextBookmark */ =
4973797113853EC1004596B8 /* PBXTextBookmark */;
+ 4973797213853EC1004596B8 /* PBXTextBookmark */ =
4973797213853EC1004596B8 /* PBXTextBookmark */;
+ 4973797313853EC1004596B8 /* PBXTextBookmark */ =
4973797313853EC1004596B8 /* PBXTextBookmark */;
+ 4973797413853EC1004596B8 /* PBXTextBookmark */ =
4973797413853EC1004596B8 /* PBXTextBookmark */;
+ 4973797513853EC1004596B8 /* PBXTextBookmark */ =
4973797513853EC1004596B8 /* PBXTextBookmark */;
+ 4973797C13853F18004596B8 /* PBXTextBookmark */ =
4973797C13853F18004596B8 /* PBXTextBookmark */;
+ 4973797F1385401E004596B8 /* PBXTextBookmark */ =
4973797F1385401E004596B8 /* PBXTextBookmark */;
+ 497379801385401E004596B8 /* PBXTextBookmark */ =
497379801385401E004596B8 /* PBXTextBookmark */;
+ 497379811385401E004596B8 /* PBXTextBookmark */ =
497379811385401E004596B8 /* PBXTextBookmark */;
+ 497379821385401E004596B8 /* PBXTextBookmark */ =
497379821385401E004596B8 /* PBXTextBookmark */;
+ 497379831385401E004596B8 /* PBXTextBookmark */ =
497379831385401E004596B8 /* PBXTextBookmark */;
+ 497379841385401E004596B8 /* PBXTextBookmark */ =
497379841385401E004596B8 /* PBXTextBookmark */;
+ 497379851385401E004596B8 /* PBXTextBookmark */ =
497379851385401E004596B8 /* PBXTextBookmark */;
+ 497379861385401E004596B8 /* PBXTextBookmark */ =
497379861385401E004596B8 /* PBXTextBookmark */;
+ 497379871385401E004596B8 /* PBXTextBookmark */ =
497379871385401E004596B8 /* PBXTextBookmark */;
+ 497379881385401E004596B8 /* PBXTextBookmark */ =
497379881385401E004596B8 /* PBXTextBookmark */;
+ 497379891385401E004596B8 /* PBXTextBookmark */ =
497379891385401E004596B8 /* PBXTextBookmark */;
+ 4973798A1385401E004596B8 /* PBXTextBookmark */ =
4973798A1385401E004596B8 /* PBXTextBookmark */;
+ 4973798B1385401E004596B8 /* PBXTextBookmark */ =
4973798B1385401E004596B8 /* PBXTextBookmark */;
+ 4973798E13856332004596B8 /* PBXTextBookmark */ =
4973798E13856332004596B8 /* PBXTextBookmark */;
+ 4973798F13856332004596B8 /* PBXTextBookmark */ =
4973798F13856332004596B8 /* PBXTextBookmark */;
+ 4973B59D137E855800D475CB /* PBXTextBookmark */ =
4973B59D137E855800D475CB /* PBXTextBookmark */;
+ 4973B59F137E855800D475CB /* PBXTextBookmark */ =
4973B59F137E855800D475CB /* PBXTextBookmark */;
+ 4973B5BD137E855800D475CB /* PBXTextBookmark */ =
4973B5BD137E855800D475CB /* PBXTextBookmark */;
+ 4973B5BF137E855800D475CB /* PBXTextBookmark */ =
4973B5BF137E855800D475CB /* PBXTextBookmark */;
+ 4973B5C3137E855800D475CB /* PBXTextBookmark */ =
4973B5C3137E855800D475CB /* PBXTextBookmark */;
+ 4973BFC71377827D005DEDA3 /* PBXTextBookmark */ =
4973BFC71377827D005DEDA3 /* PBXTextBookmark */;
+ 4973E3EB135C5CAB001DBAB7 /* PBXTextBookmark */ =
4973E3EB135C5CAB001DBAB7 /* PBXTextBookmark */;
+ 4973E3F1135C5CF6001DBAB7 /* PBXTextBookmark */ =
4973E3F1135C5CF6001DBAB7 /* PBXTextBookmark */;
+ 4974254B135D5453000A5EE8 /* PBXTextBookmark */ =
4974254B135D5453000A5EE8 /* PBXTextBookmark */;
+ 4974B1A1137B7A36005DA79C /* PBXTextBookmark */ =
4974B1A1137B7A36005DA79C /* PBXTextBookmark */;
+ 4974B1A2137B7A36005DA79C /* PBXTextBookmark */ =
4974B1A2137B7A36005DA79C /* PBXTextBookmark */;
+ 4974B1A3137B7A36005DA79C /* PBXTextBookmark */ =
4974B1A3137B7A36005DA79C /* PBXTextBookmark */;
+ 4974F72C1357DED50020AAC6 /* PBXTextBookmark */ =
4974F72C1357DED50020AAC6 /* PBXTextBookmark */;
+ 4974F7311357DED50020AAC6 /* PBXTextBookmark */ =
4974F7311357DED50020AAC6 /* PBXTextBookmark */;
+ 4974F7391357DF5D0020AAC6 /* PBXTextBookmark */ =
4974F7391357DF5D0020AAC6 /* PBXTextBookmark */;
+ 4974F7511357E17E0020AAC6 /* PBXTextBookmark */ =
4974F7511357E17E0020AAC6 /* PBXTextBookmark */;
+ 49752A9E1372E9BA003FFCBC /* PBXTextBookmark */ =
49752A9E1372E9BA003FFCBC /* PBXTextBookmark */;
+ 49752AA31372E9BA003FFCBC /* PBXTextBookmark */ =
49752AA31372E9BA003FFCBC /* PBXTextBookmark */;
+ 497611561365D05100DC3DDA /* PBXTextBookmark */ =
497611561365D05100DC3DDA /* PBXTextBookmark */;
+ 497611571365D05100DC3DDA /* PBXTextBookmark */ =
497611571365D05100DC3DDA /* PBXTextBookmark */;
+ 49762C7F13738B0400625D04 /* PBXTextBookmark */ =
49762C7F13738B0400625D04 /* PBXTextBookmark */;
+ 4978C4BB13441AB700A4ECE4 /* PBXTextBookmark */ =
4978C4BB13441AB700A4ECE4 /* PBXTextBookmark */;
+ 497909C613568EAE00CB9B41 /* PBXTextBookmark */ =
497909C613568EAE00CB9B41 /* PBXTextBookmark */;
+ 497909C913568EAE00CB9B41 /* PBXTextBookmark */ =
497909C913568EAE00CB9B41 /* PBXTextBookmark */;
+ 497BFD2013398CDA00079F11 /* PBXTextBookmark */ =
497BFD2013398CDA00079F11 /* PBXTextBookmark */;
+ 497BFD2313398CDA00079F11 /* PBXTextBookmark */ =
497BFD2313398CDA00079F11 /* PBXTextBookmark */;
+ 497BFD6B133A172E00079F11 /* PBXTextBookmark */ =
497BFD6B133A172E00079F11 /* PBXTextBookmark */;
+ 497BFD6C133A172E00079F11 /* PBXTextBookmark */ =
497BFD6C133A172E00079F11 /* PBXTextBookmark */;
+ 497BFD6E133A172E00079F11 /* PBXTextBookmark */ =
497BFD6E133A172E00079F11 /* PBXTextBookmark */;
+ 497BFD9C133ADA2300079F11 /* PBXTextBookmark */ =
497BFD9C133ADA2300079F11 /* PBXTextBookmark */;
+ 497BFDCA133CB8B600079F11 /* PBXTextBookmark */ =
497BFDCA133CB8B600079F11 /* PBXTextBookmark */;
+ 497BFDEA133CBEF600079F11 /* PBXTextBookmark */ =
497BFDEA133CBEF600079F11 /* PBXTextBookmark */;
+ 4986F1CD1371787700539823 /* PBXTextBookmark */ =
4986F1CD1371787700539823 /* PBXTextBookmark */;
+ 4986F1CF1371787700539823 /* PBXTextBookmark */ =
4986F1CF1371787700539823 /* PBXTextBookmark */;
+ 4986F1D51371787700539823 /* PBXTextBookmark */ =
4986F1D51371787700539823 /* PBXTextBookmark */;
+ 4986F1D71371787700539823 /* PBXTextBookmark */ =
4986F1D71371787700539823 /* PBXTextBookmark */;
+ 4986F1E01371798100539823 /* PBXTextBookmark */ =
4986F1E01371798100539823 /* PBXTextBookmark */;
+ 4986F1E613717A2500539823 /* PBXTextBookmark */ =
4986F1E613717A2500539823 /* PBXTextBookmark */;
+ 498A6046133CFF9000083E4F /* PBXTextBookmark */ =
498A6046133CFF9000083E4F /* PBXTextBookmark */;
+ 498A606A133D7B7100083E4F /* PBXTextBookmark */ =
498A606A133D7B7100083E4F /* PBXTextBookmark */;
+ 498A606D133D7B7100083E4F /* PBXTextBookmark */ =
498A606D133D7B7100083E4F /* PBXTextBookmark */;
+ 498A6072133D7B7100083E4F /* PBXTextBookmark */ =
498A6072133D7B7100083E4F /* PBXTextBookmark */;
+ 499554E0134DE58F005EF0FB /* PBXTextBookmark */ =
499554E0134DE58F005EF0FB /* PBXTextBookmark */;
+ 499554E1134DE58F005EF0FB /* PBXTextBookmark */ =
499554E1134DE58F005EF0FB /* PBXTextBookmark */;
+ 499B23BA135B4EC200BC6B97 /* PBXTextBookmark */ =
499B23BA135B4EC200BC6B97 /* PBXTextBookmark */;
};
sourceControlManager = 49E86A1F132FC71A0067433D /* Source Control */;
userBuildSettings = {
@@ -199,36 +257,36 @@
};
4908F30C13383653009AE1AA /* CMakeLists.txt */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1011, 686}}";
- sepNavSelRange = "{806, 0}";
- sepNavVisRange = "{0, 947}";
+ sepNavIntBoundsRect = "{{0, 0}, {1011, 700}}";
+ sepNavSelRange = "{706, 0}";
+ sepNavVisRange = "{61, 936}";
sepNavWindowFrame = "{{197, 196}, {750, 558}}";
};
};
4908F3111338373A009AE1AA /* main.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1011, 770}}";
- sepNavSelRange = "{1285, 0}";
- sepNavVisRange = "{105, 1321}";
+ sepNavIntBoundsRect = "{{0, 0}, {691, 430}}";
+ sepNavSelRange = "{548, 0}";
+ sepNavVisRange = "{0, 647}";
sepNavWindowFrame = "{{38, 194}, {750, 558}}";
};
};
4908F31513383793009AE1AA /* shobject.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1011, 641}}";
- sepNavSelRange = "{527, 0}";
+ sepNavSelRange = "{274, 1}";
sepNavVisRange = "{0, 538}";
sepNavWindowFrame = "{{61, 173}, {750, 558}}";
};
};
4908F317133838BE009AE1AA /* shobject.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1011, 1120}}";
- sepNavSelRange = "{987, 0}";
- sepNavVisRange = "{608, 1096}";
+ sepNavIntBoundsRect = "{{0, 0}, {1011, 868}}";
+ sepNavSelRange = "{161, 0}";
+ sepNavVisRange = "{0, 891}";
};
};
- 4908F31B1338C5C6009AE1AA /* shobject.cpp:80 */ = {
+ 4908F31B1338C5C6009AE1AA /* shobject.cpp:60 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -240,12 +298,12 @@
functionName = "shObject::operator new( size_t InSize )";
hitCount = 1;
ignoreCount = 0;
- lineNumber = 80;
+ lineNumber = 60;
location = shaderz_v3;
modificationTime = 324303083.1216969;
state = 1;
};
- 4908F31F1338C63A009AE1AA /* shobject.cpp:80 */ = {
+ 4908F31F1338C63A009AE1AA /* shobject.cpp:60 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -257,12 +315,12 @@
functionName = "shObject::decRef()";
hitCount = 0;
ignoreCount = 0;
- lineNumber = 80;
+ lineNumber = 60;
location = shaderz_v3;
modificationTime = 324302977.840129;
state = 1;
};
- 4908F3221338C76A009AE1AA /* shobject.cpp:36 */ = {
+ 4908F3221338C76A009AE1AA /* shobject.cpp:16 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -274,12 +332,12 @@
functionName = "shObject::shObject()";
hitCount = 0;
ignoreCount = 0;
- lineNumber = 36;
+ lineNumber = 16;
location = shaderz_v3;
modificationTime = 324302977.8401361;
state = 2;
};
- 4908F3251338C7B2009AE1AA /* shobject.cpp:80 */ = {
+ 4908F3251338C7B2009AE1AA /* shobject.cpp:60 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -291,37 +349,17 @@
functionName = "shObject::operator new( size_t InSize )";
hitCount = 0;
ignoreCount = 0;
- lineNumber = 80;
+ lineNumber = 60;
location = shaderz_v3;
modificationTime = 324302977.840141;
state = 1;
};
- 4908F3281338CA1D009AE1AA /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = C6859E8B029090EE04C91782 /* shaderz_v3.1 */;
- name = "shaderz_v3.1: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1955;
- vrLoc = 0;
- };
- 4908F32D1338CA1D009AE1AA /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = C6859E8B029090EE04C91782 /* shaderz_v3.1 */;
- name = "shaderz_v3.1: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1955;
- vrLoc = 0;
- };
4908F32E1338CA1D009AE1AA /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4908F30C13383653009AE1AA /* CMakeLists.txt */;
name = "CMakeLists.txt: 34";
rLen = 0;
- rLoc = 964;
+ rLoc = 994;
rType = 0;
vrLen = 706;
vrLoc = 0;
@@ -331,7 +369,7 @@
fRef = 4908F3111338373A009AE1AA /* main.cpp */;
name = "main.cpp: 5";
rLen = 0;
- rLoc = 1426;
+ rLoc = 645;
rType = 0;
vrLen = 82;
vrLoc = 0;
@@ -341,12 +379,12 @@
fRef = 4908F317133838BE009AE1AA /* shobject.cpp */;
name = "shobject.cpp: 64";
rLen = 0;
- rLoc = 1704;
+ rLoc = 1283;
rType = 0;
vrLen = 367;
vrLoc = 292;
};
- 4908F35E1338CBD3009AE1AA /* main.cpp:53 */ = {
+ 4908F35E1338CBD3009AE1AA /* main.cpp:29 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -358,7 +396,7 @@
functionName = "main (int argc, char * const argv[])";
hitCount = 0;
ignoreCount = 0;
- lineNumber = 53;
+ lineNumber = 29;
location = shaderz_v3;
modificationTime = 324302977.8401459;
state = 1;
@@ -373,30 +411,10 @@
49713B73135723F40017C1C2 /* shnode_texture.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1011, 641}}";
- sepNavSelRange = "{186, 0}";
- sepNavVisRange = "{0, 365}";
+ sepNavSelRange = "{425, 0}";
+ sepNavVisRange = "{0, 430}";
};
};
- 49713B75135727960017C1C2 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 497909BC13568BEC00CB9B41 /* shnode_color.h */;
- name = "shnode_color.h: 23";
- rLen = 0;
- rLoc = 436;
- rType = 0;
- vrLen = 654;
- vrLoc = 0;
- };
- 49713B78135727960017C1C2 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 497909BD13568C9800CB9B41 /* shnode_color.cpp */;
- name = "shnode_color.cpp: 34";
- rLen = 0;
- rLoc = 968;
- rType = 0;
- vrLen = 968;
- vrLoc = 0;
- };
49713B7F135727960017C1C2 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 49713B721357234C0017C1C2 /* shnode_texture.h */;
@@ -417,27 +435,7 @@
vrLen = 365;
vrLoc = 0;
};
- 497156641355C7D500E6D896 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 497BFD96133AD9E400079F11 /* shdefs.h */;
- name = "shdefs.h: 14";
- rLen = 0;
- rLoc = 229;
- rType = 0;
- vrLen = 240;
- vrLoc = 0;
- };
- 4971568E1355CBC700E6D896 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
- name = "shnode_math.cpp: 72";
- rLen = 0;
- rLoc = 1744;
- rType = 0;
- vrLen = 1232;
- vrLoc = 1389;
- };
- 4971619B1354787B00FA7BED /* shnode.cpp:547 */ = {
+ 4971619B1354787B00FA7BED /* shnode.cpp:530 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -449,7 +447,7 @@
functionName = "shNode::dumpNodeStats()";
hitCount = 3;
ignoreCount = 0;
- lineNumber = 547;
+ lineNumber = 530;
location = shaderz_v3;
modificationTime = 324303097.792842;
state = 1;
@@ -466,7 +464,7 @@
state = 1;
symbolName = "shNodeMath::evaluate";
};
- 497161A1135478E000FA7BED /* shnode_math.cpp:78 */ = {
+ 497161A1135478E000FA7BED /* shnode_math.cpp:90 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -477,21 +475,27 @@
fileReference = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
hitCount = 1;
ignoreCount = 0;
- lineNumber = 78;
+ lineNumber = 90;
modificationTime = 324303090.806878;
state = 1;
};
- 497161BA1354AAFA00FA7BED /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 497BFD60133A160D00079F11 /* shmemorytracker.cpp */;
- name = "shmemorytracker.cpp: 24";
- rLen = 0;
- rLoc = 476;
- rType = 0;
- vrLen = 1181;
- vrLoc = 244;
+ 497188FF1378D26C00FA3864 /* shnodecontainerwidget_qt.cpp:157 */ = {
+ isa = PBXFileBreakpoint;
+ actions = (
+ );
+ breakpointStyle = 0;
+ continueAfterActions = 0;
+ countType = 0;
+ delayBeforeContinue = 0;
+ fileReference = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp
*/;
+ functionName = "shNodeContainerWidget::onCreateRGBANode()";
+ hitCount = 0;
+ ignoreCount = 0;
+ lineNumber = 157;
+ modificationTime = 326685292.643966;
+ state = 1;
};
- 49724CA3134C8CC000F2DFA9 /* shnode.cpp:188 */ = {
+ 49724CA3134C8CC000F2DFA9 /* shnode.cpp:190 */ = {
isa = PBXFileBreakpoint;
actions = (
);
@@ -503,7 +507,7 @@
functionName = "shNode::connect( std::string InStubNameToConnect,
shNode* InOtherNode, std::string InOtherStubName )";
hitCount = 2;
ignoreCount = 0;
- lineNumber = 188;
+ lineNumber = 190;
location = shaderz_v3;
modificationTime = 324303090.1452979;
state = 1;
@@ -552,259 +556,774 @@
path
= "/Developer/SDKs/MacOSX10.5.sdk/usr/include/gcc/darwin/3.3/c++/ext/stl_rope.h";
sourceTree = "<absolute>";
};
- 4973E3DB135C5B59001DBAB7 /* PBXTextBookmark */ = {
+ 497326CD137A26CB00FFDEDA /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7461357E0060020AAC6 /* shnodeui_qt.h */;
- name = "shnodeui_qt.h: 73";
+ fRef = 497BFD5F133A148F00079F11 /* shmemorytracker.h */;
+ name = "shmemorytracker.h: 26";
rLen = 0;
- rLoc = 1530;
+ rLoc = 355;
rType = 0;
- vrLen = 1096;
- vrLoc = 614;
+ vrLen = 836;
+ vrLoc = 77;
};
- 4973E3DC135C5B59001DBAB7 /* PBXTextBookmark */ = {
+ 497326CE137A26CB00FFDEDA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD96133AD9E400079F11 /* shdefs.h */;
+ name = "shdefs.h: 14";
+ rLen = 0;
+ rLoc = 229;
+ rType = 0;
+ vrLen = 240;
+ vrLoc = 0;
+ };
+ 497326CF137A26CB00FFDEDA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 499554D8134DE0FB005EF0FB /* shnode_math.h */;
+ name = "shnode_math.h: 22";
+ rLen = 0;
+ rLoc = 374;
+ rType = 0;
+ vrLen = 920;
+ vrLoc = 134;
+ };
+ 497326D1137A26CB00FFDEDA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 49713B721357234C0017C1C2 /* shnode_texture.h */;
+ name = "shnode_texture.h: 22";
+ rLen = 0;
+ rLoc = 406;
+ rType = 0;
+ vrLen = 463;
+ vrLoc = 0;
+ };
+ 4973792713853B9F004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4973B5C2137E855800D475CB /* distcoordinator_agentlistener.h */;
+ name = "distcoordinator_agentlistener.h: 5";
+ rLen = 0;
+ rLoc = 149;
+ rType = 0;
+ vrLen = 650;
+ vrLoc = 0;
+ };
+ 4973792C13853B9F004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4973B5C2137E855800D475CB /* distcoordinator_agentlistener.h */;
+ name = "distcoordinator_agentlistener.h: 5";
+ rLen = 0;
+ rLoc = 149;
+ rType = 0;
+ vrLen = 650;
+ vrLoc = 0;
+ };
+ 4973792D13853B9F004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */;
- name = "shnodeui_qt.cpp: 156";
+ name = "shnodeui_qt.cpp: 78";
rLen = 0;
- rLoc = 4591;
+ rLoc = 2427;
rType = 0;
- vrLen = 1105;
- vrLoc = 3315;
+ vrLen = 1372;
+ vrLoc = 2208;
};
- 4973E3DD135C5B59001DBAB7 /* PBXTextBookmark */ = {
+ 4973792E13853B9F004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7461357E0060020AAC6 /* shnodeui_qt.h */;
- name = "shnodeui_qt.h: 76";
- rLen = 12;
- rLoc = 1653;
+ fRef = 49713B73135723F40017C1C2 /* shnode_texture.cpp */;
+ name = "shnode_texture.cpp: 18";
+ rLen = 0;
+ rLoc = 425;
rType = 0;
- vrLen = 1117;
- vrLoc = 614;
+ vrLen = 430;
+ vrLoc = 0;
};
- 4973E3DE135C5B59001DBAB7 /* PBXTextBookmark */ = {
+ 4973792F13853B9F004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */;
- name = "shnodeui_qt.cpp: 156";
+ name = "shnodeui_qt.cpp: 61";
+ rLen = 15;
+ rLoc = 1778;
+ rType = 0;
+ vrLen = 1785;
+ vrLoc = 465;
+ };
+ 4973793013853B9F004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD1313398B6400079F11 /* shnode.h */;
+ name = "shnode.h: 115";
rLen = 0;
- rLoc = 4481;
+ rLoc = 2796;
rType = 0;
- vrLen = 1139;
- vrLoc = 3377;
+ vrLen = 1799;
+ vrLoc = 2004;
};
- 4973E3E2135C5B6C001DBAB7 /* PBXTextBookmark */ = {
+ 4973793913853C38004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7461357E0060020AAC6 /* shnodeui_qt.h */;
- name = "shnodeui_qt.h: 73";
+ fRef = 497BFD1413398C8500079F11 /* shnode.cpp */;
+ name = "shnode.cpp: 289";
rLen = 0;
- rLoc = 1536;
+ rLoc = 7731;
rType = 0;
- vrLen = 1112;
- vrLoc = 614;
+ vrLen = 1342;
+ vrLoc = 7101;
};
- 4973E3E6135C5CAB001DBAB7 /* shnodeui.cpp */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = shnodeui.cpp;
- path = /Users/vijayjoseph/projects/shaderz_v2.0/src/qt/shnodeui.cpp;
- sourceTree = "<absolute>";
+ 4973793A13853C38004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497909BD13568C9800CB9B41 /* shnode_color.cpp */;
+ name = "shnode_color.cpp: 20";
+ rLen = 9;
+ rLoc = 370;
+ rType = 0;
+ vrLen = 1277;
+ vrLoc = 0;
};
- 4973E3E7135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973793B13853C38004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 49713B73135723F40017C1C2 /* shnode_texture.cpp */;
- name = "shnode_texture.cpp: 12";
+ fRef = 497909BC13568BEC00CB9B41 /* shnode_color.h */;
+ name = "shnode_color.h: 32";
rLen = 0;
- rLoc = 186;
+ rLoc = 1091;
rType = 0;
- vrLen = 365;
+ vrLen = 1615;
+ vrLoc = 22;
+ };
+ 4973793C13853C38004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497909BD13568C9800CB9B41 /* shnode_color.cpp */;
+ name = "shnode_color.cpp: 26";
+ rLen = 0;
+ rLoc = 666;
+ rType = 0;
+ vrLen = 1285;
vrLoc = 0;
};
- 4973E3E8135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973794313853CC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7461357E0060020AAC6 /* shnodeui_qt.h */;
- name = "shnodeui_qt.h: 75";
+ fRef = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
+ name = "shnode_math.cpp: 120";
rLen = 0;
- rLoc = 1629;
+ rLoc = 2971;
rType = 0;
- vrLen = 1165;
- vrLoc = 614;
+ vrLen = 1073;
+ vrLoc = 2058;
};
- 4973E3EA135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973794413853CC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */;
- name = "shnodeui_qt.cpp: 126";
+ fRef = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */;
+ name = "shnodecontainerwidget_qt.cpp: 126";
rLen = 0;
- rLoc = 3712;
+ rLoc = 3937;
rType = 0;
- vrLen = 1036;
- vrLoc = 3356;
+ vrLen = 2058;
+ vrLoc = 3547;
};
- 4973E3EB135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973794513853CC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4973E3EC135C5CAB001DBAB7 /* shnodeui.cpp */;
- name = "shnodeui.cpp: 1";
+ fRef = 49752A911372CF75003FFCBC /* shnodeuicolor_qt.cpp */;
+ name = "shnodeuicolor_qt.cpp: 34";
rLen = 0;
- rLoc = 0;
+ rLoc = 729;
rType = 0;
- vrLen = 1485;
- vrLoc = 586;
+ vrLen = 1309;
+ vrLoc = 285;
};
- 4973E3EC135C5CAB001DBAB7 /* shnodeui.cpp */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.cpp;
- name = shnodeui.cpp;
- path = /Users/vijayjoseph/projects/shaderz_v2.0/src/qt/shnodeui.cpp;
- sourceTree = "<absolute>";
+ 4973794613853CC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */;
+ name = "shnodecontainerwidget_qt.cpp: 127";
+ rLen = 0;
+ rLoc = 4042;
+ rType = 0;
+ vrLen = 1957;
+ vrLoc = 3547;
};
- 4973E3ED135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973794713853CC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD1313398B6400079F11 /* shnode.h */;
+ name = "shnode.h: 129";
+ rLen = 0;
+ rLoc = 3389;
+ rType = 0;
+ vrLen = 1666;
+ vrLoc = 2489;
+ };
+ 4973794813853CC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */;
+ name = "shnodecontainerwidget_qt.cpp: 127";
+ rLen = 0;
+ rLoc = 4042;
+ rType = 0;
+ vrLen = 1957;
+ vrLoc = 3547;
+ };
+ 4973794913853CC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD1313398B6400079F11 /* shnode.h */;
+ name = "shnode.h: 113";
+ rLen = 17;
+ rLoc = 2665;
+ rType = 0;
+ vrLen = 1642;
+ vrLoc = 2513;
+ };
+ 4973794A13853CC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
+ name = "shnode_math.cpp: 120";
+ rLen = 0;
+ rLoc = 2971;
+ rType = 0;
+ vrLen = 1075;
+ vrLoc = 2056;
+ };
+ 4973794F13853CE6004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */;
+ name = "shnodecontainerwidget_qt.cpp: 129";
+ rLen = 0;
+ rLoc = 4233;
+ rType = 0;
+ vrLen = 2038;
+ vrLoc = 3547;
+ };
+ 4973795013853CE6004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD1313398B6400079F11 /* shnode.h */;
+ name = "shnode.h: 113";
+ rLen = 17;
+ rLoc = 2665;
+ rType = 0;
+ vrLen = 1642;
+ vrLoc = 2513;
+ };
+ 4973795B13853DC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 49742544135D53C2000A5EE8 /* shnodecontainerwidget_qt.cpp */;
+ name = "shnodecontainerwidget_qt.cpp: 219";
+ rLen = 0;
+ rLoc = 7874;
+ rType = 0;
+ vrLen = 1869;
+ vrLoc = 6929;
+ };
+ 4973796013853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497909BC13568BEC00CB9B41 /* shnode_color.h */;
+ name = "shnode_color.h: 31";
+ rLen = 0;
+ rLoc = 1091;
+ rType = 0;
+ vrLen = 1453;
+ vrLoc = 22;
+ };
+ 4973796213853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4908F317133838BE009AE1AA /* shobject.cpp */;
+ name = "shobject.cpp: 11";
+ rLen = 0;
+ rLoc = 161;
+ rType = 0;
+ vrLen = 891;
+ vrLoc = 0;
+ };
+ 4973796413853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD60133A160D00079F11 /* shmemorytracker.cpp */;
+ name = "shmemorytracker.cpp: 15";
+ rLen = 0;
+ rLoc = 243;
+ rType = 0;
+ vrLen = 1039;
+ vrLoc = 27;
+ };
+ 4973796513853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
+ name = "shnode_math.cpp: 67";
+ rLen = 8;
+ rLoc = 1616;
+ rType = 0;
+ vrLen = 1104;
+ vrLoc = 1144;
+ };
+ 4973796613853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497909BD13568C9800CB9B41 /* shnode_color.cpp */;
+ name = "shnode_color.cpp: 33";
+ rLen = 0;
+ rLoc = 943;
+ rType = 0;
+ vrLen = 1222;
+ vrLoc = 0;
+ };
+ 4973796713853EC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 49713B73135723F40017C1C2 /* shnode_texture.cpp */;
- name = "shnode_texture.cpp: 12";
+ name = "shnode_texture.cpp: 18";
rLen = 0;
- rLoc = 186;
+ rLoc = 425;
rType = 0;
- vrLen = 365;
+ vrLen = 430;
vrLoc = 0;
};
- 4973E3EE135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973796B13853EC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4974F7471357E0E50020AAC6 /* shnodeui_qt.cpp */;
- name = "shnodeui_qt.cpp: 126";
+ name = "shnodeui_qt.cpp: 91";
rLen = 0;
- rLoc = 3712;
+ rLoc = 2885;
+ rType = 0;
+ vrLen = 1321;
+ vrLoc = 2467;
+ };
+ 4973796C13853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497909BC13568BEC00CB9B41 /* shnode_color.h */;
+ name = "shnode_color.h: 31";
+ rLen = 0;
+ rLoc = 1091;
+ rType = 0;
+ vrLen = 1453;
+ vrLoc = 22;
+ };
+ 4973796D13853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4908F3111338373A009AE1AA /* main.cpp */;
+ name = "main.cpp: 19";
+ rLen = 0;
+ rLoc = 374;
+ rType = 0;
+ vrLen = 647;
+ vrLoc = 0;
+ };
+ 4973796E13853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4908F317133838BE009AE1AA /* shobject.cpp */;
+ name = "shobject.cpp: 11";
+ rLen = 0;
+ rLoc = 161;
+ rType = 0;
+ vrLen = 891;
+ vrLoc = 0;
+ };
+ 4973796F13853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD1413398C8500079F11 /* shnode.cpp */;
+ name = "shnode.cpp: 508";
+ rLen = 8;
+ rLoc = 13573;
+ rType = 0;
+ vrLen = 1418;
+ vrLoc = 13520;
+ };
+ 4973797013853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 497BFD60133A160D00079F11 /* shmemorytracker.cpp */;
+ name = "shmemorytracker.cpp: 15";
+ rLen = 0;
+ rLoc = 243;
rType = 0;
vrLen = 1039;
- vrLoc = 3353;
+ vrLoc = 27;
};
- 4973E3EF135C5CAB001DBAB7 /* PBXTextBookmark */ = {
+ 4973797113853EC1004596B8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4974F7461357E0060020AAC6 /* shnodeui_qt.h */;
- name = "shnodeui_qt.h: 75";
+ fRef = 499554D9134DE191005EF0FB /* shnode_math.cpp */;
+ name = "shnode_math.cpp: 67";
+ rLen = 8;
+ rLoc = 1616;
+ rType = 0;
+ vrLen = 1104;
+ vrLoc = 1144;
+ };
+ 4973797213853EC1004596B8 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/src/main.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/main.cpp Sun May 22 07:23:49 2011
@@ -7,6 +7,7 @@
#include "shnode_math.h"
#include "shnode_color.h"
#include "shnodeui_qt.h"
+#include "shnodecontainerwidget_qt.h"

using namespace shaderz;
using namespace shaderzui::qt;
@@ -14,41 +15,15 @@
int main (int argc, char * const argv[])
{
std::cout<<"Shaderz v3.1\n";
-
- float C1[] = { 12.0f, 15.0f };
- float C2[] = { 15.0f, 18.0f };
-
- shNode* pConst1 = new shNodeConstant("Const1", C1, 2 );
- shNode* pConst2 = new shNodeConstant("Const2", C2, 2);
- shNode* pAdditionNode = new shNodeMath( "AddtionNode",
shNodeMath::SHMO_Division );
- pAdditionNode->addInputStub("arg1", shNode::SHST_CONST3VEC);
- pAdditionNode->addInputStub("arg2", shNode::SHST_CONST3VEC);
- pAdditionNode->addOutputStub("Out", shNode::SHST_CONST3VEC);
-
- //pConst1->connect( "Out", pAdditionNode, "arg1" );
- pAdditionNode->connect( "arg1", pConst1, "Out" );
- pAdditionNode->connect( "arg2", pConst2, "Out" );
- pAdditionNode->rename("DivisionNode");
- pAdditionNode->renameStub("arg1", "divisor" );
-
- pAdditionNode->evaluate();
-
- pConst1->dumpNodeStats();
- pConst2->dumpNodeStats();
- pAdditionNode->dumpNodeStats();
-
+
QApplication shaderzApp( argc, (char**)argv );
- QMainWindow w;
- w.setGeometry(100,100,400,400);
- w.show();
-
- shNodeUI testWidget(&w, pAdditionNode);
- testWidget.setGeometry(100,100,100,100);
- testWidget.show();
-
- delete pConst1;
- delete pConst2;
- delete pAdditionNode;
-
- return shaderzApp.exec();
-}
+ QWidget mainWidget(0);
+ shNodeContainerWidget* pContainer = new
shNodeContainerWidget(&mainWidget);
+ pContainer->setGeometry(0,0,400,400);
+ pContainer->show();
+ mainWidget.show();
+
+ return shaderzApp.exec();
+
+ return 0;
+}
=======================================
--- /trunk/src/qt/shnodeui_qt.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/qt/shnodeui_qt.cpp Sun May 22 07:23:49 2011
@@ -7,6 +7,7 @@
*
*/

+#include <QApplication>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QGroupBox>
@@ -21,18 +22,24 @@
const int shNodeUI::WIDGETSIZE = 100;
const int linkStubUI::LINKSTUBSIZE = 10;

+#include "shnode_color.h"
+#include "shnodeuicolor_qt.h"
shNodeUI::shNodeUI( QWidget* InParent, shNode* InNode )
: ParentClass(InParent, Qt::Dialog | Qt::CustomizeWindowHint |
Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
, mPreviewWidget(0)
-{
+ , mNode(InNode)
+{
+ // mark this widget to be deleted when closed
+ setAttribute( Qt::WA_DeleteOnClose );
+
QVBoxLayout* pMainLayout = new QVBoxLayout;
pMainLayout->setContentsMargins( 0, 0, 0, 0 );
-
+
// preview widget
- mPreviewWidget = new QWidget(this);
+ mPreviewWidget = new nodePreviewWidget(this);
mPreviewWidget->setMinimumSize( QSize(WIDGETSIZE, WIDGETSIZE) );
- mPreviewWidget->setStyleSheet( QString("QWidget { background-color: blue
}") );
pMainLayout->addWidget( mPreviewWidget );
+ connect( mPreviewWidget, SIGNAL(clicked()), this,
SLOT(onPreviewWidgetClicked()) );

// stub section
QGroupBox* pStubSection = new QGroupBox( tr("") );
@@ -43,40 +50,54 @@
pStubSection->setFlat(true);

// input stubs
- QGroupBox* pInputStubGroup = new QGroupBox( tr("") );
- {
- // set layout
- QVBoxLayout* pInputStubLayout = new QVBoxLayout;
- pInputStubLayout->setContentsMargins( 0, 0, 0, 0 );
- pInputStubGroup->setLayout(pInputStubLayout);
-
- // add widgets
- std::vector<shNode::linkStub>& inputStubs = InNode->inputStubs();
- for( int ipIndex=0; ipIndex < inputStubs.size(); ++ipIndex )
- {
- pInputStubLayout->addWidget( new linkStubUI( this,
&inputStubs[ipIndex], linkStubUI::STUBALIGN_LEFT ) );
- }
- }
- pStubSectionLayout->addWidget( pInputStubGroup );
- pStubSectionLayout->setAlignment( pInputStubGroup, Qt::AlignLeft );
+ std::vector<shNode::linkStub*>& inputStubs = InNode->inputStubs();
+ if( inputStubs.size() > 0 )
+ {
+ QGroupBox* pInputStubGroup = new QGroupBox( tr(""), this );
+ {
+ // set layout
+ QVBoxLayout* pInputStubLayout = new QVBoxLayout;
+ pInputStubLayout->setContentsMargins( 0, 0, 0, 0 );
+ pInputStubGroup->setLayout(pInputStubLayout);
+
+ // add widgets
+ for( int ipIndex=0; ipIndex < inputStubs.size(); ++ipIndex )
+ {
+ linkStubUI* pNewStub = new linkStubUI( this, inputStubs[ipIndex],
linkStubUI::STUBALIGN_LEFT );
+ pInputStubLayout->addWidget( pNewStub );
+ connect( pNewStub, SIGNAL(stubInteraction(shStubInteraction,
linkStubUI*)), this, SLOT(onStubInteraction(shStubInteraction,
linkStubUI*)) );
+
+ mAllStubs.push_back( pNewStub );
+ }
+ }
+ pStubSectionLayout->addWidget( pInputStubGroup );
+ pStubSectionLayout->setAlignment( pInputStubGroup, Qt::AlignLeft );
+ }

// output stubs
- QGroupBox* pOutputStubGroup = new QGroupBox( tr("") );
- {
- // set layout
- QVBoxLayout* pOutputStubLayout = new QVBoxLayout;
- pOutputStubLayout->setContentsMargins( 0, 0, 0, 0 );
- pOutputStubGroup->setLayout(pOutputStubLayout);
-
- // add widgets
- std::vector<shNode::linkStub>& outputStubs = InNode->outputStubs();
- for( int opIndex=0; opIndex < outputStubs.size(); ++opIndex )
- {
- pOutputStubLayout->addWidget( new linkStubUI( this,
&outputStubs[opIndex], linkStubUI::STUBALIGN_RIGHT ) );
- }
- }
- pStubSectionLayout->addWidget( pOutputStubGroup );
- pStubSectionLayout->setAlignment( pOutputStubGroup, Qt::AlignRight );
+ std::vector<shNode::linkStub*>& outputStubs = InNode->outputStubs();
+ if( outputStubs.size() > 0 )
+ {
+ QGroupBox* pOutputStubGroup = new QGroupBox( tr(""), this );
+ {
+ // set layout
+ QVBoxLayout* pOutputStubLayout = new QVBoxLayout;
+ pOutputStubLayout->setContentsMargins( 0, 0, 0, 0 );
+ pOutputStubGroup->setLayout(pOutputStubLayout);
+
+ // add widgets
+ for( int opIndex=0; opIndex < outputStubs.size(); ++opIndex )
+ {
+ linkStubUI* pNewStub = new linkStubUI( this, outputStubs[opIndex],
linkStubUI::STUBALIGN_RIGHT );
+ pOutputStubLayout->addWidget( pNewStub );
+ connect( pNewStub, SIGNAL(stubInteraction(shStubInteraction,
linkStubUI*)), this, SLOT(onStubInteraction(shStubInteraction,
linkStubUI*)) );
+
+ mAllStubs.push_back( pNewStub );
+ }
+ }
+ pStubSectionLayout->addWidget( pOutputStubGroup );
+ pStubSectionLayout->setAlignment( pOutputStubGroup, Qt::AlignRight );
+ }

pMainLayout->addWidget( pStubSection );

@@ -87,28 +108,121 @@
}
setLayout( pMainLayout );
}
+
+shNodeUI::~shNodeUI()
+{
+ // emit the signal indicating that the node is being destroyed
+ emit nodeUIDeleted((unsigned int)mNode);
+
+ // the UI has taken ownership of the node; hence we need to delete it
+ if( mNode )
+ {
+ delete mNode;
+ }
+}
+
+void shNodeUI::onStubInteraction( shStubInteraction InInteraction,
linkStubUI* InSelectedStubUI)
+{
+ // new connection will be handled at this level
+ if( InInteraction == SHSI_TryNewConnection )
+ {
+ shNode* pDragOriginNode = node();
+ const shNode::linkStub* pDragOriginStub = InSelectedStubUI->linkStub();
+
+// Parenting may be a problem here... the hierarchy may include layouts
also
+#define FIND_PARENT( parentClass, startWidget, result ) \
+ { \
+ result = 0; \
+ QObject* myParent = startWidget; \
+ while( myParent && !result ) \
+ { \
+ result = dynamic_cast<parentClass*>(myParent); \
+ myParent = myParent->parent(); \
+ } \
+ }
+ simpleStubWidget* pStubWidget =
dynamic_cast<simpleStubWidget*>(QApplication::widgetAt( QCursor::pos() ));
+ linkStubUI* pStubUI = 0;
+ shNodeUI* pNodeUI = 0;
+ FIND_PARENT( linkStubUI, pStubWidget, pStubUI );
+ FIND_PARENT( shNodeUI, pStubUI, pNodeUI );
+ shNode* pDragEndNode = pNodeUI ? pNodeUI->node() : 0;
+ const shNode::linkStub* pDragEndStub = pStubUI ? pStubUI->linkStub() : 0;
+
+ // cannot connect stubs of the same io type
+ if( !pDragEndNode || !pDragEndStub || pDragOriginStub->ioType ==
pDragEndStub->ioType )
+ {
+ return;
+ }
+
+ const shNode::linkStub* pInputStub = pDragOriginStub->ioType ==
shNode::SHIO_INPUT ? pDragOriginStub : pDragEndStub;
+ const shNode::linkStub* pOutputStub = pDragOriginStub->ioType ==
shNode::SHIO_OUTPUT ? pDragOriginStub : pDragEndStub;
+
+ if( pDragOriginNode->areStubsCompatible(pOutputStub->type,
pInputStub->type) )
+ {
+ pDragOriginNode->connect( pDragOriginStub->name, pDragEndNode,
pDragEndStub->name );
+ }
+ }
+ else
+ {
+ emit stubInteraction( InInteraction, InSelectedStubUI, this );
+ }
+}
+
+void shNodeUI::onPreviewWidgetClicked()
+{
+ // nothing to do here
+}
+
+/**
+ * Finds the UI for the given link stub.
+ */
+linkStubUI* shNodeUI::findUIForStub( const shaderz::shNode::linkStub*
InLinkStub ) const
+{
+ linkStubUI* pRequiredUIStub = 0;
+
+ for( int stubIndex=0; stubIndex < mAllStubs.size(); ++stubIndex )
+ {
+ if( mAllStubs[stubIndex]->linkStub() == InLinkStub )
+ {
+ pRequiredUIStub = mAllStubs[stubIndex];
+ break;
+ }
+ }
+
+ return pRequiredUIStub;
+}
+
+void shNodeUI::moveEvent( QMoveEvent* InEventInfo )
+{
+ ParentClass::moveEvent( InEventInfo );
+
+ // emit the signal corrosponding to moved ui
+ emit nodeUIMoved();
+}

/////////////////////////////////////////////////
// linkStubUI
linkStubUI::linkStubUI( QWidget* InParent, shNode::linkStub* InLinkStub,
linkStubUI::alignMode InAlignMode )
: ParentClass(InParent)
+ , mLinkStub(InLinkStub)
+ , mAlignMode( InAlignMode )
{
QHBoxLayout* pMainLayout = new QHBoxLayout;
pMainLayout->setContentsMargins( 0, 0, 0, 0 );

- QWidget* pStubBox = new simpleStubWidget(this, QColor(0,0,255),
QColor(0,255,0));
- pStubBox->setMinimumSize(LINKSTUBSIZE, LINKSTUBSIZE);
- pStubBox->setMaximumSize(LINKSTUBSIZE, LINKSTUBSIZE);
+ mInternalStubWidget = new simpleStubWidget(this, QColor(0,0,255),
QColor(0,255,0));
+ mInternalStubWidget->setMinimumSize(LINKSTUBSIZE, LINKSTUBSIZE);
+ mInternalStubWidget->setMaximumSize(LINKSTUBSIZE, LINKSTUBSIZE);

if( InAlignMode == STUBALIGN_LEFT )
{
- pMainLayout->addWidget( pStubBox );
+ pMainLayout->addWidget( mInternalStubWidget );
pMainLayout->addWidget( new QLabel( InLinkStub->name.c_str() ) );
}
else
{
pMainLayout->addWidget( new QLabel( InLinkStub->name.c_str() ) );
- pMainLayout->addWidget( pStubBox );
+ pMainLayout->addWidget( mInternalStubWidget );
}

if( layout() )
@@ -117,12 +231,25 @@
}
setLayout( pMainLayout );

- // connect the signals
- connect( pStubBox, SIGNAL(mouseDown(QMouseEvent*)), this,
SLOT(onStubMousePressed(QMouseEvent*)) );
+ // connect the signals so that the selection is propagated
+ connect( mInternalStubWidget, SIGNAL(stubInteraction(shStubInteraction)),
this, SLOT(onStubInteraction(shStubInteraction)) );
}

-void linkStubUI::onStubMousePressed( QMouseEvent* InEventInfo )
-{
+QPoint linkStubUI::getStubPos() const
+{
+ QPoint widgetPos = QPoint();
+ if( mInternalStubWidget )
+ {
+ widgetPos = mInternalStubWidget->pos();
+ widgetPos += QPoint( mInternalStubWidget->width()/2,
mInternalStubWidget->height()/2 );
+ }
+
+ return widgetPos;
+}
+
+void linkStubUI::onStubInteraction(shStubInteraction InInteraction)
+{
+ emit stubInteraction( InInteraction, this);
}

/////////////////////////////////////////////////////
@@ -142,24 +269,45 @@
ParentClass::mousePressEvent(InEventInfo);

// emit the mouse down signal
- emit mouseDown(InEventInfo);
+ emit stubInteraction(SHSI_MousePressed);
}

void simpleStubWidget::mouseMoveEvent( QMouseEvent* InEventInfo )
{
ParentClass::mouseMoveEvent(InEventInfo);

- if( !mIsMouseOver )
- {
- update();
- }
+ // inform the parent(s) of the mouse move
+ emit stubInteraction( SHSI_MouseMove );
+}
+
+void simpleStubWidget::mouseReleaseEvent( QMouseEvent* InEventInfo )
+{
+ emit stubInteraction( SHSI_MouseReleased );
+
+ simpleStubWidget* pWidgetUnderMouse = dynamic_cast<simpleStubWidget*>(
QApplication::widgetAt(QCursor::pos()) );
+ if( pWidgetUnderMouse && pWidgetUnderMouse != this )
+ {
+ emit stubInteraction( SHSI_TryNewConnection );
+ }
+}
+
+void simpleStubWidget::enterEvent( QEvent* InEventInfo )
+{
+ ParentClass::enterEvent( InEventInfo );
+
+ emit stubInteraction( SHSI_MouseEnter );
+
mIsMouseOver = true;
+ update();
}

void simpleStubWidget::leaveEvent( QEvent* InEventInfo )
{
ParentClass::leaveEvent(InEventInfo);

+ // inform the parent of the leaving of mouse from this stub
+ emit stubInteraction( SHSI_MouseLeave );
+
mIsMouseOver = false;
update();
}
@@ -173,3 +321,64 @@
QBrush solidBrush( mIsMouseOver ? mHoverColor : mNormalColor );
painter.fillRect( rect(), solidBrush );
}
+
+
+///////////////////////////////////////
+// nodePreviewWidget
+nodePreviewWidget::nodePreviewWidget( QWidget* InParent )
+ : ParentClass(InParent)
+ , mPreviewType( SHPT_Const )
+{
+}
+
+void nodePreviewWidget::setPreviewType( PreviewType InPreviewType )
+{
+ mPreviewType = InPreviewType;
+ update();
+}
+
+void nodePreviewWidget::setSolidColor( QColor InNewColor, bool
InShouldUpdate )
+{
+ mSolidColor = InNewColor;
+
+ if( InShouldUpdate )
+ {
+ update();
+ }
+}
+
+void nodePreviewWidget::mouseReleaseEvent(QMouseEvent* InEventInfo)
+{
+ ParentClass::mouseReleaseEvent(InEventInfo);
+
+ // emit the clicked signal
+ emit clicked();
+}
+
+void nodePreviewWidget::paintEvent( QPaintEvent* InEventInfo )
+{
+ ParentClass::paintEvent( InEventInfo );
+
+ switch( mPreviewType )
+ {
+ case SHPT_Color:
+ {
+ QPixmap pixelMap(128,128);
+ pixelMap.fill( mSolidColor );
+
+ QPainter painter(this);
+ painter.drawPixmap( 0, 0, pixelMap );
+ }
+ break;
+
+ default:
+ {
+ QPixmap pixelMap(128,128);
+ pixelMap.fill( Qt::darkGreen );
+
+ QPainter painter(this);
+ painter.drawPixmap( 0, 0, pixelMap );
+ }
+ break;
+ }
+}
=======================================
--- /trunk/src/shnode.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/shnode.cpp Sun May 22 07:23:49 2011
@@ -39,25 +39,41 @@
// disconnect all input connections
for( stubIndex=0; stubIndex < mInputStubs.size(); ++stubIndex )
{
- linkStub& currentStub = mInputStubs[stubIndex];
- for( linkIndex=0; linkIndex < currentStub.allLinks.size(); ++linkIndex )
- {
- shNode* pOtherNode = currentStub.allLinks[linkIndex].otherNode;
+ linkStub* currentStub = mInputStubs[stubIndex];
+ for( linkIndex=0; linkIndex < currentStub->allLinks.size(); ++linkIndex )
+ {
+ shNode* pOtherNode = currentStub->allLinks[linkIndex].otherNode;
pOtherNode->disconnectFrom(this);
}
+
+ // finally release memeory
+ delete currentStub;
}

// disconnect all output connections
for( stubIndex=0; stubIndex < mOutputStubs.size(); ++stubIndex )
{
- linkStub& currentStub = mOutputStubs[stubIndex];
- for( linkIndex=0; linkIndex < currentStub.allLinks.size(); ++linkIndex )
- {
- shNode* pOtherNode = currentStub.allLinks[linkIndex].otherNode;
+ linkStub* currentStub = mOutputStubs[stubIndex];
+ for( linkIndex=0; linkIndex < currentStub->allLinks.size(); ++linkIndex )
+ {
+ shNode* pOtherNode = currentStub->allLinks[linkIndex].otherNode;
pOtherNode->disconnectFrom(this);
}
+
+ // finally release memory
+ delete currentStub;
}
}
+
+shNode::linkStub* shNode::constructLinkStub( const std::string&
InLinkName, linkIOType InIOType, linkStubType InType )
+{
+ linkStub* pNewStub = new shNode::linkStub;
+ pNewStub->name = InLinkName;
+ pNewStub->ioType = InIOType;
+ pNewStub->type = InType;
+
+ return pNewStub;
+}

/**
* Iterated through the input and output stubs of this node to locate the
desired stub
@@ -74,9 +90,9 @@
// search in input stubs
for( index=0; index < mInputStubs.size(); ++index )
{
- if( mInputStubs[index].name == InStubName )
- {
- locatedStub = &mInputStubs[index];
+ if( mInputStubs[index]->name == InStubName )
+ {
+ locatedStub = mInputStubs[index];
break;
}
}
@@ -84,9 +100,9 @@
// serach in output stubs
for( index=0; !locatedStub && index < mOutputStubs.size(); ++index )
{
- if( mOutputStubs[index].name == InStubName )
- {
- locatedStub = &mOutputStubs[index];
+ if( mOutputStubs[index]->name == InStubName )
+ {
+ locatedStub = mOutputStubs[index];
break;
}
}
@@ -103,9 +119,9 @@
// search in input stubs
for( index=0; index < mInputStubs.size(); ++index )
{
- if( mInputStubs[index].name == InStubName )
- {
- locatedStub = &mInputStubs[index];
+ if( mInputStubs[index]->name == InStubName )
+ {
+ locatedStub = mInputStubs[index];
break;
}
}
@@ -113,9 +129,9 @@
// serach in output stubs
for( index=0; !locatedStub && index < mOutputStubs.size(); ++index )
{
- if( mOutputStubs[index].name == InStubName )
- {
- locatedStub = &mOutputStubs[index];
+ if( mOutputStubs[index]->name == InStubName )
+ {
+ locatedStub = mOutputStubs[index];
break;
}
}
@@ -157,28 +173,14 @@
return bCanUpcast;
}

-shNode::linkStub* shNode::addInputStub( std::string InStubName,
linkStubType InStubType )
-{
- linkStub newStub;
- newStub.clear();
- newStub.ioType = SHIO_INPUT;
- newStub.name = InStubName;
- newStub.type = InStubType;
-
- mInputStubs.push_back(newStub);
- return &mInputStubs.back();
+void shNode::addInputStub( shNode::linkStub* InNewStub )
+{
+ mInputStubs.push_back(InNewStub);
}

-shNode::linkStub* shNode::addOutputStub( std::string InStubName,
linkStubType InStubType )
-{
- linkStub newStub;
- newStub.clear();
- newStub.ioType = SHIO_OUTPUT;
- newStub.name = InStubName;
- newStub.type = InStubType;
-
- mOutputStubs.push_back(newStub);
- return &mOutputStubs.back();
+void shNode::addOutputStub( shNode::linkStub* InNewStub )
+{
+ mOutputStubs.push_back(InNewStub);
}

#warning todo: Fix connect() to make sure that no loops are introduced
@@ -198,7 +200,7 @@
&& otherStub
&& thisStub->ioType != otherStub->ioType /*input of one can connect to
output of the other*/
&& areStubsCompatible(outputStub->type, inputStub->type) )
- {
+ {
if( inputStub->allLinks.size() > 0 )
{
// should have only one link if any
@@ -227,31 +229,31 @@
// parse the input stubs
for( index=0; index < mInputStubs.size(); ++index )
{
- linkStub& currentStub = mInputStubs[index];
+ linkStub* currentStub = mInputStubs[index];

// each input stub should be connected only to one node
- if( currentStub.allLinks.size() > 1 )
+ if( currentStub->allLinks.size() > 1 )
{
// flag an error
}

// if this input stub is connected to the given node, clear this entry
effectively breaking the connection
- if( currentStub.allLinks.size() > 0
- && currentStub.allLinks[0].otherNode == InOtherNode
- && (InStubName == "" || InStubName ==
currentStub.allLinks[0].otherStubName) )
- {
- currentStub.allLinks.clear();
+ if( currentStub->allLinks.size() > 0
+ && currentStub->allLinks[0].otherNode == InOtherNode
+ && (InStubName == "" || InStubName ==
currentStub->allLinks[0].otherStubName) )
+ {
+ currentStub->allLinks.clear();
}
}

// parse the output stubs
for( index=0; index < mOutputStubs.size(); ++index )
{
- linkStub& currentStub = mOutputStubs[index];
+ linkStub* currentStub = mOutputStubs[index];
std::vector<std::vector<link>::iterator> itemsToDelete;

// pass1 - collect the items to be deleted
- for( std::vector<link>::iterator itr = currentStub.allLinks.begin();
itr != currentStub.allLinks.end(); ++itr )
+ for( std::vector<link>::iterator itr = currentStub->allLinks.begin();
itr != currentStub->allLinks.end(); ++itr )
{
if( itr->otherNode == InOtherNode && (InStubName == "" || InStubName ==
itr->otherStubName))
{
@@ -262,7 +264,7 @@
// delete the collected item list
for( int deleteIndex=0; deleteIndex < itemsToDelete.size();
++deleteIndex )
{
- currentStub.allLinks.erase( itemsToDelete[deleteIndex] );
+ currentStub->allLinks.erase( itemsToDelete[deleteIndex] );
}
}
}
@@ -274,17 +276,17 @@
for( inputIndex=0; inputIndex < mInputStubs.size(); ++inputIndex )
{
// input links have only one input
- if( mInputStubs[inputIndex].allLinks.size() > 0 )
- {
- shNode* otherNode = mInputStubs[inputIndex].allLinks[0].otherNode;
- linkStub* otherLinkStub = otherNode ? otherNode->findStub(
mInputStubs[inputIndex].allLinks[0].otherStubName ) : 0;
+ if( mInputStubs[inputIndex]->allLinks.size() > 0 )
+ {
+ shNode* otherNode = mInputStubs[inputIndex]->allLinks[0].otherNode;
+ linkStub* otherLinkStub = otherNode ? otherNode->findStub(
mInputStubs[inputIndex]->allLinks[0].otherStubName ) : 0;
if( otherNode && otherLinkStub )
{
// evaluate the node
otherNode->evaluate();

// transfer the evaluated value to the current input stub
- mInputStubs[inputIndex] = *otherLinkStub;
+ *mInputStubs[inputIndex] = *otherLinkStub;
}
}
}
@@ -334,25 +336,25 @@
switch(type)
{
case SHST_CONST1VEC:
- constant1Vec += InRhs.constant1Vec;
+ value.constant1Vec += InRhs.value.constant1Vec;
break;

case SHST_CONST2VEC:
- constant2Vec[0] += InRhs.constant2Vec[0];
- constant2Vec[1] += InRhs.constant2Vec[1];
+ value.constant2Vec[0] += InRhs.value.constant2Vec[0];
+ value.constant2Vec[1] += InRhs.value.constant2Vec[1];
break;

case SHST_CONST3VEC:
- constant3Vec[0] += InRhs.constant3Vec[0];
- constant3Vec[1] += InRhs.constant3Vec[1];
- constant3Vec[2] += InRhs.constant3Vec[2];
+ value.constant3Vec[0] += InRhs.value.constant3Vec[0];
+ value.constant3Vec[1] += InRhs.value.constant3Vec[1];
+ value.constant3Vec[2] += InRhs.value.constant3Vec[2];
break;

case SHST_CONST4VEC:
- constant4Vec[0] += InRhs.constant4Vec[0];
- constant4Vec[1] += InRhs.constant4Vec[1];
- constant4Vec[2] += InRhs.constant4Vec[2];
- constant4Vec[3] += InRhs.constant4Vec[3];
+ value.constant4Vec[0] += InRhs.value.constant4Vec[0];
+ value.constant4Vec[1] += InRhs.value.constant4Vec[1];
+ value.constant4Vec[2] += InRhs.value.constant4Vec[2];
+ value.constant4Vec[3] += InRhs.value.constant4Vec[3];
break;
}

@@ -364,25 +366,25 @@
switch(type)
{
case SHST_CONST1VEC:
- constant1Vec -= InRhs.constant1Vec;
+ value.constant1Vec -= InRhs.value.constant1Vec;
break;

case SHST_CONST2VEC:
- constant2Vec[0] -= InRhs.constant2Vec[0];
- constant2Vec[1] -= InRhs.constant2Vec[1];
+ value.constant2Vec[0] -= InRhs.value.constant2Vec[0];
+ value.constant2Vec[1] -= InRhs.value.constant2Vec[1];
break;

case SHST_CONST3VEC:
- constant3Vec[0] -= InRhs.constant3Vec[0];
- constant3Vec[1] -= InRhs.constant3Vec[1];
- constant3Vec[2] -= InRhs.constant3Vec[2];
+ value.constant3Vec[0] -= InRhs.value.constant3Vec[0];
+ value.constant3Vec[1] -= InRhs.value.constant3Vec[1];
+ value.constant3Vec[2] -= InRhs.value.constant3Vec[2];
break;

case SHST_CONST4VEC:
- constant4Vec[0] -= InRhs.constant4Vec[0];
- constant4Vec[1] -= InRhs.constant4Vec[1];
- constant4Vec[2] -= InRhs.constant4Vec[2];
- constant4Vec[3] -= InRhs.constant4Vec[3];
+ value.constant4Vec[0] -= InRhs.value.constant4Vec[0];
+ value.constant4Vec[1] -= InRhs.value.constant4Vec[1];
+ value.constant4Vec[2] -= InRhs.value.constant4Vec[2];
+ value.constant4Vec[3] -= InRhs.value.constant4Vec[3];
break;
}

@@ -394,25 +396,25 @@
switch(type)
{
case SHST_CONST1VEC:
- constant1Vec *= InRhs.constant1Vec;
+ value.constant1Vec *= InRhs.value.constant1Vec;
break;

case SHST_CONST2VEC:
- constant2Vec[0] *= InRhs.constant2Vec[0];
- constant2Vec[1] *= InRhs.constant2Vec[1];
+ value.constant2Vec[0] *= InRhs.value.constant2Vec[0];
+ value.constant2Vec[1] *= InRhs.value.constant2Vec[1];
break;

case SHST_CONST3VEC:
- constant3Vec[0] *= InRhs.constant3Vec[0];
- constant3Vec[1] *= InRhs.constant3Vec[1];
- constant3Vec[2] *= InRhs.constant3Vec[2];
+ value.constant3Vec[0] *= InRhs.value.constant3Vec[0];
+ value.constant3Vec[1] *= InRhs.value.constant3Vec[1];
+ value.constant3Vec[2] *= InRhs.value.constant3Vec[2];
break;

case SHST_CONST4VEC:
- constant4Vec[0] *= InRhs.constant4Vec[0];
- constant4Vec[1] *= InRhs.constant4Vec[1];
- constant4Vec[2] *= InRhs.constant4Vec[2];
- constant4Vec[3] *= InRhs.constant4Vec[3];
+ value.constant4Vec[0] *= InRhs.value.constant4Vec[0];
+ value.constant4Vec[1] *= InRhs.value.constant4Vec[1];
+ value.constant4Vec[2] *= InRhs.value.constant4Vec[2];
+ value.constant4Vec[3] *= InRhs.value.constant4Vec[3];
break;
}

@@ -428,25 +430,25 @@
switch(type)
{
case SHST_CONST1VEC:
- SAFE_DIVIDE( constant1Vec, InRhs.constant1Vec );
+ SAFE_DIVIDE( value.constant1Vec, InRhs.value.constant1Vec );
break;

case SHST_CONST2VEC:
- SAFE_DIVIDE( constant2Vec[0], InRhs.constant2Vec[0]);
- SAFE_DIVIDE( constant2Vec[1], InRhs.constant2Vec[1]);
+ SAFE_DIVIDE( value.constant2Vec[0], InRhs.value.constant2Vec[0]);
+ SAFE_DIVIDE( value.constant2Vec[1], InRhs.value.constant2Vec[1]);
break;

case SHST_CONST3VEC:
- SAFE_DIVIDE( constant3Vec[0], InRhs.constant3Vec[0]);
- SAFE_DIVIDE( constant3Vec[1], InRhs.constant3Vec[1]);
- SAFE_DIVIDE( constant3Vec[2], InRhs.constant3Vec[2]);
+ SAFE_DIVIDE( value.constant3Vec[0], InRhs.value.constant3Vec[0]);
+ SAFE_DIVIDE( value.constant3Vec[1], InRhs.value.constant3Vec[1]);
+ SAFE_DIVIDE( value.constant3Vec[2], InRhs.value.constant3Vec[2]);
break;

case SHST_CONST4VEC:
- SAFE_DIVIDE( constant4Vec[0], InRhs.constant4Vec[0]);
- SAFE_DIVIDE( constant4Vec[1], InRhs.constant4Vec[1]);
- SAFE_DIVIDE( constant4Vec[2], InRhs.constant4Vec[2]);
- SAFE_DIVIDE( constant4Vec[3], InRhs.constant4Vec[3]);
+ SAFE_DIVIDE( value.constant4Vec[0], InRhs.value.constant4Vec[0]);
+ SAFE_DIVIDE( value.constant4Vec[1], InRhs.value.constant4Vec[1]);
+ SAFE_DIVIDE( value.constant4Vec[2], InRhs.value.constant4Vec[2]);
+ SAFE_DIVIDE( value.constant4Vec[3], InRhs.value.constant4Vec[3]);
break;
}
#undef SAFE_DIVIDE
@@ -455,31 +457,12 @@
}

shNode::linkStub& shNode::linkStub::operator =( const shNode::linkStub&
InRhs )
-{
- switch( type )
- {
- case SHST_CONST1VEC:
- constant1Vec = InRhs.constant1Vec;
- break;
-
- case SHST_CONST2VEC:
- constant2Vec[0] = InRhs.constant2Vec[0];
- constant2Vec[1] = InRhs.constant2Vec[1];
- break;
-
- case SHST_CONST3VEC:
- constant3Vec[0] = InRhs.constant3Vec[0];
- constant3Vec[1] = InRhs.constant3Vec[1];
- constant3Vec[2] = InRhs.constant3Vec[2];
- break;
-
- case SHST_CONST4VEC:
- constant4Vec[0] = InRhs.constant4Vec[0];
- constant4Vec[1] = InRhs.constant4Vec[1];
- constant4Vec[2] = InRhs.constant4Vec[2];
- constant4Vec[3] = InRhs.constant4Vec[3];
- break;
- }
+{
+ value = InRhs.value;
+ ioType = InRhs.ioType;
+ name = InRhs.name;
+ type = InRhs.type;
+ allLinks = InRhs.allLinks;

return *this;
}
@@ -487,7 +470,7 @@
// clears the value part of the link Stub
void shNode::linkStub::clear()
{
- memset( constant4Vec, 0, sizeof(constant4Vec) );
+ memset( &value, 0, sizeof(value) );
}

// converts this node to a string
@@ -498,22 +481,22 @@
switch( type )
{
case SHST_CONST1VEC:
- snprintf( buff, sizeof(buff), "%0.4f", constant1Vec );
+ snprintf( buff, sizeof(buff), "%0.4f", value.constant1Vec );
nodeString += buff;
break;

case SHST_CONST2VEC:
- snprintf( buff, sizeof(buff), "%0.4f, %0.4f", constant2Vec[0],
constant2Vec[1] );
+ snprintf( buff, sizeof(buff), "%0.4f, %0.4f", value.constant2Vec[0],
value.constant2Vec[1] );
nodeString += buff;
break;

case SHST_CONST3VEC:
- snprintf( buff, sizeof(buff), "%0.4f, %0.4f, %0.4f", constant3Vec[0],
constant3Vec[1], constant3Vec[2] );
+ snprintf( buff, sizeof(buff), "%0.4f, %0.4f, %0.4f",
value.constant3Vec[0], value.constant3Vec[1], value.constant3Vec[2] );
nodeString += buff;
break;

case SHST_CONST4VEC:
- snprintf( buff, sizeof(buff), "%0.4f, %0.4f, %0.4f, %0.4f",
constant4Vec[0], constant4Vec[1], constant4Vec[2], constant4Vec[3] );
+ snprintf( buff, sizeof(buff), "%0.4f, %0.4f, %0.4f, %0.4f",
value.constant4Vec[0], value.constant4Vec[1], value.constant4Vec[2],
value.constant4Vec[3] );
nodeString += buff;
break;
}
@@ -530,15 +513,15 @@
for( int index=0; index < mInputStubs.size(); ++index )
{
std::cout <<"\t\t"
- << mInputStubs[index].name
- <<" type: "<<mInputStubs[index].type
+ << mInputStubs[index]->name
+ <<" type: "<<mInputStubs[index]->type
<<" ## "
- <<mInputStubs[index].toString()
+ <<mInputStubs[index]->toString()
<<std::endl;
- for( int connectionIndex=0; connectionIndex <
mInputStubs[index].allLinks.size(); ++connectionIndex )
- {
- std::cout<<"\t\t\tIncommingLink ["
<<mInputStubs[index].allLinks[connectionIndex].otherNode->name()
- <<"
# "<<mInputStubs[index].allLinks[connectionIndex].otherStubName
+ for( int connectionIndex=0; connectionIndex <
mInputStubs[index]->allLinks.size(); ++connectionIndex )
+ {
+ std::cout<<"\t\t\tIncommingLink ["
<<mInputStubs[index]->allLinks[connectionIndex].otherNode->name()
+ <<"
# "<<mInputStubs[index]->allLinks[connectionIndex].otherStubName
<<"]"
<<std::endl;
}
@@ -547,15 +530,15 @@
for( int index=0; index < mOutputStubs.size(); ++index )
{
std::cout <<"\t\t"
- << mOutputStubs[index].name
- <<" type: "<< mOutputStubs[index].type
+ << mOutputStubs[index]->name
+ <<" type: "<< mOutputStubs[index]->type
<<" ## "
- << mOutputStubs[index].toString()
+ << mOutputStubs[index]->toString()
<< std::endl;
- for( int connectionIndex=0; connectionIndex <
mOutputStubs[index].allLinks.size(); ++connectionIndex )
- {
- std::cout<<"\t\t\tOutgoingLink
["<<mOutputStubs[index].allLinks[connectionIndex].otherNode->name()
- <<"
# "<<mOutputStubs[index].allLinks[connectionIndex].otherStubName
+ for( int connectionIndex=0; connectionIndex <
mOutputStubs[index]->allLinks.size(); ++connectionIndex )
+ {
+ std::cout<<"\t\t\tOutgoingLink
["<<mOutputStubs[index]->allLinks[connectionIndex].otherNode->name()
+ <<"
# "<<mOutputStubs[index]->allLinks[connectionIndex].otherStubName
<<"]"
<<std::endl;
}
=======================================
--- /trunk/src/shnode_color.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/shnode_color.cpp Sun May 22 07:23:49 2011
@@ -15,20 +15,27 @@
: ParentClass(InNodeName)
{
// add default output stubs
- mRGBAStub = addOutputStub( "RGBA", SHST_RGBA );
- mRedStub = addOutputStub( "Red", SHST_RED );
- mGreenStub = addOutputStub( "Green", SHST_GREEN );
- mBlueStub = addOutputStub( "Blue", SHST_BLUE );
- mAlphaStub = addOutputStub( "Alpha", SHST_ALPHA );
-
- // set the given values in the different channels
- mRGBAStub->constant4Vec[0] = InRed;
- mRGBAStub->constant4Vec[1] = InGreen;
- mRGBAStub->constant4Vec[2] = InBlue;
- mRGBAStub->constant4Vec[3] = InAlpha;
-
- mRedStub->constant1Vec = InRed;
- mGreenStub->constant1Vec = InGreen;
- mBlueStub->constant1Vec = InBlue;
- mAlphaStub->constant1Vec = InAlpha;
-}
+ mRGBAStub = constructLinkStub("RGBA", SHIO_OUTPUT, SHST_RGBA );
+ mRGBAStub->type = SHST_RGBA;
+ mRGBAStub->value.constant4Vec[0] = InRed;
+ mRGBAStub->value.constant4Vec[1] = InGreen;
+ mRGBAStub->value.constant4Vec[2] = InBlue;
+ mRGBAStub->value.constant4Vec[3] = InAlpha;
+ addOutputStub( mRGBAStub );
+
+ mRedStub = constructLinkStub("Red", SHIO_OUTPUT, SHST_RED );
+ mRedStub->value.constant1Vec = InRed;
+ addOutputStub( mRedStub );
+
+ mGreenStub = constructLinkStub("Green", SHIO_OUTPUT, SHST_GREEN );
+ mGreenStub->value.constant1Vec = InGreen;
+ addOutputStub( mGreenStub );
+
+ mBlueStub = constructLinkStub("Blue", SHIO_OUTPUT, SHST_BLUE );
+ mBlueStub->value.constant1Vec = InBlue;
+ addOutputStub( mBlueStub );
+
+ mAlphaStub = constructLinkStub("Alpha", SHIO_OUTPUT, SHST_ALPHA );
+ mAlphaStub->value.constant1Vec = InAlpha;
+ addOutputStub( mAlphaStub );
+}
=======================================
--- /trunk/src/shnode_math.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/shnode_math.cpp Sun May 22 07:23:49 2011
@@ -19,29 +19,41 @@
switch(InElementCount)
{
case 1:
- addOutputStub("Out", SHST_CONST1VEC);
- mOutputStubs[0].constant1Vec = InConstVal[0];
+ {
+ linkStub* pNewStub = constructLinkStub("Out", SHIO_OUTPUT,
SHST_CONST1VEC );
+ pNewStub->value.constant1Vec = InConstVal[0];
+ addOutputStub(pNewStub);
+ }
break;

case 2:
- addOutputStub("Out", SHST_CONST2VEC);
- mOutputStubs[0].constant2Vec[0] = InConstVal[0];
- mOutputStubs[0].constant2Vec[1] = InConstVal[1];
+ {
+ linkStub* pNewStub = constructLinkStub("Out", SHIO_OUTPUT,
SHST_CONST2VEC );
+ pNewStub->value.constant2Vec[0] = InConstVal[0];
+ pNewStub->value.constant2Vec[1] = InConstVal[1];
+ addOutputStub(pNewStub);
+ }
break;

case 3:
- addOutputStub("Out", SHST_CONST3VEC);
- mOutputStubs[0].constant3Vec[0] = InConstVal[0];
- mOutputStubs[0].constant3Vec[1] = InConstVal[1];
- mOutputStubs[0].constant3Vec[2] = InConstVal[2];
+ {
+ linkStub* pNewStub =constructLinkStub("Out", SHIO_OUTPUT,
SHST_CONST3VEC );
+ pNewStub->value.constant3Vec[0] = InConstVal[0];
+ pNewStub->value.constant3Vec[1] = InConstVal[1];
+ pNewStub->value.constant3Vec[2] = InConstVal[2];
+ addOutputStub(pNewStub);
+ }
break;

case 4:
- addOutputStub("Out", SHST_CONST4VEC);
- mOutputStubs[0].constant4Vec[0] = InConstVal[0];
- mOutputStubs[0].constant4Vec[1] = InConstVal[1];
- mOutputStubs[0].constant4Vec[2] = InConstVal[2];
- mOutputStubs[0].constant4Vec[3] = InConstVal[3];
+ {
+ linkStub* pNewStub = constructLinkStub("Out", SHIO_OUTPUT,
SHST_CONST4VEC );
+ pNewStub->value.constant3Vec[0] = InConstVal[0];
+ pNewStub->value.constant3Vec[1] = InConstVal[1];
+ pNewStub->value.constant3Vec[2] = InConstVal[2];
+ pNewStub->value.constant3Vec[3] = InConstVal[3];
+ addOutputStub(pNewStub);
+ }
break;
}
}
@@ -57,7 +69,7 @@
{
ParentClass::dumpNodeStats();

- std::cout<<"ConstValue: "<<mOutputStubs[0].toString()<<std::endl;
+ std::cout<<"ConstValue: "<<mOutputStubs[0]->toString()<<std::endl;
}
#endif

@@ -78,8 +90,8 @@
ParentClass::evaluate();

// initial setup of result node
- mOutputStubs[0].clear();
- mOutputStubs[0] = mInputStubs[0];
+ mOutputStubs[0]->clear();
+ *mOutputStubs[0] = *mInputStubs[0];

// make the corresponding calculations starting from second input stub
(first has already been considered above)
for( int ipIndex=1; ipIndex < mInputStubs.size(); ++ipIndex )
@@ -87,19 +99,19 @@
switch( mMathOperation )
{
case SHMO_Add:
- mOutputStubs[0] = mOutputStubs[0] + mInputStubs[ipIndex];
+ *mOutputStubs[0] = *mOutputStubs[0] + *mInputStubs[ipIndex];
break;

case SHMO_Subtract:
- mOutputStubs[0] = mOutputStubs[0] - mInputStubs[ipIndex];
+ *mOutputStubs[0] = *mOutputStubs[0] - *mInputStubs[ipIndex];
break;

case SHMO_Multiply:
- mOutputStubs[0] = mOutputStubs[0] * mInputStubs[ipIndex];
+ *mOutputStubs[0] = *mOutputStubs[0] * *mInputStubs[ipIndex];
break;

case SHMO_Division:
- mOutputStubs[0] = mOutputStubs[0] / mInputStubs[ipIndex];
+ *mOutputStubs[0] = *mOutputStubs[0] / *mInputStubs[ipIndex];
break;
}
}
=======================================
--- /trunk/src/shnode_texture.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/shnode_texture.cpp Sun May 22 07:23:49 2011
@@ -14,5 +14,6 @@
shNodeTexture::shNodeTexture( const std::string& InNodeName, const
std::string& InTextureFile )
: ParentClass(InNodeName)
{
- addOutputStub( "Tex", SHST_TEXTURE );
-}
+ linkStub* pNewStub = constructLinkStub("Tex", SHIO_OUTPUT, SHST_TEXTURE );
+ addOutputStub( pNewStub );
+}
=======================================
--- /trunk/src/shobject.cpp Mon Apr 18 19:12:13 2011
+++ /trunk/src/shobject.cpp Sun May 22 07:23:49 2011
@@ -8,29 +8,9 @@
*/

#include "shobject.h"
-#include <iostream>

using namespace shaderz;

-/*
-void shObject::checkForMemoryLeaks()
-{
- if( mReferencedObjects.size() > 0 )
- {
- // issue warning about memory leak
- std::cout<<"Memory leak detected. "<< mReferencedObjects.size() <<"
objects still referenced.\n";
-
- // try to release the memory
- while( mReferencedObjects.size() > 0 )
- {
- delete *mReferencedObjects.begin();
- }
-
- std::cout<<"Freed up the leaked memory. \n";
- }
-}
-*/
-
// constructor for the object
shObject::shObject()
{
@@ -43,7 +23,7 @@
void* shObject::operator new( size_t InSize )
{
void* pNewObj = malloc( InSize );
-
+
// record the allocation
shMemoryTracker::registerMemoryAllocation(
static_cast<shObject*>(pNewObj), InSize, false, "NoFileInfo", -1 );

Reply all
Reply to author
Forward
0 new messages