|
From: <axl...@us...> - 2010-01-17 02:32:31
|
Revision: 668
http://hgengine.svn.sourceforge.net/hgengine/?rev=668&view=rev
Author: axlecrusher
Date: 2010-01-17 02:32:13 +0000 (Sun, 17 Jan 2010)
Log Message:
-----------
build vertex from 3 and 4 float arrays
Modified Paths:
--------------
Mercury2/src/MercuryValue.cpp
Mercury2/src/MercuryVertex.cpp
Modified: Mercury2/src/MercuryValue.cpp
===================================================================
--- Mercury2/src/MercuryValue.cpp 2010-01-17 02:26:59 UTC (rev 667)
+++ Mercury2/src/MercuryValue.cpp 2010-01-17 02:32:13 UTC (rev 668)
@@ -4,7 +4,7 @@
DelegateNotifierList::DelegateNotifierList( DeletionNotifier nf, MessageHandler * no ) :
- NotifyFunction( nf ), NotifyObject( no ), Next( 0 )
+ NotifyFunction( nf ), NotifyObject( no ), Next( NULL )
{
}
@@ -43,14 +43,14 @@
-MValue::MValue( ) : m_References( 0 ), m_CurType( TYPE_UNDEF ), DLDelete( 0 ), DLModify( 0 )
+MValue::MValue( ) : m_References( NULL ), m_CurType( TYPE_UNDEF ), DLDelete( NULL ), DLModify( NULL )
{
- m_Data.v = 0;
+ m_Data.v = NULL;
}
-MValue::MValue( MVType t ) : m_References( 0 ), m_CurType( t ), DLDelete( 0 ), DLModify( 0 )
+MValue::MValue( MVType t ) : m_References( NULL ), m_CurType( t ), DLDelete( NULL ), DLModify( NULL )
{
- m_Data.v = 0;
+ m_Data.v = NULL;
}
MValue::~MValue()
Modified: Mercury2/src/MercuryVertex.cpp
===================================================================
--- Mercury2/src/MercuryVertex.cpp 2010-01-17 02:26:59 UTC (rev 667)
+++ Mercury2/src/MercuryVertex.cpp 2010-01-17 02:32:13 UTC (rev 668)
@@ -19,10 +19,17 @@
(*this)[3] = iw;
}
-MercuryVertex::MercuryVertex( const float * in )
+MercuryVertex::MercuryVertex( const float* in3f, float f )
{
+ for (unsigned int i = 0; i < 3; ++i)
+ (*this)[i] = in3f[i];
+ (*this)[3] = f;
+}
+
+MercuryVertex::MercuryVertex( const float* in4f )
+{
for (unsigned int i = 0; i < 4; ++i)
- (*this)[i] = in[i];
+ (*this)[i] = in4f[i];
}
MercuryVertex::MercuryVertex( const MercuryVertex& v)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|