Planeshift
pseffectanchorspline.h
Go to the documentation of this file.
1 /*
2  * Author: Andrew Robberts
3  *
4  * Copyright (C) 2003 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef PS_EFFECT_ANCHOR_SPLINE_HEADER
21 #define PS_EFFECT_ANCHOR_SPLINE_HEADER
22 
23 #include "pseffectanchor.h"
24 
25 #include <csgeom/spline.h>
26 
32 {
33 public:
34 
37 
38  // inheritted function overloads
39  bool Load(iDocumentNode* node);
40  bool Create(const csVector3 &offset, iMeshWrapper* posAttach, bool rotateWithMesh = false);
41  bool Update(csTicks elapsed);
42  psEffectAnchor* Clone() const;
43 
47  bool PostSetup();
48 
49 private:
50 
51  csCatmullRomSpline* spline;
52 };
53 
56 #endif
bool rotateWithMesh
Whether the anchor should rotate with the mesh. This is so effects can stay aligned, e.g. flame sword.
bool PostSetup()
Performs things like building the spline from the keyframes.
psEffectAnchor * Clone() const
Clones the effect anchor.
bool Create(const csVector3 &offset, iMeshWrapper *posAttach, bool rotateWithMesh=false)
Creates the effect anchor.
bool Update(csTicks elapsed)
Updates the effect anchor – called every frame.
bool Load(iDocumentNode *node)
Loads the effect anchors from an xml node.
Effect anchors provide a base location / anchor point for all effect objs.