goat3d

diff src/goat3d.cc @ 25:d0260d80ae09

adding the nodes interface, and continuing the max plugin
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Sep 2013 19:12:50 +0300
parents b35427826b60
children 1c601bf07b86
line diff
     1.1 --- a/src/goat3d.cc	Sat Sep 28 06:32:00 2013 +0300
     1.2 +++ b/src/goat3d.cc	Sat Sep 28 19:12:50 2013 +0300
     1.3 @@ -475,6 +475,93 @@
     1.4  }
     1.5  
     1.6  
     1.7 +// node
     1.8 +
     1.9 +struct goat3d_node *goat3d_create_node(void)
    1.10 +{
    1.11 +	return new goat3d_node;
    1.12 +}
    1.13 +
    1.14 +void goat3d_set_node_name(struct goat3d_node *node, const char *name)
    1.15 +{
    1.16 +	node->set_name(name);
    1.17 +}
    1.18 +
    1.19 +const char *goat3d_get_node_name(struct goat3d_node *node)
    1.20 +{
    1.21 +	return node->get_name();
    1.22 +}
    1.23 +
    1.24 +void goat3d_set_node_object(struct goat3d_node *node, enum goat3d_node_type type, void *obj)
    1.25 +{
    1.26 +	node->set_object((Object*)obj);
    1.27 +}
    1.28 +
    1.29 +// TODO cont.
    1.30 +
    1.31 +void *goat3d_get_node_object(struct goat3d_node *node)
    1.32 +{
    1.33 +	return 0;
    1.34 +}
    1.35 +
    1.36 +enum goat3d_node_type goat3d_get_node_type(struct goat3d_node *node)
    1.37 +{
    1.38 +	return GOAT3D_NODE_MESH;	// TODO
    1.39 +}
    1.40 +
    1.41 +void goat3d_add_node_child(struct goat3d_node *node, struct goat3d_node *child)
    1.42 +{
    1.43 +}
    1.44 +
    1.45 +int goat3d_get_node_child_count(struct goat3d_node *node)
    1.46 +{
    1.47 +	return 0;
    1.48 +}
    1.49 +
    1.50 +struct goat3d_node *goat3d_get_node_child(struct goat3d_node *node, int idx)
    1.51 +{
    1.52 +	return 0;
    1.53 +}
    1.54 +
    1.55 +void goat3d_set_node_position(struct goat3d_node *node, float x, float y, float z, long tmsec)
    1.56 +{
    1.57 +}
    1.58 +
    1.59 +void goat3d_set_node_rotation(struct goat3d_node *node, float qx, float qy, float qz, float qw, long tmsec)
    1.60 +{
    1.61 +}
    1.62 +
    1.63 +void goat3d_set_node_scaling(struct goat3d_node *node, float sx, float sy, float sz, long tmsec)
    1.64 +{
    1.65 +}
    1.66 +
    1.67 +void goat3d_set_node_pivot(struct goat3d_node *node, float px, float py, float pz)
    1.68 +{
    1.69 +}
    1.70 +
    1.71 +
    1.72 +void goat3d_get_node_position(struct goat3d_node *node, float *xptr, float *yptr, float *zptr, long tmsec)
    1.73 +{
    1.74 +}
    1.75 +
    1.76 +void goat3d_get_node_rotation(struct goat3d_node *node, float *xptr, float *yptr, float *zptr, float *wptr, long tmsec)
    1.77 +{
    1.78 +}
    1.79 +
    1.80 +void goat3d_get_node_scaling(struct goat3d_node *node, float *xptr, float *yptr, float *zptr, long tmsec)
    1.81 +{
    1.82 +}
    1.83 +
    1.84 +void goat3d_get_node_pivot(struct goat3d_node *node, float *xptr, float *yptr, float *zptr)
    1.85 +{
    1.86 +}
    1.87 +
    1.88 +
    1.89 +void goat3d_get_node_matrix(struct goat3d_node *node, float *matrix, long tmsec)
    1.90 +{
    1.91 +}
    1.92 +
    1.93 +
    1.94  }	// extern "C"
    1.95  
    1.96