goat3d

diff src/xform_node.h @ 8:cd71f0b92f44

a bit more...
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 21 Aug 2013 05:52:28 +0300
parents e46529a5d057
children 0fe02696fb1e
line diff
     1.1 --- a/src/xform_node.h	Wed Aug 21 04:00:22 2013 +0300
     1.2 +++ b/src/xform_node.h	Wed Aug 21 05:52:28 2013 +0300
     1.3 @@ -35,53 +35,53 @@
     1.4  	XFormNode();
     1.5  	virtual ~XFormNode();
     1.6  
     1.7 -	void set_name(const char *name);
     1.8 -	const char *get_name() const;
     1.9 +	virtual void set_name(const char *name);
    1.10 +	virtual const char *get_name() const;
    1.11  
    1.12 -	void set_interpolator(Interp in);
    1.13 -	Interp get_interpolator() const;
    1.14 -	void set_extrapolator(Extrap ex);
    1.15 -	Extrap get_extrapolator() const;
    1.16 +	virtual void set_interpolator(Interp in);
    1.17 +	virtual Interp get_interpolator() const;
    1.18 +	virtual void set_extrapolator(Extrap ex);
    1.19 +	virtual Extrap get_extrapolator() const;
    1.20  
    1.21  	// children management
    1.22 -	void add_child(XFormNode *child);
    1.23 -	void remove_child(XFormNode *child);
    1.24 +	virtual void add_child(XFormNode *child);
    1.25 +	virtual void remove_child(XFormNode *child);
    1.26  
    1.27 -	int get_children_count() const;
    1.28 -	XFormNode *get_child(int idx);
    1.29 -	const XFormNode *get_child(int idx) const;
    1.30 +	virtual int get_children_count() const;
    1.31 +	virtual XFormNode *get_child(int idx);
    1.32 +	virtual const XFormNode *get_child(int idx) const;
    1.33  
    1.34  
    1.35 -	void set_position(const Vector3 &pos, long tmsec = 0);
    1.36 -	Vector3 get_node_position(long tmsec = 0) const;
    1.37 +	virtual void set_position(const Vector3 &pos, long tmsec = 0);
    1.38 +	virtual Vector3 get_node_position(long tmsec = 0) const;
    1.39  
    1.40 -	void set_rotation(const Quaternion &quat, long tmsec = 0);
    1.41 -	Quaternion get_node_rotation(long tmsec = 0) const;
    1.42 +	virtual void set_rotation(const Quaternion &quat, long tmsec = 0);
    1.43 +	virtual Quaternion get_node_rotation(long tmsec = 0) const;
    1.44  
    1.45 -	void set_scaling(const Vector3 &pos, long tmsec = 0);
    1.46 -	Vector3 get_node_scaling(long tmsec = 0) const;
    1.47 +	virtual void set_scaling(const Vector3 &pos, long tmsec = 0);
    1.48 +	virtual Vector3 get_node_scaling(long tmsec = 0) const;
    1.49  
    1.50  	// these take hierarchy into account
    1.51 -	Vector3 get_position(long tmsec = 0) const;
    1.52 -	Quaternion get_rotation(long tmsec = 0) const;
    1.53 -	Vector3 get_scaling(long tmsec = 0) const;
    1.54 +	virtual Vector3 get_position(long tmsec = 0) const;
    1.55 +	virtual Quaternion get_rotation(long tmsec = 0) const;
    1.56 +	virtual Vector3 get_scaling(long tmsec = 0) const;
    1.57  
    1.58 -	void set_pivot(const Vector3 &pivot);
    1.59 -	Vector3 get_pivot() const;
    1.60 +	virtual void set_pivot(const Vector3 &pivot);
    1.61 +	virtual Vector3 get_pivot() const;
    1.62  
    1.63  	// the local matrix is concatenated with the regular node/anim matrix
    1.64 -	void set_local_matrix(const Matrix4x4 &mat);
    1.65 -	const Matrix4x4 &get_local_matrix() const;
    1.66 +	virtual void set_local_matrix(const Matrix4x4 &mat);
    1.67 +	virtual const Matrix4x4 &get_local_matrix() const;
    1.68  
    1.69  	// for bone nodes, the transformation of the bone in bind position
    1.70 -	void set_bone_matrix(const Matrix4x4 &bmat);
    1.71 -	const Matrix4x4 &get_bone_matrix() const;
    1.72 +	virtual void set_bone_matrix(const Matrix4x4 &bmat);
    1.73 +	virtual const Matrix4x4 &get_bone_matrix() const;
    1.74  
    1.75  	// node transformation alone
    1.76 -	void get_node_xform(long tmsec, Matrix4x4 *mat, Matrix4x4 *inv_mat = 0) const;
    1.77 +	virtual void get_node_xform(long tmsec, Matrix4x4 *mat, Matrix4x4 *inv_mat = 0) const;
    1.78  
    1.79  	// node transformation taking hierarchy into account
    1.80 -	void get_xform(long tmsec, Matrix4x4 *mat, Matrix4x4 *inv_mat = 0) const;
    1.81 +	virtual void get_xform(long tmsec, Matrix4x4 *mat, Matrix4x4 *inv_mat = 0) const;
    1.82  };
    1.83  
    1.84