node.cpp

来自「三角单元平面静力问题」· C++ 代码 · 共 55 行

CPP
55
字号
// node.cpp: implementation of the node class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "四接点两单元的平面静力问题.h"
#include "node.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Node::Node()
{
	x = 0;
	y = 0;
	loadX = 0;
	loadY = 0;
	u = 0;
	v = 0;
	ndNum = -1;
}

void Node::setPoint(int nn, double xx, double yy)
{
	
 	ndNum = nn;
 	x=xx;
	y=yy;
}

void Node::setLoad(double lx, double ly)
{
	loadX += lx;    // 注意是“ += ” 
	loadY += ly;
}

/*ostream& operator<<(ostream& s, const Node& nd)
{
	s << "Node number: " << nd.ndNum 
 	  << "  (" << nd.x << ", " << nd.y << ")  ";
	s << "u = " << nd.u << "  v = " << nd.v <<endl;
	//s << "loadX = " << nd.loadX << "  loadY = " << nd.loadY <<endl;
	
 	return s;
}*/
////////////////////////////////////////////////////////////////////////////////

///////////////////////////

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?