コード例 #1
0
//
// Formation& =(f)
// Last modified: 28Aug2006
//
// Copies the contents of the parameterized formation into this formation.
//
// Returns:     this formation
// Parameters:
//      f       in/out      the formation being copied
//
Formation& Formation::operator =(const Formation &f)
{
    setFunctions(f);
    setRadius(f.radius);
    setSeedGradient(f.seedGradient);
    setSeedID(f.seedID);
    setFormationID(f.formationID);
    setHeading(f.heading);
    return *this;
}   // =(const Formation &)
コード例 #2
0
//
// Formation(f, r, sGrad, sID, fID, theta)
// Last modified: 28Aug2006
//
// Default constructor that initializes
// the formation to the parameterized values.
//
// Returns:     <none>
// Parameters:
//      f           in      the initial set of functions of the formation
//      r           in      the initial radius of the formation
//      sGrad       in      the initial seed gradient of the formation
//      sID         in      the initial seed ID of the formation
//      fID         in      the initial ID of the formation
//      theta       in      the initial heading of the formation
//
Formation::Formation(LinkedList<Function> f,
                     const GLfloat        r,
                     const Vector         sGrad,
                     const GLint          sID,
                     const GLint          fID,
                     const GLfloat        theta)
{
    setFunctions(f);
    setRadius(r);
    setSeedGradient(sGrad);
    setSeedID(sID);
    setFormationID(fID);
    setHeading(theta);
}   // Formation(const..{LL<Function>, GLfloat, Vector, GLint..<2>, GLfloat})
コード例 #3
0
// Default constructor that initializes
// this formation to the parameterized values.
Formation::Formation(const Function f,
                     const float  r,
                     const Vector   sGrad,
                     const int    sID,
                     const int    fID,
                     const float  theta)
{
    setFunction(f);
    setRadius(r);
    setSeedFrp(sGrad);
    setSeedID(sID);
    setFormationID(fID);
    setHeading(theta);
}
コード例 #4
0
//
// Formation(f, r, sGrad, sID, fID, theta)
// Last modified: 04Sep2006
//
// Default constructor that initializes
// this formation to the parameterized values.
//
// Returns:     <none>
// Parameters:
//      f           in      the initial function of the formation
//      r           in      the initial radius of the formation
//      sGrad       in      the initial seed gradient of the formation
//      sID         in      the initial seed ID of the formation
//      fID         in      the initial ID of the formation
//      theta       in      the initial heading of the formation
//
Formation::Formation(const Function f,
                     const GLfloat  r,
                     const Vector   sGrad,
                     const GLint    sID,
                     const GLint    fID,
                     const GLfloat  theta)
{
    setFunction(f);
    setRadius(r);
    setSeedGradient(sGrad);
    setSeedID(sID);
    setFormationID(fID);
    setHeading(theta);
}   // Formation(const..{Function, GLfloat, Vector, GLint, GLint, GLfloat})
コード例 #5
0
//! constructor
CGameUnitsFormation::CGameUnitsFormation(
	core::dimension2di dim, s32 formation_id
	) :
FormationID(-1), MaxUnitsCount(0), FormationState(EFS_FORMING), Commander(0),
FirstForming(true)
{
#if MY_DEBUG_MODE  
	setClassName("CGameUnitsFormation");
#endif

	setFormationID(formation_id);
	setDimension(dim);	

	core::array< core::vector2df > points;

	points.push_back( core::vector2df(   0.0f,  0.0f ) );
	points.push_back( core::vector2df(  50.0f, 0.25f ) );
	points.push_back( core::vector2df( 100.0f,  1.0f ) );

	SpeedInterpolator.init(points.pointer(), points.size());	
}