Ejemplo n.º 1
0
const char*
create_sphere_node(const char *parent_name, const char *child_name, scalar_t resolution ) 
{
    scene_node_t *node;
    char *msg;

    msg = create_scene_node(parent_name, child_name, &node);
    if ( msg != NULL ) {
        return msg;
    } 

    node->geom = Sphere;
    node->param.sphere.radius = 1.0;

#ifdef __APPLE__
    node->param.sphere.resolution = resolution;
#else
    node->param.sphere.divisions = min( 
	MAX_SPHERE_DIVISIONS, max( 
	    MIN_SPHERE_DIVISIONS, 
	    ROUND_TO_NEAREST( getparam_tux_sphere_divisions() * resolution ) 
	    ) );
#endif

    return NULL;
}
Ejemplo n.º 2
0
void 
create_tranform_node(const std::string& parent_name, const std::string& child_name ) 
{
    SceneNode *node;
    create_scene_node(parent_name, child_name, &node);

    node->isSphere = false;
}
Ejemplo n.º 3
0
const char*
create_tranform_node(const char *parent_name, const char *child_name ) 
{
    scene_node_t *node;
    char *msg;

    msg = create_scene_node(parent_name, child_name, &node);
    if ( msg != NULL ) {
        return msg;
    } 

    node->geom = Empty;

    return NULL;
}
Ejemplo n.º 4
0
void
create_sphere_node(const std::string& parent_name, const std::string& child_name, float resolution ) 
{
    SceneNode *node;

    create_scene_node(parent_name, child_name, &node);

    node->isSphere = true;
    node->sphere.radius = 1.0;
    node->sphere.divisions = MIN( 
	MAX_SPHERE_DIVISIONS, MAX( 
	    MIN_SPHERE_DIVISIONS, 
	    ROUND_TO_NEAREST(PPConfig.getInt("tux_sphere_divisions") * resolution ) 
	    ) );
	node->sphere.resolution = resolution;
}