Example #1
0
// Return value of node
bool MatrixVariable::execute(ReturnValue& rv)
{
	// If this matrix is a constant, read the nine stored expressions to recreate it
	if (readOnly_) reCreate();
	rv.set(matrixData_);
	return true;
}
Example #2
0
	bool CSObject::addToLevel(CSLevel* level)
	{
		// remember this
		m_Level = level;

		// recreate the object
		CS_CHECK_BOOL(reCreate(), CSLOGTYPE::CSL_WARNING, "WARNING csobject addtolevel - recreation failed");

		// add the obejct to the object manager 
		getLevel()->getObjectFactory()->getObjectManager()->add(this);

		// everything went fine
		return true;
	}
Example #3
0
// Print node contents
void MatrixVariable::nodePrint(int offset, const char* prefix)
{
	// Construct tabbed offset
	QString tab;
	for (int n=0; n<offset-1; n++) tab += '\t';
	if (offset > 1) tab += "   |--> ";
	tab += prefix;

	// Output node data
	if (readOnly_)
	{
		reCreate();
		printf("[C]%s{%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f} (constant value)\n", qPrintable(tab), matrixData_[0], matrixData_[1], matrixData_[2], matrixData_[3], matrixData_[4], matrixData_[5], matrixData_[6], matrixData_[7], matrixData_[8], matrixData_[9], matrixData_[10], matrixData_[11], matrixData_[12], matrixData_[13], matrixData_[14], matrixData_[15]);
	}
	else printf("[V]%s{%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f} (variable, name=%s)\n", qPrintable(tab), matrixData_[0], matrixData_[1], matrixData_[2], matrixData_[3], matrixData_[4], matrixData_[5], matrixData_[6], matrixData_[7], matrixData_[8], matrixData_[9], matrixData_[10], matrixData_[11], matrixData_[12], matrixData_[13], matrixData_[14], matrixData_[15], qPrintable(name_));
}
Example #4
0
	void CSObject::setTextureFileName(stringc f)	{ m_TextureFileName = f; reCreate(); }
Example #5
0
	void CSObject::setActorFileName(stringc f)		{ m_ActorFileName = f;	reCreate(); }